@@ -11,13 +11,13 @@ |
||
11 | 11 | { |
12 | 12 | public $params = array(); |
13 | 13 | public $thematic_advance_list = array(); |
14 | - public $thematic_plan_list = array(); |
|
14 | + public $thematic_plan_list = array(); |
|
15 | 15 | |
16 | 16 | /** |
17 | - * Create a new Thematic |
|
18 | - * |
|
19 | - * @param array parameters |
|
20 | - */ |
|
17 | + * Create a new Thematic |
|
18 | + * |
|
19 | + * @param array parameters |
|
20 | + */ |
|
21 | 21 | public function __construct($params) |
22 | 22 | { |
23 | 23 | parent::__construct($params['id'], RESOURCE_THEMATIC); |
@@ -619,8 +619,8 @@ discard block |
||
619 | 619 | } |
620 | 620 | |
621 | 621 | /** |
622 | - * Recycle Thematics |
|
623 | - */ |
|
622 | + * Recycle Thematics |
|
623 | + */ |
|
624 | 624 | public function recycle_thematic($session_id = 0) |
625 | 625 | { |
626 | 626 | if ($this->course->has_resources(RESOURCE_THEMATIC)) { |
@@ -685,8 +685,8 @@ discard block |
||
685 | 685 | } |
686 | 686 | |
687 | 687 | /** |
688 | - * Recycle Attendances |
|
689 | - */ |
|
688 | + * Recycle Attendances |
|
689 | + */ |
|
690 | 690 | public function recycle_attendance($session_id = 0) |
691 | 691 | { |
692 | 692 | if ($this->course->has_resources(RESOURCE_ATTENDANCE)) { |
@@ -10,82 +10,82 @@ |
||
10 | 10 | */ |
11 | 11 | class ToolIntro extends Coursecopy\Resource |
12 | 12 | { |
13 | - public $id; |
|
13 | + public $id; |
|
14 | 14 | |
15 | - /** |
|
16 | - * intro text |
|
17 | - */ |
|
18 | - public $intro_text; |
|
15 | + /** |
|
16 | + * intro text |
|
17 | + */ |
|
18 | + public $intro_text; |
|
19 | 19 | |
20 | - /** |
|
21 | - * Create a new text introduction |
|
22 | - * @param int $id The id of this tool introduction in the Chamilo-course |
|
23 | - * @param string $intro_text |
|
24 | - */ |
|
25 | - public function __construct($id, $intro_text) |
|
26 | - { |
|
27 | - parent::__construct($id, RESOURCE_TOOL_INTRO); |
|
28 | - $this->id = $id; |
|
29 | - $this->intro_text = $intro_text; |
|
30 | - } |
|
20 | + /** |
|
21 | + * Create a new text introduction |
|
22 | + * @param int $id The id of this tool introduction in the Chamilo-course |
|
23 | + * @param string $intro_text |
|
24 | + */ |
|
25 | + public function __construct($id, $intro_text) |
|
26 | + { |
|
27 | + parent::__construct($id, RESOURCE_TOOL_INTRO); |
|
28 | + $this->id = $id; |
|
29 | + $this->intro_text = $intro_text; |
|
30 | + } |
|
31 | 31 | |
32 | - /** |
|
33 | - * Show this resource |
|
34 | - */ |
|
35 | - function show() |
|
36 | - { |
|
37 | - parent::show(); |
|
38 | - switch ($this->id) |
|
39 | - { |
|
40 | - case TOOL_DOCUMENT: |
|
41 | - $lang_id = 'Documents'; |
|
42 | - break; |
|
43 | - case TOOL_CALENDAR_EVENT: |
|
44 | - $lang_id = 'Agenda'; |
|
45 | - break; |
|
46 | - case TOOL_LINK: |
|
47 | - $lang_id = 'Links'; |
|
48 | - break; |
|
49 | - case TOOL_LEARNPATH: |
|
50 | - $lang_id = 'LearningPath'; |
|
51 | - break; |
|
52 | - case TOOL_ANNOUNCEMENT: |
|
53 | - $lang_id = 'Announcements'; |
|
54 | - break; |
|
55 | - case TOOL_FORUM: |
|
56 | - $lang_id = 'Forums'; |
|
57 | - break; |
|
58 | - case TOOL_DROPBOX: |
|
59 | - $lang_id = 'Dropbox'; |
|
60 | - break; |
|
61 | - case TOOL_QUIZ: |
|
62 | - $lang_id = 'Exercises'; |
|
63 | - break; |
|
64 | - case TOOL_USER: |
|
65 | - $lang_id = 'Users'; |
|
66 | - break; |
|
67 | - case TOOL_GROUP: |
|
68 | - $lang_id = 'Group'; |
|
69 | - break; |
|
70 | - case TOOL_WIKI: |
|
71 | - $lang_id = 'Wiki'; |
|
72 | - break; |
|
73 | - case TOOL_STUDENTPUBLICATION: |
|
74 | - $lang_id = 'StudentPublications'; |
|
75 | - break; |
|
76 | - case TOOL_COURSE_HOMEPAGE: |
|
77 | - $lang_id = 'CourseHomepageLink'; |
|
78 | - break; |
|
79 | - case TOOL_GLOSSARY: |
|
80 | - $lang_id = 'Glossary'; |
|
81 | - break; |
|
82 | - case TOOL_NOTEBOOK: |
|
83 | - $lang_id = 'Notebook'; |
|
84 | - break; |
|
85 | - default: |
|
86 | - $lang_id = ucfirst($this->id); // This is a wild guess. |
|
87 | - } |
|
88 | - echo '<strong>'.get_lang($lang_id, '').':</strong><br />'; |
|
89 | - echo $this->intro_text; |
|
90 | - } |
|
32 | + /** |
|
33 | + * Show this resource |
|
34 | + */ |
|
35 | + function show() |
|
36 | + { |
|
37 | + parent::show(); |
|
38 | + switch ($this->id) |
|
39 | + { |
|
40 | + case TOOL_DOCUMENT: |
|
41 | + $lang_id = 'Documents'; |
|
42 | + break; |
|
43 | + case TOOL_CALENDAR_EVENT: |
|
44 | + $lang_id = 'Agenda'; |
|
45 | + break; |
|
46 | + case TOOL_LINK: |
|
47 | + $lang_id = 'Links'; |
|
48 | + break; |
|
49 | + case TOOL_LEARNPATH: |
|
50 | + $lang_id = 'LearningPath'; |
|
51 | + break; |
|
52 | + case TOOL_ANNOUNCEMENT: |
|
53 | + $lang_id = 'Announcements'; |
|
54 | + break; |
|
55 | + case TOOL_FORUM: |
|
56 | + $lang_id = 'Forums'; |
|
57 | + break; |
|
58 | + case TOOL_DROPBOX: |
|
59 | + $lang_id = 'Dropbox'; |
|
60 | + break; |
|
61 | + case TOOL_QUIZ: |
|
62 | + $lang_id = 'Exercises'; |
|
63 | + break; |
|
64 | + case TOOL_USER: |
|
65 | + $lang_id = 'Users'; |
|
66 | + break; |
|
67 | + case TOOL_GROUP: |
|
68 | + $lang_id = 'Group'; |
|
69 | + break; |
|
70 | + case TOOL_WIKI: |
|
71 | + $lang_id = 'Wiki'; |
|
72 | + break; |
|
73 | + case TOOL_STUDENTPUBLICATION: |
|
74 | + $lang_id = 'StudentPublications'; |
|
75 | + break; |
|
76 | + case TOOL_COURSE_HOMEPAGE: |
|
77 | + $lang_id = 'CourseHomepageLink'; |
|
78 | + break; |
|
79 | + case TOOL_GLOSSARY: |
|
80 | + $lang_id = 'Glossary'; |
|
81 | + break; |
|
82 | + case TOOL_NOTEBOOK: |
|
83 | + $lang_id = 'Notebook'; |
|
84 | + break; |
|
85 | + default: |
|
86 | + $lang_id = ucfirst($this->id); // This is a wild guess. |
|
87 | + } |
|
88 | + echo '<strong>'.get_lang($lang_id, '').':</strong><br />'; |
|
89 | + echo $this->intro_text; |
|
90 | + } |
|
91 | 91 | } |
@@ -11,24 +11,24 @@ |
||
11 | 11 | class CourseSession extends Coursecopy\Resource |
12 | 12 | { |
13 | 13 | // The title session |
14 | - public $title; |
|
14 | + public $title; |
|
15 | 15 | |
16 | - /** |
|
17 | - * Create a new Session |
|
18 | - * @param int $id |
|
19 | - * @param string $title |
|
20 | - */ |
|
21 | - public function __construct($id,$title) |
|
22 | - { |
|
23 | - parent::__construct($id, RESOURCE_SESSION_COURSE); |
|
24 | - $this->title = $title; |
|
25 | - } |
|
16 | + /** |
|
17 | + * Create a new Session |
|
18 | + * @param int $id |
|
19 | + * @param string $title |
|
20 | + */ |
|
21 | + public function __construct($id,$title) |
|
22 | + { |
|
23 | + parent::__construct($id, RESOURCE_SESSION_COURSE); |
|
24 | + $this->title = $title; |
|
25 | + } |
|
26 | 26 | |
27 | - /** |
|
28 | - * Show this Event |
|
29 | - */ |
|
30 | - function show() { |
|
31 | - parent::show(); |
|
32 | - echo $this->title; |
|
33 | - } |
|
27 | + /** |
|
28 | + * Show this Event |
|
29 | + */ |
|
30 | + function show() { |
|
31 | + parent::show(); |
|
32 | + echo $this->title; |
|
33 | + } |
|
34 | 34 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | $this_section = SECTION_COURSES; |
11 | 11 | |
12 | 12 | if (extension_loaded('xapian')) { |
13 | - require '../newscorm/lp_list_search.php'; |
|
13 | + require '../newscorm/lp_list_search.php'; |
|
14 | 14 | } else { |
15 | 15 | Display::display_header(get_lang('Search')); |
16 | 16 | Display::display_error_message(get_lang('SearchXapianModuleNotInstalled')); |
@@ -101,8 +101,8 @@ |
||
101 | 101 | $group_url = "group_view.php?id=$id"; |
102 | 102 | |
103 | 103 | $result['name'] = '<div class="group-name">'.Display::url( |
104 | - api_ucwords(cut($result['name'], 40, true)), $group_url) |
|
105 | - .'</div><div class="count-username">'. |
|
104 | + api_ucwords(cut($result['name'], 40, true)), $group_url) |
|
105 | + .'</div><div class="count-username">'. |
|
106 | 106 | Display::returnFontAwesomeIcon('user').$result['count'].'</div>'; |
107 | 107 | |
108 | 108 | $picture = $userGroup->get_picture_group( |
@@ -14,7 +14,7 @@ |
||
14 | 14 | api_block_anonymous_users(); |
15 | 15 | |
16 | 16 | if (isset($_REQUEST['userId'])) { |
17 | - $userId = intval($_REQUEST['userId']); |
|
17 | + $userId = intval($_REQUEST['userId']); |
|
18 | 18 | } else { |
19 | 19 | api_not_allowed(); |
20 | 20 | } |
@@ -128,7 +128,7 @@ |
||
128 | 128 | if (isset($friends[$j])) { |
129 | 129 | $friend = $friends[$j]; |
130 | 130 | $user_name = api_xml_http_response_encode($friend['firstName'].' '.$friend['lastName']); |
131 | - $userPicture = UserManager::getUserPicture($friend['friend_user_id']); |
|
131 | + $userPicture = UserManager::getUserPicture($friend['friend_user_id']); |
|
132 | 132 | |
133 | 133 | $friend_html .= ' |
134 | 134 | <div class="col-md-3"> |
@@ -15,27 +15,27 @@ discard block |
||
15 | 15 | // --------------------------------------------------- |
16 | 16 | if ($_POST['StoreGroupPermissions'] and $setting_visualisation=='checkbox') |
17 | 17 | { |
18 | - $result_message=store_permissions('group', $group_id); |
|
19 | - if ($result_message) |
|
20 | - { |
|
21 | - Display::display_normal_message($result_message); |
|
22 | - } |
|
18 | + $result_message=store_permissions('group', $group_id); |
|
19 | + if ($result_message) |
|
20 | + { |
|
21 | + Display::display_normal_message($result_message); |
|
22 | + } |
|
23 | 23 | } |
24 | 24 | if (isset($_GET['action'])) |
25 | 25 | { |
26 | - if (($_GET['action']=='grant' OR $_GET['action']=='revoke') AND isset($_GET['permission']) AND isset($_GET['tool'])) |
|
27 | - { |
|
28 | - $result_message=store_one_permission('group', $_GET['action'], $group_id, $_GET['tool'], $_GET['permission']); |
|
29 | - } |
|
30 | - if (isset($_GET['role']) AND ($_GET['action']=='grant' OR $_GET['action']=='revoke')) |
|
31 | - { |
|
32 | - $result_message=assign_role('group', $_GET['action'], $group_id, $_GET['role'], $_GET['scope']); |
|
33 | - echo 'hier'; |
|
34 | - } |
|
26 | + if (($_GET['action']=='grant' OR $_GET['action']=='revoke') AND isset($_GET['permission']) AND isset($_GET['tool'])) |
|
27 | + { |
|
28 | + $result_message=store_one_permission('group', $_GET['action'], $group_id, $_GET['tool'], $_GET['permission']); |
|
29 | + } |
|
30 | + if (isset($_GET['role']) AND ($_GET['action']=='grant' OR $_GET['action']=='revoke')) |
|
31 | + { |
|
32 | + $result_message=assign_role('group', $_GET['action'], $group_id, $_GET['role'], $_GET['scope']); |
|
33 | + echo 'hier'; |
|
34 | + } |
|
35 | 35 | } |
36 | 36 | if (isset($result_message)) |
37 | 37 | { |
38 | - Display::display_normal_message($result_message); |
|
38 | + Display::display_normal_message($result_message); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | // --------------------------------------------------- |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | $inherited_permissions=limited_or_full($inherited_permissions); |
60 | 60 | if (api_get_setting('permissions')=='limited') |
61 | 61 | { |
62 | - $header_array=$rights_limited; |
|
62 | + $header_array=$rights_limited; |
|
63 | 63 | } |
64 | 64 | if (api_get_setting('permissions')=='full') |
65 | 65 | { |
66 | - $header_array=$rights_full; |
|
66 | + $header_array=$rights_full; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | echo "<form method=\"post\" action=\"".str_replace('&', '&', $_SERVER['REQUEST_URI'])."\">"; |
@@ -72,12 +72,12 @@ discard block |
||
72 | 72 | // --------------------------------------------------- |
73 | 73 | if (api_get_setting('group_roles')=='true') |
74 | 74 | { |
75 | - // the list of the roles for the user |
|
76 | - echo '<strong>'.get_lang('GroupRoles').'</strong><br />'; |
|
77 | - $current_group_course_roles=get_roles('group',$group_id); |
|
78 | - $current_group_platform_roles=get_roles('group',$group_id, 'platform'); |
|
79 | - display_role_list($current_group_course_roles, $current_group_platform_roles); |
|
80 | - echo '<br />'; |
|
75 | + // the list of the roles for the user |
|
76 | + echo '<strong>'.get_lang('GroupRoles').'</strong><br />'; |
|
77 | + $current_group_course_roles=get_roles('group',$group_id); |
|
78 | + $current_group_platform_roles=get_roles('group',$group_id, 'platform'); |
|
79 | + display_role_list($current_group_course_roles, $current_group_platform_roles); |
|
80 | + echo '<br />'; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
@@ -92,47 +92,47 @@ discard block |
||
92 | 92 | echo "\t\t<th>".get_lang('Module')."</th>\n"; |
93 | 93 | foreach ($header_array as $header_key=>$header_value) |
94 | 94 | { |
95 | - echo "\t\t<th>".get_lang($header_value)."</th>\n"; |
|
95 | + echo "\t\t<th>".get_lang($header_value)."</th>\n"; |
|
96 | 96 | } |
97 | 97 | echo "\t</tr>\n"; |
98 | 98 | |
99 | 99 | // the main area with the checkboxes or images |
100 | 100 | foreach ($tool_rights as $tool=>$rights) // $tool_rights contains all the possible tools and their rights |
101 | 101 | { |
102 | - echo "\t<tr>\n"; |
|
103 | - echo "\t\t<td>\n"; |
|
104 | - echo get_lang($tool); |
|
105 | - echo "\t\t</td>\n"; |
|
102 | + echo "\t<tr>\n"; |
|
103 | + echo "\t\t<td>\n"; |
|
104 | + echo get_lang($tool); |
|
105 | + echo "\t\t</td>\n"; |
|
106 | 106 | |
107 | - foreach ($header_array as $key=>$value) |
|
108 | - { |
|
109 | - echo "\t\t<td align='center'>\n"; |
|
110 | - if (in_array($value,$rights)) |
|
111 | - { |
|
112 | - if ($setting_visualisation=='checkbox') |
|
113 | - { |
|
114 | - //display_checkbox_matrix($current_group_permissions, $tool, $value); |
|
115 | - display_checkbox_matrix($current_group_permissions, $tool, $value, $inherited_permissions,$course_admin); |
|
116 | - } |
|
117 | - if ($setting_visualisation=='image') |
|
118 | - { |
|
119 | - //display_image_matrix($current_group_permissions, $tool, $value); |
|
120 | - display_image_matrix($current_group_permissions, $tool, $value,$inherited_permissions, $course_admin); |
|
121 | - } |
|
122 | - } |
|
123 | - // note: in a later stage this part will be replaced by a function |
|
124 | - // so that we can easily switch between a checkbox approach or an image approach |
|
125 | - // where every click is in fact a change of status. In the checkbox approach you first have to |
|
126 | - // do the changes and then store them by clicking the submit button. |
|
127 | - echo "\t\t</td>\n"; |
|
128 | - } |
|
129 | - echo "\t</tr>\n"; |
|
107 | + foreach ($header_array as $key=>$value) |
|
108 | + { |
|
109 | + echo "\t\t<td align='center'>\n"; |
|
110 | + if (in_array($value,$rights)) |
|
111 | + { |
|
112 | + if ($setting_visualisation=='checkbox') |
|
113 | + { |
|
114 | + //display_checkbox_matrix($current_group_permissions, $tool, $value); |
|
115 | + display_checkbox_matrix($current_group_permissions, $tool, $value, $inherited_permissions,$course_admin); |
|
116 | + } |
|
117 | + if ($setting_visualisation=='image') |
|
118 | + { |
|
119 | + //display_image_matrix($current_group_permissions, $tool, $value); |
|
120 | + display_image_matrix($current_group_permissions, $tool, $value,$inherited_permissions, $course_admin); |
|
121 | + } |
|
122 | + } |
|
123 | + // note: in a later stage this part will be replaced by a function |
|
124 | + // so that we can easily switch between a checkbox approach or an image approach |
|
125 | + // where every click is in fact a change of status. In the checkbox approach you first have to |
|
126 | + // do the changes and then store them by clicking the submit button. |
|
127 | + echo "\t\t</td>\n"; |
|
128 | + } |
|
129 | + echo "\t</tr>\n"; |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | echo "</table>\n"; |
133 | 133 | if ($setting_visualisation=='checkbox') |
134 | 134 | { |
135 | - echo "<input type=\"Submit\" name=\"StoreGroupPermissions\" value=\"".get_lang('StorePermissions')."\">"; |
|
135 | + echo "<input type=\"Submit\" name=\"StoreGroupPermissions\" value=\"".get_lang('StorePermissions')."\">"; |
|
136 | 136 | } |
137 | 137 | echo "</form>"; |
138 | 138 |