From 4164d76c1e1e06d9d24ad23e9323f0696f29adee Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Mon, 10 Apr 2017 08:15:30 +0200 Subject: [PATCH] Minor - format code. --- main/admin/system_announcements.php | 39 +++++++++++++---------------- main/auth/my_progress.php | 5 +--- main/inc/lib/sessionmanager.lib.php | 2 +- 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/main/admin/system_announcements.php b/main/admin/system_announcements.php index b10cffcbaf..9013b55069 100755 --- a/main/admin/system_announcements.php +++ b/main/admin/system_announcements.php @@ -171,29 +171,26 @@ if ($action_todo) { array('id' => 'range') ); - $group = array(); - - $group[] = $form->createElement( - 'checkbox', - 'visible_teacher', - null, - get_lang('Teacher') - ); - $group[] = $form->createElement( - 'checkbox', - 'visible_student', - null, - get_lang('Student') - ); - $group[] = $form->createElement( - 'checkbox', - 'visible_guest', - null, - get_lang('Guest') - ); + $visibleToUsers = [ + 'visible_teacher' => get_lang('Teacher'), + 'visible_student' => get_lang('Student'), + 'visible_drh' => get_lang('DRH'), + 'visible_session_admin' => get_lang('SessionAdministrator'), + 'visible_boss' => get_lang('StudentBoss'), + 'visible_guest' => get_lang('Guest') + ]; + + $group = []; + foreach ($visibleToUsers as $key => $name) { + $group[] = $form->createElement( + 'checkbox', + $key, + null, + $name + ); + } $form->addGroup($group, null, get_lang('Visible')); - $form->addElement('hidden', 'id'); $userGroup = new UserGroup(); $group_list = $userGroup->get_all(); diff --git a/main/auth/my_progress.php b/main/auth/my_progress.php index 963223c056..13ba3ade58 100755 --- a/main/auth/my_progress.php +++ b/main/auth/my_progress.php @@ -16,8 +16,7 @@ $nameTools = get_lang('MyProgress'); api_block_anonymous_users(); $htmlHeadXtra[] = api_get_js('jquery.timelinr-0.9.54.js'); -$htmlHeadXtra[] = " -