@@ -62,7 +62,7 @@ |
||
| 62 | 62 | |
| 63 | 63 | if (api_is_allowed_to_edit() || api_is_coach()) { |
| 64 | 64 | //Search for all files that are not deleted => visibility != 2 |
| 65 | - $sql = "SELECT DISTINCT |
|
| 65 | + $sql = "SELECT DISTINCT |
|
| 66 | 66 | url, |
| 67 | 67 | title, |
| 68 | 68 | description, |
@@ -8,194 +8,194 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | class CourseCopyLearnpath extends Coursecopy\Resource |
| 10 | 10 | { |
| 11 | - /** |
|
| 12 | - * Type of learnpath (can be dokeos (1), scorm (2), aicc (3)) |
|
| 13 | - */ |
|
| 14 | - public $lp_type; |
|
| 15 | - /** |
|
| 16 | - * The name |
|
| 17 | - */ |
|
| 18 | - public $name; |
|
| 19 | - /** |
|
| 20 | - * The reference |
|
| 21 | - */ |
|
| 22 | - public $ref; |
|
| 23 | - /** |
|
| 24 | - * The description |
|
| 25 | - */ |
|
| 26 | - public $description; |
|
| 27 | - /** |
|
| 28 | - * Path to the learning path files |
|
| 29 | - */ |
|
| 30 | - public $path; |
|
| 31 | - /** |
|
| 32 | - * Whether additional commits should be forced or not |
|
| 33 | - */ |
|
| 34 | - public $force_commit; |
|
| 35 | - /** |
|
| 36 | - * View mode by default ('embedded' or 'fullscreen') |
|
| 37 | - */ |
|
| 38 | - public $default_view_mod; |
|
| 39 | - /** |
|
| 40 | - * Default character encoding |
|
| 41 | - */ |
|
| 42 | - public $default_encoding; |
|
| 43 | - /** |
|
| 44 | - * Display order |
|
| 45 | - */ |
|
| 46 | - public $display_order; |
|
| 47 | - /** |
|
| 48 | - * Content editor/publisher |
|
| 49 | - */ |
|
| 50 | - public $content_maker; |
|
| 51 | - /** |
|
| 52 | - * Location of the content (local or remote) |
|
| 53 | - */ |
|
| 54 | - public $content_local; |
|
| 55 | - /** |
|
| 56 | - * License of the content |
|
| 57 | - */ |
|
| 58 | - public $content_license; |
|
| 59 | - /** |
|
| 60 | - * Whether to prevent reinitialisation or not |
|
| 61 | - */ |
|
| 62 | - public $prevent_reinit; |
|
| 63 | - /** |
|
| 64 | - * JavaScript library used |
|
| 65 | - */ |
|
| 66 | - public $js_lib; |
|
| 67 | - /** |
|
| 68 | - * Debug level for this lp |
|
| 69 | - */ |
|
| 70 | - public $debug; |
|
| 71 | - /** |
|
| 72 | - * The items |
|
| 73 | - */ |
|
| 74 | - public $items; |
|
| 75 | - /** |
|
| 76 | - * The learnpath visibility on the homepage |
|
| 77 | - */ |
|
| 78 | - public $visibility; |
|
| 11 | + /** |
|
| 12 | + * Type of learnpath (can be dokeos (1), scorm (2), aicc (3)) |
|
| 13 | + */ |
|
| 14 | + public $lp_type; |
|
| 15 | + /** |
|
| 16 | + * The name |
|
| 17 | + */ |
|
| 18 | + public $name; |
|
| 19 | + /** |
|
| 20 | + * The reference |
|
| 21 | + */ |
|
| 22 | + public $ref; |
|
| 23 | + /** |
|
| 24 | + * The description |
|
| 25 | + */ |
|
| 26 | + public $description; |
|
| 27 | + /** |
|
| 28 | + * Path to the learning path files |
|
| 29 | + */ |
|
| 30 | + public $path; |
|
| 31 | + /** |
|
| 32 | + * Whether additional commits should be forced or not |
|
| 33 | + */ |
|
| 34 | + public $force_commit; |
|
| 35 | + /** |
|
| 36 | + * View mode by default ('embedded' or 'fullscreen') |
|
| 37 | + */ |
|
| 38 | + public $default_view_mod; |
|
| 39 | + /** |
|
| 40 | + * Default character encoding |
|
| 41 | + */ |
|
| 42 | + public $default_encoding; |
|
| 43 | + /** |
|
| 44 | + * Display order |
|
| 45 | + */ |
|
| 46 | + public $display_order; |
|
| 47 | + /** |
|
| 48 | + * Content editor/publisher |
|
| 49 | + */ |
|
| 50 | + public $content_maker; |
|
| 51 | + /** |
|
| 52 | + * Location of the content (local or remote) |
|
| 53 | + */ |
|
| 54 | + public $content_local; |
|
| 55 | + /** |
|
| 56 | + * License of the content |
|
| 57 | + */ |
|
| 58 | + public $content_license; |
|
| 59 | + /** |
|
| 60 | + * Whether to prevent reinitialisation or not |
|
| 61 | + */ |
|
| 62 | + public $prevent_reinit; |
|
| 63 | + /** |
|
| 64 | + * JavaScript library used |
|
| 65 | + */ |
|
| 66 | + public $js_lib; |
|
| 67 | + /** |
|
| 68 | + * Debug level for this lp |
|
| 69 | + */ |
|
| 70 | + public $debug; |
|
| 71 | + /** |
|
| 72 | + * The items |
|
| 73 | + */ |
|
| 74 | + public $items; |
|
| 75 | + /** |
|
| 76 | + * The learnpath visibility on the homepage |
|
| 77 | + */ |
|
| 78 | + public $visibility; |
|
| 79 | 79 | |
| 80 | - /** |
|
| 81 | - * Author info |
|
| 82 | - */ |
|
| 83 | - public $author; |
|
| 80 | + /** |
|
| 81 | + * Author info |
|
| 82 | + */ |
|
| 83 | + public $author; |
|
| 84 | 84 | |
| 85 | - /** |
|
| 86 | - * Author's image |
|
| 87 | - */ |
|
| 88 | - public $preview_image; |
|
| 85 | + /** |
|
| 86 | + * Author's image |
|
| 87 | + */ |
|
| 88 | + public $preview_image; |
|
| 89 | 89 | |
| 90 | - /** |
|
| 91 | - * Create a new learnpath |
|
| 92 | - * @param integer ID |
|
| 93 | - * @param integer Type (1,2,3,...) |
|
| 94 | - * @param string $name |
|
| 95 | - * @param string $path |
|
| 96 | - * @param string $ref |
|
| 97 | - * @param string $description |
|
| 98 | - * @param string $content_local |
|
| 99 | - * @param string $default_encoding |
|
| 100 | - * @param string $default_view_mode |
|
| 101 | - * @param bool $prevent_reinit |
|
| 102 | - * @param bool $force_commit |
|
| 103 | - * @param string $content_maker |
|
| 104 | - * @param integer $display_order |
|
| 105 | - * @param string $js_lib |
|
| 106 | - * @param string $content_license |
|
| 107 | - * @param integer $debug |
|
| 108 | - * @param string $visibility |
|
| 109 | - * @param array $items |
|
| 110 | - */ |
|
| 111 | - public function __construct( |
|
| 112 | - $id, |
|
| 113 | - $type, |
|
| 114 | - $name, |
|
| 115 | - $path, |
|
| 116 | - $ref, |
|
| 117 | - $description, |
|
| 118 | - $content_local, |
|
| 119 | - $default_encoding, |
|
| 120 | - $default_view_mode, |
|
| 121 | - $prevent_reinit, |
|
| 122 | - $force_commit, |
|
| 123 | - $content_maker, |
|
| 124 | - $display_order, |
|
| 125 | - $js_lib, |
|
| 126 | - $content_license, |
|
| 127 | - $debug, |
|
| 128 | - $visibility, |
|
| 129 | - $author, |
|
| 130 | - $preview_image, |
|
| 131 | - $use_max_score, |
|
| 132 | - $autolaunch, |
|
| 133 | - $created_on, |
|
| 134 | - $modified_on, |
|
| 135 | - $publicated_on, |
|
| 136 | - $expired_on, |
|
| 137 | - $session_id, |
|
| 138 | - $items |
|
| 139 | - ) { |
|
| 140 | - parent::__construct($id, RESOURCE_LEARNPATH); |
|
| 141 | - $this->lp_type = $type; |
|
| 142 | - $this->name = $name; |
|
| 143 | - $this->path = $path; |
|
| 144 | - $this->ref = $ref; |
|
| 145 | - $this->description = $description; |
|
| 146 | - $this->content_local = $content_local; |
|
| 147 | - $this->default_encoding = $default_encoding; |
|
| 148 | - $this->default_view_mod = $default_view_mode; |
|
| 149 | - $this->prevent_reinit = $prevent_reinit; |
|
| 150 | - $this->force_commit = $force_commit; |
|
| 151 | - $this->content_maker = $content_maker; |
|
| 152 | - $this->display_order = $display_order; |
|
| 153 | - $this->js_lib = $js_lib; |
|
| 154 | - $this->content_license = $content_license; |
|
| 155 | - $this->debug = $debug; |
|
| 156 | - $this->visibility=$visibility; |
|
| 90 | + /** |
|
| 91 | + * Create a new learnpath |
|
| 92 | + * @param integer ID |
|
| 93 | + * @param integer Type (1,2,3,...) |
|
| 94 | + * @param string $name |
|
| 95 | + * @param string $path |
|
| 96 | + * @param string $ref |
|
| 97 | + * @param string $description |
|
| 98 | + * @param string $content_local |
|
| 99 | + * @param string $default_encoding |
|
| 100 | + * @param string $default_view_mode |
|
| 101 | + * @param bool $prevent_reinit |
|
| 102 | + * @param bool $force_commit |
|
| 103 | + * @param string $content_maker |
|
| 104 | + * @param integer $display_order |
|
| 105 | + * @param string $js_lib |
|
| 106 | + * @param string $content_license |
|
| 107 | + * @param integer $debug |
|
| 108 | + * @param string $visibility |
|
| 109 | + * @param array $items |
|
| 110 | + */ |
|
| 111 | + public function __construct( |
|
| 112 | + $id, |
|
| 113 | + $type, |
|
| 114 | + $name, |
|
| 115 | + $path, |
|
| 116 | + $ref, |
|
| 117 | + $description, |
|
| 118 | + $content_local, |
|
| 119 | + $default_encoding, |
|
| 120 | + $default_view_mode, |
|
| 121 | + $prevent_reinit, |
|
| 122 | + $force_commit, |
|
| 123 | + $content_maker, |
|
| 124 | + $display_order, |
|
| 125 | + $js_lib, |
|
| 126 | + $content_license, |
|
| 127 | + $debug, |
|
| 128 | + $visibility, |
|
| 129 | + $author, |
|
| 130 | + $preview_image, |
|
| 131 | + $use_max_score, |
|
| 132 | + $autolaunch, |
|
| 133 | + $created_on, |
|
| 134 | + $modified_on, |
|
| 135 | + $publicated_on, |
|
| 136 | + $expired_on, |
|
| 137 | + $session_id, |
|
| 138 | + $items |
|
| 139 | + ) { |
|
| 140 | + parent::__construct($id, RESOURCE_LEARNPATH); |
|
| 141 | + $this->lp_type = $type; |
|
| 142 | + $this->name = $name; |
|
| 143 | + $this->path = $path; |
|
| 144 | + $this->ref = $ref; |
|
| 145 | + $this->description = $description; |
|
| 146 | + $this->content_local = $content_local; |
|
| 147 | + $this->default_encoding = $default_encoding; |
|
| 148 | + $this->default_view_mod = $default_view_mode; |
|
| 149 | + $this->prevent_reinit = $prevent_reinit; |
|
| 150 | + $this->force_commit = $force_commit; |
|
| 151 | + $this->content_maker = $content_maker; |
|
| 152 | + $this->display_order = $display_order; |
|
| 153 | + $this->js_lib = $js_lib; |
|
| 154 | + $this->content_license = $content_license; |
|
| 155 | + $this->debug = $debug; |
|
| 156 | + $this->visibility=$visibility; |
|
| 157 | 157 | |
| 158 | - $this->use_max_score=$use_max_score; |
|
| 159 | - $this->autolaunch=$autolaunch; |
|
| 160 | - $this->created_on=$created_on; |
|
| 161 | - $this->modified_on=$modified_on; |
|
| 162 | - $this->publicated_on=$publicated_on; |
|
| 163 | - $this->expired_on=$expired_on; |
|
| 164 | - $this->session_id=$session_id; |
|
| 158 | + $this->use_max_score=$use_max_score; |
|
| 159 | + $this->autolaunch=$autolaunch; |
|
| 160 | + $this->created_on=$created_on; |
|
| 161 | + $this->modified_on=$modified_on; |
|
| 162 | + $this->publicated_on=$publicated_on; |
|
| 163 | + $this->expired_on=$expired_on; |
|
| 164 | + $this->session_id=$session_id; |
|
| 165 | 165 | |
| 166 | - $this->author= $author; |
|
| 167 | - $this->preview_image= $preview_image; |
|
| 166 | + $this->author= $author; |
|
| 167 | + $this->preview_image= $preview_image; |
|
| 168 | 168 | |
| 169 | - $this->items = $items; |
|
| 170 | - } |
|
| 171 | - /** |
|
| 172 | - * Get the items |
|
| 173 | - */ |
|
| 174 | - function get_items() |
|
| 175 | - { |
|
| 176 | - return $this->items; |
|
| 177 | - } |
|
| 169 | + $this->items = $items; |
|
| 170 | + } |
|
| 171 | + /** |
|
| 172 | + * Get the items |
|
| 173 | + */ |
|
| 174 | + function get_items() |
|
| 175 | + { |
|
| 176 | + return $this->items; |
|
| 177 | + } |
|
| 178 | 178 | |
| 179 | - /** |
|
| 180 | - * Check if a given resource is used as an item in this chapter |
|
| 181 | - */ |
|
| 182 | - function has_item($resource) |
|
| 183 | - { |
|
| 184 | - foreach ($this->items as $item) { |
|
| 185 | - if ($item['id'] == $resource->get_id() && |
|
| 186 | - isset($item['type']) && $item['type'] == $resource->get_type() |
|
| 187 | - ) { |
|
| 188 | - return true; |
|
| 189 | - } |
|
| 190 | - } |
|
| 191 | - return false; |
|
| 192 | - } |
|
| 179 | + /** |
|
| 180 | + * Check if a given resource is used as an item in this chapter |
|
| 181 | + */ |
|
| 182 | + function has_item($resource) |
|
| 183 | + { |
|
| 184 | + foreach ($this->items as $item) { |
|
| 185 | + if ($item['id'] == $resource->get_id() && |
|
| 186 | + isset($item['type']) && $item['type'] == $resource->get_type() |
|
| 187 | + ) { |
|
| 188 | + return true; |
|
| 189 | + } |
|
| 190 | + } |
|
| 191 | + return false; |
|
| 192 | + } |
|
| 193 | 193 | |
| 194 | - /** |
|
| 195 | - * Show this learnpath |
|
| 196 | - */ |
|
| 197 | - function show() { |
|
| 198 | - parent::show(); |
|
| 199 | - echo $this->name; |
|
| 200 | - } |
|
| 194 | + /** |
|
| 195 | + * Show this learnpath |
|
| 196 | + */ |
|
| 197 | + function show() { |
|
| 198 | + parent::show(); |
|
| 199 | + echo $this->name; |
|
| 200 | + } |
|
| 201 | 201 | } |
@@ -66,19 +66,19 @@ |
||
| 66 | 66 | $attachment_comment = null, |
| 67 | 67 | $all_day = 0 |
| 68 | 68 | ) { |
| 69 | - parent::__construct($id, RESOURCE_EVENT); |
|
| 69 | + parent::__construct($id, RESOURCE_EVENT); |
|
| 70 | 70 | |
| 71 | - $this->title = $title; |
|
| 72 | - $this->content = $content; |
|
| 73 | - $this->start_date = $start_date; |
|
| 74 | - $this->end_date = $end_date; |
|
| 75 | - $this->all_day = $all_day; |
|
| 71 | + $this->title = $title; |
|
| 72 | + $this->content = $content; |
|
| 73 | + $this->start_date = $start_date; |
|
| 74 | + $this->end_date = $end_date; |
|
| 75 | + $this->all_day = $all_day; |
|
| 76 | 76 | |
| 77 | - $this->attachment_path = $attachment_path; |
|
| 78 | - $this->attachment_filename = $attachment_filename; |
|
| 79 | - $this->attachment_size = $attachment_size; |
|
| 80 | - $this->attachment_comment = $attachment_comment; |
|
| 81 | - } |
|
| 77 | + $this->attachment_path = $attachment_path; |
|
| 78 | + $this->attachment_filename = $attachment_filename; |
|
| 79 | + $this->attachment_size = $attachment_size; |
|
| 80 | + $this->attachment_comment = $attachment_comment; |
|
| 81 | + } |
|
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | 84 | * Show this Event |
@@ -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,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 | |