Merge branch '1.11.x' of https://github.com/chamilo/chamilo-lms into 1.11.x

pull/2487/head
Alex Aragon 9 years ago
commit 004ae0d962
  1. 6
      main/admin/course_add.php
  2. 6
      main/admin/course_edit.php
  3. 10
      main/admin/settings.lib.php
  4. 2
      main/admin/skills_import.php
  5. 2
      main/admin/system_announcements.php
  6. 8
      main/admin/user_add.php
  7. 8
      main/admin/user_edit.php
  8. 4
      main/admin/user_import.php
  9. 2
      main/admin/user_list.php
  10. 2
      main/admin/usergroup_import.php
  11. 48
      main/course_info/infocours.php
  12. 16
      main/exercise/exercise.class.php
  13. 23
      main/forum/forumfunction.inc.php
  14. 12
      main/gradebook/index.php
  15. 14
      main/gradebook/lib/fe/gradebooktable.class.php
  16. 8
      main/gradebook/lib/gradebook_data_generator.class.php
  17. 2
      main/gradebook/lib/scoredisplay.class.php
  18. 67
      main/group/group_category.php
  19. 2
      main/group/group_creation.php
  20. 66
      main/group/group_edit.php
  21. 65
      main/group/settings.php
  22. 8
      main/inc/lib/certificate.lib.php
  23. 15
      main/inc/lib/extra_field.lib.php
  24. 2
      main/inc/lib/pear/HTML/QuickForm/group.php
  25. 4
      main/inc/lib/usermanager.lib.php
  26. 4
      main/mySpace/user_edit.php
  27. 2
      main/session/session_category_list.php

@ -138,17 +138,17 @@ $group[]= $form->createElement('radio', 'visibility', null, get_lang('Private'),
$group[]= $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityClosed'), COURSE_VISIBILITY_CLOSED);
$group[]= $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityHidden'), COURSE_VISIBILITY_HIDDEN);
$form->addGroup($group,'', get_lang('CourseAccess'), '<br />');
$form->addGroup($group,'', get_lang('CourseAccess'));
$group = array();
$group[]= $form->createElement('radio', 'subscribe', get_lang('Subscription'), get_lang('Allowed'), 1);
$group[]= $form->createElement('radio', 'subscribe', null, get_lang('Denied'), 0);
$form->addGroup($group,'', get_lang('Subscription'), '<br />');
$form->addGroup($group,'', get_lang('Subscription'));
$group = array();
$group[]= $form->createElement('radio', 'unsubscribe', get_lang('Unsubscription'), get_lang('AllowedToUnsubscribe'), 1);
$group[]= $form->createElement('radio', 'unsubscribe', null, get_lang('NotAllowedToUnsubscribe'), 0);
$form->addGroup($group, '', get_lang('Unsubscription'), '<br />');
$form->addGroup($group, '', get_lang('Unsubscription'));
$form->addElement('text','disk_quota',array(get_lang('CourseQuota'), null, get_lang('MB')));
$form->addRule('disk_quota', get_lang('ThisFieldShouldBeNumeric'), 'numeric');

@ -206,17 +206,17 @@ $group[]= $form->createElement('radio', 'visibility', null, get_lang('OpenToTheP
$group[]= $form->createElement('radio', 'visibility', null, get_lang('Private'), COURSE_VISIBILITY_REGISTERED);
$group[]= $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityClosed'), COURSE_VISIBILITY_CLOSED);
$group[]= $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityHidden'), COURSE_VISIBILITY_HIDDEN);
$form->addGroup($group, '', get_lang('CourseAccess'), '<br />');
$form->addGroup($group, '', get_lang('CourseAccess'));
$group = array();
$group[] = $form->createElement('radio', 'subscribe', get_lang('Subscription'), get_lang('Allowed'), 1);
$group[] = $form->createElement('radio', 'subscribe', null, get_lang('Denied'), 0);
$form->addGroup($group, '', get_lang('Subscription'), '<br />');
$form->addGroup($group, '', get_lang('Subscription'));
$group = array();
$group[] = $form->createElement('radio', 'unsubscribe', get_lang('Unsubscription'), get_lang('AllowedToUnsubscribe'), 1);
$group[] = $form->createElement('radio', 'unsubscribe', null, get_lang('NotAllowedToUnsubscribe'), 0);
$form->addGroup($group, '', get_lang('Unsubscription'), '<br />');
$form->addGroup($group, '', get_lang('Unsubscription'));
$form->addElement('text', 'disk_quota', array(get_lang('CourseQuota'), null, get_lang('MB')));
$form->addRule('disk_quota', get_lang('ThisFieldIsRequired'), 'required');

@ -703,7 +703,7 @@ function handleSearch()
$group = formGenerateElementsGroup($form, $values, 'search_enabled');
//SearchEnabledComment
$form->addGroup($group, 'search_enabled', array(get_lang('SearchEnabledTitle'), get_lang('SearchEnabledComment')), '<br />', false);
$form->addGroup($group, 'search_enabled', array(get_lang('SearchEnabledTitle'), get_lang('SearchEnabledComment')), null, false);
$search_enabled = api_get_setting('search_enabled');
@ -719,7 +719,7 @@ function handleSearch()
$values = api_get_settings_options('search_show_unlinked_results');
$group = formGenerateElementsGroup($form, $values, 'search_show_unlinked_results');
$form->addGroup($group, 'search_show_unlinked_results', array(get_lang('SearchShowUnlinkedResultsTitle'),get_lang('SearchShowUnlinkedResultsComment')), '', false);
$form->addGroup($group, 'search_show_unlinked_results', array(get_lang('SearchShowUnlinkedResultsTitle'),get_lang('SearchShowUnlinkedResultsComment')), null, false);
$default_values['search_show_unlinked_results'] = api_get_setting('search_show_unlinked_results');
$sf_values = array();
@ -1386,7 +1386,7 @@ function generateSettingsForm($settings, $settings_by_access_list)
$group,
$row['variable'],
array(get_lang($row['title']), get_lang($row['comment'])),
'',
null,
false
);
$default_values[$row['variable']] = $row['selected_value'];
@ -1448,8 +1448,8 @@ function generateSettingsForm($settings, $settings_by_access_list)
$form->addGroup(
$group,
$row['variable'],
array(get_lang($row['title']), get_lang($row['comment']) . 'aaaaaa'),
''
array(get_lang($row['title']), get_lang($row['comment'])),
null
);
break;
case 'link':

@ -282,7 +282,7 @@ $form->addElement('hidden', 'formSent');
$form->addElement('file', 'import_file', get_lang('ImportFileLocation'));
$group = array();
$group[] = $form->createElement('radio', 'file_type', '', 'CSV (<a href="skill_example.csv" target="_blank">'.get_lang('ExampleCSVFile').'</a>)', 'csv');
$form->addGroup($group, '', get_lang('FileType'), '<br/>');
$form->addGroup($group, '', get_lang('FileType'));
$form->addButtonImport(get_lang('Import'));
$defaults['formSent'] = 1;
$defaults['sendMail'] = 0;

@ -161,7 +161,7 @@ if ($action_todo) {
$group[]= $form->createElement('checkbox', 'visible_student', null, get_lang('Student'));
$group[]= $form->createElement('checkbox', 'visible_guest', null, get_lang('Guest'));
$form->addGroup($group, null, get_lang('Visible'), '');
$form->addGroup($group, null, get_lang('Visible'));
$form->addElement('hidden', 'id');
$userGroup = new UserGroup();

@ -207,7 +207,7 @@ $group[] = $form->createElement(
)
);
$form->addGroup($group, 'password', get_lang('Password'), '');
$form->addGroup($group, 'password', get_lang('Password'));
$form->addGroupRule('password', get_lang('EnterPassword'), 'required', null, 1);
if ($checkPass) {
@ -261,7 +261,7 @@ if (api_is_platform_admin()) {
$group[] = $form->createElement('radio', 'platform_admin', 'id="id_platform_admin"', get_lang('Yes'), 1);
$group[] = $form->createElement('radio', 'platform_admin', 'id="id_platform_admin"', get_lang('No'), 0);
$form->addElement('html', '<div id="id_platform_admin" style="display:'.$display.';">');
$form->addGroup($group, 'admin', get_lang('PlatformAdmin'), '&nbsp;');
$form->addGroup($group, 'admin', get_lang('PlatformAdmin'));
$form->addElement('html', '</div>');
}
@ -271,7 +271,7 @@ $form->addElement('select_language', 'language', get_lang('Language'), null);
$group = array();
$group[] = $form->createElement('radio', 'send_mail', null, get_lang('Yes'), 1);
$group[] = $form->createElement('radio', 'send_mail', null, get_lang('No'), 0);
$form->addGroup($group, 'mail', get_lang('SendMailToNewUser'), '&nbsp;');
$form->addGroup($group, 'mail', get_lang('SendMailToNewUser'));
// Expiration Date
$form->addElement('radio', 'radio_expiration_date', get_lang('ExpirationDate'), get_lang('NeverExpires'), 0);
$group = array ();
@ -284,7 +284,7 @@ $group[] = $form->createElement(
'onchange' => 'javascript: enable_expiration_date();'
)
);
$form->addGroup($group, 'max_member_group', null, '', false);
$form->addGroup($group, 'max_member_group', null, null, false);
// Active account or inactive account
$form->addElement('radio', 'active', get_lang('ActiveAccount'), get_lang('Active'), 1);
$form->addElement('radio', 'active', '', get_lang('Inactive'), 0);

@ -340,7 +340,7 @@ if (isset($extAuthSource) && !empty($extAuthSource) && count($extAuthSource) > 0
$group[] = $form->createElement('radio', 'reset_password', null, get_lang('ExternalAuthentication').' ', 3);
$group[] = $form->createElement('select', 'auth_source', null, $auth_sources);
$group[] = $form->createElement('static', '', '', '<br />');
$form->addGroup($group, 'password', null, '', false);
$form->addGroup($group, 'password', null, null, false);
}
}
$form->addElement('radio', 'reset_password', null, get_lang('AutoGeneratePassword'), 1);
@ -352,7 +352,7 @@ $group[] = $form->createElement(
null,
array('onkeydown' => 'javascript: password_switch_radio_button();')
);
$form->addGroup($group, 'password', null, '', false);
$form->addGroup($group, 'password', null, null, false);
// Status
$status = array();
@ -396,7 +396,7 @@ $form->addElement('select_language', 'language', get_lang('Language'));
$group = array();
$group[] = $form->createElement('radio', 'send_mail', null, get_lang('Yes'), 1);
$group[] = $form->createElement('radio', 'send_mail', null, get_lang('No'), 0);
$form->addGroup($group, 'mail', get_lang('SendMailToNewUser'), '&nbsp;', false);
$form->addGroup($group, 'mail', get_lang('SendMailToNewUser'), null, false);
// Registration User and Date
$creatorInfo = api_get_user_info($user_data['creator_id']);
@ -409,7 +409,7 @@ if (!$user_data['platform_admin']) {
$group = array ();
$group[] = $form->createElement('radio', 'radio_expiration_date', null, get_lang('Enabled'), 1);
$group[] = $form->createElement('DateTimePicker', 'expiration_date', null, array('onchange' => 'javascript: enable_expiration_date();'));
$form->addGroup($group, 'max_member_group', null, '', false);
$form->addGroup($group, 'max_member_group', null, null, false);
// Active account or inactive account
$form->addElement('radio', 'active', get_lang('ActiveAccount'), get_lang('Active'), 1);

@ -458,13 +458,13 @@ $group = array(
)
);
$form->addGroup($group, '', get_lang('FileType'), '<br/>');
$form->addGroup($group, '', get_lang('FileType'));
$group = array(
$form->createElement('radio', 'sendMail', '', get_lang('Yes'), 1),
$form->createElement('radio', 'sendMail', null, get_lang('No'), 0)
);
$form->addGroup($group, '', get_lang('SendMailToUsers'), '<br/>');
$form->addGroup($group, '', get_lang('SendMailToUsers'));
$form->addElement(
'checkbox',

@ -842,7 +842,7 @@ $form->addElement('select', 'keyword_status', get_lang('Profile'), $status_optio
$active_group = array();
$active_group[] = $form->createElement('checkbox', 'keyword_active', '', get_lang('Active'));
$active_group[] = $form->createElement('checkbox', 'keyword_inactive', '', get_lang('Inactive'));
$form->addGroup($active_group, '', get_lang('ActiveAccount'), '<br/>', false);
$form->addGroup($active_group, '', get_lang('ActiveAccount'), null, false);
$form->addElement('checkbox', 'check_easy_passwords', null, get_lang('CheckEasyPasswords'));

@ -99,7 +99,7 @@ $form = new FormValidator('import_classes');
$form->addElement('file', 'import_file', get_lang('ImportCSVFileLocation'));
$group = array();
$group[] = $form->createElement('radio', 'file_type', '', 'CSV (<a href="example_class.csv" target="_blank">' . get_lang('ExampleCSVFile') . '</a>)', 'csv');
$form->addGroup($group, '', get_lang('FileType'), '<br/>');
$form->addGroup($group, '', get_lang('FileType'), null);
$form->addButtonImport(get_lang('Import'));
if ($form->validate()) {

@ -134,7 +134,7 @@ $group = array(
$form->createElement('radio', 'show_course_in_user_language', null, get_lang('No'), 2),
);
$form->addGroup($group, '', array(get_lang("ShowCourseInUserLanguage")), '');
$form->addGroup($group, '', array(get_lang("ShowCourseInUserLanguage")));
$form->addText('department_name', get_lang('Department'), false);
$form->applyFilter('department_name', 'html_filter');
@ -178,7 +178,7 @@ if (api_get_setting('allow_course_theme') == 'true') {
null,
array('id' => 'course_theme_id')
);
$form->addGroup($group, '', array(get_lang("Stylesheets")), '');
$form->addGroup($group, '', array(get_lang("Stylesheets")));
}
$form->addElement('label', get_lang('DocumentQuota'), format_file_size(DocumentManager::get_course_quota()));
@ -202,7 +202,7 @@ $group[]= $form->createElement('radio', 'visibility', null, get_lang('CourseVisi
if (api_is_platform_admin()) {
$group[]= $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityHidden'), COURSE_VISIBILITY_HIDDEN);
}
$form->addGroup($group, '', array(get_lang("CourseAccess"), get_lang("CourseAccessConfigTip")), '');
$form->addGroup($group, '', array(get_lang("CourseAccess"), get_lang("CourseAccessConfigTip")));
$url = api_get_path(WEB_CODE_PATH)."auth/inscription.php?c=$course_code&e=1";
$url = Display::url($url, $url);
@ -211,12 +211,12 @@ $form->addElement('label', get_lang('DirectLink'), sprintf(get_lang('CourseSetti
$group = array();
$group[]=$form->createElement('radio', 'subscribe', get_lang('Subscription'), get_lang('Allowed'), 1);
$group[]=$form->createElement('radio', 'subscribe', null, get_lang('Denied'), 0);
$form->addGroup($group, '', array(get_lang("Subscription")), '');
$form->addGroup($group, '', array(get_lang("Subscription")));
$group = array();
$group[]=$form->createElement('radio', 'unsubscribe', get_lang('Unsubscription'), get_lang('AllowedToUnsubscribe'), 1);
$group[]=$form->createElement('radio', 'unsubscribe', null, get_lang('NotAllowedToUnsubscribe'), 0);
$form->addGroup($group, '', array(get_lang("Unsubscription")), '');
$form->addGroup($group, '', array(get_lang("Unsubscription")));
$form->addText('course_registration_password', get_lang('CourseRegistrationPassword'), false, array('size' => '60'));
@ -234,7 +234,7 @@ if (api_get_setting('documents_default_visibility_defined_in_course') == 'true')
$form->createElement('radio', 'documents_default_visibility', null, get_lang('Visible'), 'visible'),
$form->createElement('radio', 'documents_default_visibility', null, get_lang('Invisible'), 'invisible')
);
$form->addGroup($group, '', array(get_lang("DocumentsDefaultVisibility")), '');
$form->addGroup($group, '', array(get_lang("DocumentsDefaultVisibility")));
$form->addButtonSave(get_lang('SaveSettings'), 'submit_save');
$form->addElement('html', '</div></div>');
}
@ -246,29 +246,29 @@ $group = array();
$group[]=$form->createElement('radio', 'email_alert_to_teacher_on_new_user_in_course', get_lang('NewUserEmailAlert'), get_lang('NewUserEmailAlertEnable'), 1);
$group[]=$form->createElement('radio', 'email_alert_to_teacher_on_new_user_in_course', null, get_lang('NewUserEmailAlertToTeacharAndTutor'), 2);
$group[]=$form->createElement('radio', 'email_alert_to_teacher_on_new_user_in_course', null, get_lang('NewUserEmailAlertDisable'), 0);
$form->addGroup($group, '', array(get_lang("NewUserEmailAlert")), '');
$form->addGroup($group, '', array(get_lang("NewUserEmailAlert")));
$group = array();
$group[]=$form->createElement('radio', 'email_alert_students_on_new_homework', get_lang('NewHomeworkEmailAlert'), get_lang('NewHomeworkEmailAlertEnable'), 1);
$group[]=$form->createElement('radio', 'email_alert_students_on_new_homework', null, get_lang('NewHomeworkEmailAlertDisable'), 0);
$form->addGroup($group, '', array(get_lang("NewHomeworkEmailAlert")), '');
$form->addGroup($group, '', array(get_lang("NewHomeworkEmailAlert")));
$group = array();
$group[]=$form->createElement('radio', 'email_alert_manager_on_new_doc', null, get_lang('WorkEmailAlertActivateOnlyForTeachers'), 3);
$group[]=$form->createElement('radio', 'email_alert_manager_on_new_doc', null, get_lang('WorkEmailAlertActivateOnlyForStudents'), 2);
$group[]=$form->createElement('radio', 'email_alert_manager_on_new_doc', get_lang('WorkEmailAlert'), get_lang('WorkEmailAlertActivate'), 1);
$group[]=$form->createElement('radio', 'email_alert_manager_on_new_doc', null, get_lang('WorkEmailAlertDeactivate'), 0);
$form->addGroup($group, '', array(get_lang("WorkEmailAlert")), '');
$form->addGroup($group, '', array(get_lang("WorkEmailAlert")));
$group = array();
$group[]=$form->createElement('radio', 'email_alert_on_new_doc_dropbox', get_lang('DropboxEmailAlert'), get_lang('DropboxEmailAlertActivate'), 1);
$group[]=$form->createElement('radio', 'email_alert_on_new_doc_dropbox', null, get_lang('DropboxEmailAlertDeactivate'), 0);
$form->addGroup($group, '', array(get_lang("DropboxEmailAlert")), '');
$form->addGroup($group, '', array(get_lang("DropboxEmailAlert")));
$group = array();
$group[]=$form->createElement('radio', 'email_alert_manager_on_new_quiz', get_lang('QuizEmailAlert'), get_lang('QuizEmailAlertActivate'), 1);
$group[]=$form->createElement('radio', 'email_alert_manager_on_new_quiz', null, get_lang('QuizEmailAlertDeactivate'), 0);
$form->addGroup($group, '', array(get_lang("QuizEmailAlert")), '');
$form->addGroup($group, '', array(get_lang("QuizEmailAlert")));
$form->addButtonSave(get_lang('SaveSettings'), 'submit_save');
$form->addElement('html', '</div></div>');
@ -279,22 +279,22 @@ $form->addElement('html', '<div><h3>'.Display::return_icon('user.png', Security:
$group = array();
$group[]=$form->createElement('radio', 'allow_user_edit_agenda', get_lang('AllowUserEditAgenda'), get_lang('AllowUserEditAgendaActivate'), 1);
$group[]=$form->createElement('radio', 'allow_user_edit_agenda', null, get_lang('AllowUserEditAgendaDeactivate'), 0);
$form->addGroup($group, '', array(get_lang("AllowUserEditAgenda")), '');
$form->addGroup($group, '', array(get_lang("AllowUserEditAgenda")));
$group = array();
$group[]=$form->createElement('radio', 'allow_user_edit_announcement', get_lang('AllowUserEditAnnouncement'), get_lang('AllowUserEditAnnouncementActivate'), 1);
$group[]=$form->createElement('radio', 'allow_user_edit_announcement', null, get_lang('AllowUserEditAnnouncementDeactivate'), 0);
$form->addGroup($group, '', array(get_lang("AllowUserEditAnnouncement")), '');
$form->addGroup($group, '', array(get_lang("AllowUserEditAnnouncement")));
$group = array();
$group[]=$form->createElement('radio', 'allow_user_image_forum', get_lang('AllowUserImageForum'), get_lang('AllowUserImageForumActivate'), 1);
$group[]=$form->createElement('radio', 'allow_user_image_forum', null, get_lang('AllowUserImageForumDeactivate'), 0);
$form->addGroup($group, '', array(get_lang("AllowUserImageForum")), '');
$form->addGroup($group, '', array(get_lang("AllowUserImageForum")));
$group = array();
$group[]=$form->createElement('radio', 'allow_user_view_user_list', get_lang('AllowUserViewUserList'), get_lang('AllowUserViewUserListActivate'), 1);
$group[]=$form->createElement('radio', 'allow_user_view_user_list', null, get_lang('AllowUserViewUserListDeactivate'), 0);
$form->addGroup($group, '', array(get_lang("AllowUserViewUserList")), '');
$form->addGroup($group, '', array(get_lang("AllowUserViewUserList")));
$form->addButtonSave(get_lang('SaveSettings'), 'submit_save');
$form->addElement('html', '</div></div>');
@ -304,7 +304,7 @@ $form->addElement('html', '<div><h3>'.Display::return_icon('chat.png', Security:
$group = array();
$group[]=$form->createElement('radio', 'allow_open_chat_window', get_lang('AllowOpenchatWindow'), get_lang('AllowOpenChatWindowActivate'), 1);
$group[]=$form->createElement('radio', 'allow_open_chat_window', null, get_lang('AllowOpenChatWindowDeactivate'), 0);
$form->addGroup($group, '', array(get_lang("AllowOpenchatWindow")), '');
$form->addGroup($group, '', array(get_lang("AllowOpenchatWindow")));
$form->addButtonSave(get_lang('SaveSettings'), 'submit_save');
$form->addElement('html', '</div></div>');
@ -316,14 +316,14 @@ $group = array();
$group[]=$form->createElement('radio', 'enable_lp_auto_launch', get_lang('LPAutoLaunch'), get_lang('RedirectToALearningPath'), 1);
$group[]=$form->createElement('radio', 'enable_lp_auto_launch', get_lang('LPAutoLaunch'), get_lang('RedirectToTheLearningPathList'), 2);
$group[]=$form->createElement('radio', 'enable_lp_auto_launch', null, get_lang('Deactivate'), 0);
$form->addGroup($group, '', array(get_lang("LPAutoLaunch")), '');
$form->addGroup($group, '', array(get_lang("LPAutoLaunch")));
if (api_get_setting('allow_course_theme') == 'true') {
// Allow theme into Learning path
$group = array();
$group[]=$form->createElement('radio', 'allow_learning_path_theme', get_lang('AllowLearningPathTheme'), get_lang('AllowLearningPathThemeAllow'), 1);
$group[]=$form->createElement('radio', 'allow_learning_path_theme', null, get_lang('AllowLearningPathThemeDisallow'), 0);
$form->addGroup($group, '', array(get_lang("AllowLearningPathTheme")), '');
$form->addGroup($group, '', array(get_lang("AllowLearningPathTheme")));
}
$allowLPReturnLink = api_get_setting('allow_lp_return_link');
@ -344,7 +344,7 @@ if ($allowLPReturnLink === 'true') {
0
)
);
$form->addGroup($group, '', array(get_lang("LpReturnLink")), '');
$form->addGroup($group, '', array(get_lang("LpReturnLink")));
}
$exerciseInvisible = api_get_setting('exercise_invisible_in_session');
@ -369,7 +369,7 @@ if ($exerciseInvisible === 'true' &&
0
)
);
$form->addGroup($group, '', array(get_lang("ExerciseInvisibleInSession")), '');
$form->addGroup($group, '', array(get_lang("ExerciseInvisibleInSession")));
}
@ -398,7 +398,7 @@ $group[]=$form->createElement('radio', 'display_info_advance_inside_homecourse',
$group[]=$form->createElement('radio', 'display_info_advance_inside_homecourse', null, get_lang('DisplayAboutNextAdvanceNotDone'), 2);
$group[]=$form->createElement('radio', 'display_info_advance_inside_homecourse', null, get_lang('DisplayAboutNextAdvanceNotDoneAndLastDoneAdvance'), 3);
$group[]=$form->createElement('radio', 'display_info_advance_inside_homecourse', null, get_lang('DoNotDisplayAnyAdvance'), 0);
$form->addGroup($group, '', array(get_lang("InfoAboutAdvanceInsideHomeCourse")), '');
$form->addGroup($group, '', array(get_lang("InfoAboutAdvanceInsideHomeCourse")));
$form->addButtonSave(get_lang('SaveSettings'), 'submit_save');
$form->addElement('html', '</div></div>');
@ -412,7 +412,7 @@ $group = array(
$form->createElement('radio', 'show_system_folders', null, get_lang('Yes'), 1),
$form->createElement('radio', 'show_system_folders', null, get_lang('No'), 2),
);
$form->addGroup($group, '', array(get_lang("ShowSystemFolders")), '');
$form->addGroup($group, '', array(get_lang("ShowSystemFolders")));
$form->addButtonSave(get_lang('SaveSettings'), 'submit_save');
$form->addElement('html', '</div></div>');
@ -422,7 +422,7 @@ if (api_get_setting('allow_public_certificates')=='true') {
$group = array();
$group[]=$form->createElement('radio', 'allow_public_certificates', get_lang('AllowPublicCertificates'), get_lang('Yes'), 1);
$group[]=$form->createElement('radio', 'allow_public_certificates', null, get_lang('No'), 0);
$form->addGroup($group, '', array(get_lang('AllowPublicCertificates')), '');
$form->addGroup($group, '', array(get_lang('AllowPublicCertificates')));
$form->addButtonSave(get_lang('SaveSettings'), 'submit_save');
$form->addElement('html', '</div></div>');
}
@ -437,7 +437,7 @@ $group = array(
$form->createElement('radio', 'enable_forum_auto_launch', null, get_lang('RedirectToForumList'), 1),
$form->createElement('radio', 'enable_forum_auto_launch', null, get_lang('Disabled'), 2),
);
$form->addGroup($group, '', array(get_lang('EnableForumAutoLaunch')), '');
$form->addGroup($group, '', array(get_lang('EnableForumAutoLaunch')));
$form->addButtonSave(get_lang('SaveSettings'), 'submit_save');
$form->addElement('html', '</div></div>');

@ -1898,7 +1898,7 @@ class Exercise
'2',
array('id' => 'exerciseType_2')
);
$form->addGroup($radios_feedback, null, array(get_lang('FeedbackType'),get_lang('FeedbackDisplayOptions')), '');
$form->addGroup($radios_feedback, null, array(get_lang('FeedbackType'),get_lang('FeedbackDisplayOptions')));
// Type of results display on the final page
$radios_results_disabled = array();
@ -1937,7 +1937,7 @@ class Exercise
array('id' => 'result_disabled_4')
);
$form->addGroup($radios_results_disabled, null, get_lang('ShowResultsToStudents'), '');
$form->addGroup($radios_results_disabled, null, get_lang('ShowResultsToStudents'));
// Type of questions disposition on page
$radios = array();
@ -1945,7 +1945,7 @@ class Exercise
$radios[] = $form->createElement('radio', 'exerciseType', null, get_lang('SimpleExercise'), '1', array('onclick' => 'check_per_page_all()', 'id'=>'option_page_all'));
$radios[] = $form->createElement('radio', 'exerciseType', null, get_lang('SequentialExercise'),'2', array('onclick' => 'check_per_page_one()', 'id'=>'option_page_one'));
$form->addGroup($radios, null, get_lang('QuestionsPerPage'), '');
$form->addGroup($radios, null, get_lang('QuestionsPerPage'));
} else {
// if is Directfeedback but has not questions we can allow to modify the question type
@ -1979,7 +1979,7 @@ class Exercise
$radios_results_disabled[] = $form->createElement('radio', 'results_disabled', null, get_lang('ShowScoreAndRightAnswer'), '0', array('id'=>'result_disabled_0'));
$radios_results_disabled[] = $form->createElement('radio', 'results_disabled', null, get_lang('DoNotShowScoreNorRightAnswer'), '1',array('id'=>'result_disabled_1','onclick' => 'check_results_disabled()'));
$radios_results_disabled[] = $form->createElement('radio', 'results_disabled', null, get_lang('OnlyShowScore'), '2',array('id'=>'result_disabled_2','onclick' => 'check_results_disabled()'));
$result_disable_group = $form->addGroup($radios_results_disabled, null, get_lang('ShowResultsToStudents'),'');
$result_disable_group = $form->addGroup($radios_results_disabled, null, get_lang('ShowResultsToStudents'));
$result_disable_group->freeze();
//we force the options to the DirectFeedback exercisetype
@ -1990,7 +1990,7 @@ class Exercise
$radios[] = $form->createElement('radio', 'exerciseType', null, get_lang('SimpleExercise'), '1', array('onclick' => 'check_per_page_all()', 'id'=>'option_page_all'));
$radios[] = $form->createElement('radio', 'exerciseType', null, get_lang('SequentialExercise'),'2', array('onclick' => 'check_per_page_one()', 'id'=>'option_page_one'));
$type_group = $form->addGroup($radios, null, get_lang('QuestionsPerPage'), '');
$type_group = $form->addGroup($radios, null, get_lang('QuestionsPerPage'));
$type_group->freeze();
}
}
@ -2101,21 +2101,21 @@ class Exercise
$form->createElement('radio', 'display_category_name', null, get_lang('Yes'), '1'),
$form->createElement('radio', 'display_category_name', null, get_lang('No'), '0')
);
$form->addGroup($radio_display_cat_name, null, get_lang('QuestionDisplayCategoryName'), '');
$form->addGroup($radio_display_cat_name, null, get_lang('QuestionDisplayCategoryName'));
// Random answers.
$radios_random_answers = array(
$form->createElement('radio', 'randomAnswers', null, get_lang('Yes'), '1'),
$form->createElement('radio', 'randomAnswers', null, get_lang('No'), '0')
);
$form->addGroup($radios_random_answers, null, get_lang('RandomAnswers'), '');
$form->addGroup($radios_random_answers, null, get_lang('RandomAnswers'));
// Hide question title.
$group = array(
$form->createElement('radio', 'hide_question_title', null, get_lang('Yes'), '1'),
$form->createElement('radio', 'hide_question_title', null, get_lang('No'), '0')
);
$form->addGroup($group, null, get_lang('HideQuestionTitle'), '');
$form->addGroup($group, null, get_lang('HideQuestionTitle'));
} else {
// number of random question

@ -276,7 +276,7 @@ function show_add_forum_form($inputvalues = array(), $lp_id)
$group = array();
$group[] = $form->createElement('radio', 'allow_anonymous', null, get_lang('Yes'), 1);
$group[] = $form->createElement('radio', 'allow_anonymous', null, get_lang('No'), 0);
$form->addGroup($group, 'allow_anonymous_group', get_lang('AllowAnonymousPosts'), ' ');
$form->addGroup($group, 'allow_anonymous_group', get_lang('AllowAnonymousPosts'));
}
$form->addButtonAdvancedSettings('advanced_params');
@ -304,12 +304,12 @@ function show_add_forum_form($inputvalues = array(), $lp_id)
$group = array();
$group[] = $form->createElement('radio', 'moderated', null, get_lang('Yes'), 1);
$group[] = $form->createElement('radio', 'moderated', null, get_lang('No'), 0);
$form->addGroup($group, 'moderated', get_lang('ModeratedForum'), ' ');
$form->addGroup($group, 'moderated', get_lang('ModeratedForum'));
$group = array();
$group[] = $form->createElement('radio', 'students_can_edit', null, get_lang('Yes'), 1);
$group[] = $form->createElement('radio', 'students_can_edit', null, get_lang('No'), 0);
$form->addGroup($group, 'students_can_edit_group', get_lang('StudentsCanEdit'), ' ');
$form->addGroup($group, 'students_can_edit_group', get_lang('StudentsCanEdit'));
$group = array();
$group[] = $form->createElement('radio', 'approval_direct', null, get_lang('Approval'), 1);
@ -322,13 +322,13 @@ function show_add_forum_form($inputvalues = array(), $lp_id)
$group = array();
$group[] = $form->createElement('radio', 'allow_new_threads', null, get_lang('Yes'), 1);
$group[] = $form->createElement('radio', 'allow_new_threads', null, get_lang('No'), 0);
$form->addGroup($group, 'allow_new_threads_group', get_lang('AllowNewThreads'), ' ');
$form->addGroup($group, 'allow_new_threads_group', get_lang('AllowNewThreads'));
$group = array();
$group[] = $form->createElement('radio', 'default_view_type', null, get_lang('Flat'), 'flat');
$group[] = $form->createElement('radio', 'default_view_type', null, get_lang('Threaded'), 'threaded');
$group[] = $form->createElement('radio', 'default_view_type', null, get_lang('Nested'), 'nested');
$form->addGroup($group, 'default_view_type_group', get_lang('DefaultViewType'), ' ');
$form->addGroup($group, 'default_view_type_group', get_lang('DefaultViewType'));
// Drop down list: Groups
$groups = GroupManager::get_group_list();
@ -342,7 +342,7 @@ function show_add_forum_form($inputvalues = array(), $lp_id)
$group = array();
$group[] = $form->createElement('radio', 'public_private_group_forum', null, get_lang('Public'), 'public');
$group[] = $form->createElement('radio', 'public_private_group_forum', null, get_lang('Private'), 'private');
$form->addGroup($group, 'public_private_group_forum_group', get_lang('PublicPrivateGroupForum'), '');
$form->addGroup($group, 'public_private_group_forum_group', get_lang('PublicPrivateGroupForum'));
// Forum image
$form->add_progress_bar();
@ -2726,8 +2726,7 @@ function showUpdateThreadForm($currentForum, $forumSetting, $formValues = '')
[
get_lang('ForumThreadPeerScoring'),
get_lang('ForumThreadPeerScoringComment'),
],
' '
]
);
$form->addElement('html', '</div>');
}
@ -2908,8 +2907,7 @@ function show_add_post_form($current_forum, $forum_setting, $action, $id = '', $
[
get_lang('ForumThreadPeerScoring'),
get_lang('ForumThreadPeerScoringComment'),
],
' '
]
);
$form->addElement('html', '</div>');
$form->addElement('html', '</div>');
@ -3585,8 +3583,7 @@ function show_edit_post_form(
[
get_lang('ForumThreadPeerScoring'),
get_lang('ForumThreadPeerScoringComment'),
],
' '
]
);
$form->addElement('html', '</div>');
@ -3597,7 +3594,7 @@ function show_edit_post_form(
$group[] = $form->createElement('radio', 'status', null, get_lang('Validated'), 1);
$group[] = $form->createElement('radio', 'status', null, get_lang('WaitingModeration'), 2);
$group[] = $form->createElement('radio', 'status', null, get_lang('Rejected'), 3);
$form->addGroup($group, 'status', get_lang('Status'), ' ');
$form->addGroup($group, 'status', get_lang('Status'));
}
$defaults['status']['status'] = isset($current_post['status']) && !empty($current_post['status']) ? $current_post['status'] : 2;

@ -925,15 +925,15 @@ if (isset($first_time) && $first_time==1 && api_is_allowed_to_edit(null,true)) {
if (api_is_allowed_to_edit()) {
$gradebooktable->td_attributes = [
4 => 'class=centered'
4 => 'class="text-center"'
];
} else {
$gradebooktable->td_attributes = [
3 => 'class=centered',
4 => 'class=centered',
5 => 'class=centered',
6 => 'class=centered',
7 => 'class=centered'
3 => 'class="text-right"',
4 => 'class="text-center"',
5 => 'class="text-center"',
6 => 'class="text-center"',
7 => 'class="text-center"'
];
if ($action == 'export_table') {

@ -354,8 +354,8 @@ class GradebookTable extends SortableTable
$ranking = isset($data['ranking']) ? $data['ranking'] : null;
$totalResult = [
$totalResult[0] + $data['result_score_weight'][0],
$totalResult[1] + $data['result_score_weight'][1],
$data['result_score'][0],
$data['result_score'][1],
];
$totalBest = [
@ -364,16 +364,16 @@ class GradebookTable extends SortableTable
];
$totalAverage = [
$totalAverage[0] + $data['average_score'][0],
$totalAverage[1] + $data['average_score'][1],
$data['average_score'][0],
$data['average_score'][1],
];
// Student result
$row[] = $value_data;
$totalResultAverageValue = strip_tags($scoredisplay->display_score($totalResult, SCORE_AVERAGE));
$this->dataForGraph['my_result'][] = (float) str_replace('%', '', $totalResultAverageValue);
$this->dataForGraph['my_result'][] = str_replace('%', '', $totalResultAverageValue);
$totalAverageValue = strip_tags($scoredisplay->display_score($totalAverage, SCORE_AVERAGE));
$this->dataForGraph['average'][] = (float) str_replace('%', '', $totalAverageValue);
$this->dataForGraph['average'][] = str_replace('%', '', $totalAverageValue);
// Ranking
$row[] = $ranking;
// Best
@ -814,7 +814,7 @@ class GradebookTable extends SortableTable
/* Add a border to the picture */
$pChart->drawRectangle(0,0,$xSize-10,$ySize-10,array("R"=>0,"G"=>0,"B"=>0));
$pChart->drawText(10,16,get_lang('Results'),array("FontSize"=>11,"Align"=>TEXT_ALIGN_BOTTOMLEFT));
$pChart->drawText(10,16,get_lang('Results'),array("FontSize"=>11,"Align"=> TEXT_ALIGN_BOTTOMMIDDLE));
$pChart->setGraphArea(50, 30, $xSize-50, $ySize-50);

@ -244,7 +244,7 @@ class GradebookDataGenerator
);
$scoreDisplay = ScoreDisplay :: instance();
$display = $scoreDisplay->display_score($score, SCORE_DIV, SCORE_BOTH, true);
$display = $scoreDisplay->display_score($score, SCORE_DIV_PERCENT_WITH_CUSTOM, SCORE_BOTH, true);
$type = $item->get_item_type();
if ($type == 'L' && get_class($item) == 'ExerciseLink') {
$display = ExerciseLib::show_score($score[0], $score[1], false);
@ -265,7 +265,7 @@ class GradebookDataGenerator
{
$score = $item->calc_score(null, 'average');
$scoreDisplay = ScoreDisplay :: instance();
$display = $scoreDisplay->display_score($score, SCORE_DIV, SCORE_BOTH, true);
$display = $scoreDisplay->display_score($score, SCORE_DIV_PERCENT_WITH_CUSTOM, SCORE_BOTH, true);
$type = $item->get_item_type();
if ($type == 'L' && get_class($item) == 'ExerciseLink') {
@ -293,7 +293,7 @@ class GradebookDataGenerator
$scoreDisplay = null;
if (isset($score[0])) {
$scoreDisplay = ScoreDisplay::instance();
$scoreDisplay = $scoreDisplay->display_score($score, SCORE_DIV, SCORE_BOTH, true);
$scoreDisplay = $scoreDisplay->display_score($score, SCORE_DIV, SCORE_BOTH);
}
return array(
@ -358,7 +358,7 @@ class GradebookDataGenerator
];
//}
$display = $scoredisplay->display_score($score, SCORE_DIV);
$display = $scoredisplay->display_score($score, SCORE_DIV_PERCENT_WITH_CUSTOM);
$type = $item->get_item_type();
if ($type == 'L' && get_class($item) == 'ExerciseLink') {

@ -323,7 +323,7 @@ class ScoreDisplay
$display = $this->display_default($my_score, $type);
}
if ($this->coloring_enabled && $no_color == false) {
if ($this->coloring_enabled && $no_color != false) {
$my_score_denom = isset($score[1]) && !empty($score[1]) ? $score[1] : 1;
$scoreCleaned = isset($score[0]) ? $score[0] : 0;
if (($scoreCleaned / $my_score_denom) < ($this->color_split_value / 100)) {

@ -121,7 +121,7 @@ if (api_get_setting('allow_group_categories') == 'true') {
$form->createElement('select', 'groups_per_user', null, $possible_values),
$form->createElement('static', null, null, get_lang('QtyOfUserCanSubscribe_PartAfterNumber'))
);
$form->addGroup($group, 'limit_group', get_lang('QtyOfUserCanSubscribe_PartBeforeNumber'), ' ', false);
$form->addGroup($group, 'limit_group', get_lang('QtyOfUserCanSubscribe_PartBeforeNumber'), null, false);
$form->addRule('limit_group', get_lang('MaxGroupsPerUserInvalid'), 'callback', 'check_groups_per_user');
// Members per group
@ -131,7 +131,7 @@ if (api_get_setting('allow_group_categories') == 'true') {
$form->createElement('text', 'max_member', null, array('class' => 'span1', 'id' => 'max_member')),
$form->createElement('static', null, null, ' '.get_lang('GroupPlacesThis'))
);
$form->addGroup($group, 'max_member_group', get_lang('GroupLimit'), '', false);
$form->addGroup($group, 'max_member_group', get_lang('GroupLimit'), null, false);
$form->addRule('max_member_group', get_lang('InvalidMaxNumberOfMembers'), 'callback', 'check_max_number_of_members');
$form->addElement('html', '</div>');
@ -155,7 +155,13 @@ $group = array(
$form->createElement('checkbox', 'self_reg_allowed', get_lang('GroupSelfRegistration'), get_lang('GroupAllowStudentRegistration'), 1),
$form->createElement('checkbox', 'self_unreg_allowed', null, get_lang('GroupAllowStudentUnregistration'), 1)
);
$form->addGroup($group, '', Display::return_icon('user.png', get_lang('GroupSelfRegistration'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupSelfRegistration'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('user.png', get_lang('GroupSelfRegistration')) . ' ' . get_lang('GroupSelfRegistration'),
null,
false
);
// Documents settings.
$group = array(
@ -163,7 +169,13 @@ $group = array(
$form->createElement('radio', 'doc_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'doc_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('folder.png', get_lang('GroupDocument'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupDocument'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('folder.png', get_lang('GroupDocument')) . ' ' . get_lang('GroupDocument'),
null,
false
);
// Work settings.
$group = array(
@ -171,7 +183,12 @@ $group = array(
$form->createElement('radio', 'work_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'work_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('work.png', get_lang('GroupWork'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupWork'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('work.png', get_lang('GroupWork'), array(), ICON_SIZE_SMALL) . ' ' . get_lang('GroupWork'),
'',
false);
// Calendar settings.
$group = array(
@ -179,7 +196,13 @@ $group = array(
$form->createElement('radio', 'calendar_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'calendar_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('agenda.png', get_lang('GroupCalendar'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupCalendar'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('agenda.png', get_lang('GroupCalendar')) . ' ' . get_lang('GroupCalendar'),
null,
false
);
$form->addElement('html', '</div>');
$form->addElement('html', '<div class="col-md-6">');
@ -190,7 +213,13 @@ $group = array(
$form->createElement('radio', 'announcements_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'announcements_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('announce.png', get_lang('GroupAnnouncements'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupAnnouncements'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('announce.png', get_lang('GroupAnnouncements')) . ' ' . get_lang('GroupAnnouncements'),
null,
false
);
// Forum settings.
$group = array(
@ -198,7 +227,13 @@ $group = array(
$form->createElement('radio', 'forum_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'forum_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('forum.png', get_lang('GroupForum'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupForum'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('forum.png', get_lang('GroupForum')) . ' ' . get_lang('GroupForum'),
null,
false
);
// Wiki settings.
$group = array(
@ -206,7 +241,13 @@ $group = array(
$form->createElement('radio', 'wiki_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'wiki_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('wiki.png', get_lang('GroupWiki'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupWiki'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('wiki.png', get_lang('GroupWiki')) . ' ' . get_lang('GroupWiki'),
null,
false
);
// Chat settings.
$group = array(
@ -214,7 +255,13 @@ $group = array(
$form->createElement('radio', 'chat_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'chat_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('chat.png', get_lang('Chat'), array(), ICON_SIZE_SMALL).' '.get_lang('Chat'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('chat.png', get_lang('Chat')) . ' ' . get_lang('Chat'),
null,
false
);
$form->addElement('html', '</div>');
$form->addElement('html', '<div class="col-md-12">');

@ -264,7 +264,7 @@ EOT;
$group_el[] = $create_subgroups_form->createElement('static', null, null, get_lang('WithUsersFrom'));
$group_el[] = $create_subgroups_form->createElement('select', 'base_group', null, $base_group_options);
$group_el[] = $create_subgroups_form->createElement('button', 'submit', get_lang('Ok'));
$create_subgroups_form->addGroup($group_el, 'create_groups', null, ' ', false);
$create_subgroups_form->addGroup($group_el, 'create_groups', null, null, false);
$defaults = array();
$defaults['action'] = 'create_subgroups';
$create_subgroups_form->setDefaults($defaults);

@ -187,7 +187,7 @@ $group = array();
$group[] = $form->createElement('radio', 'max_member_no_limit', null, get_lang('MaximumOfParticipants'), 1, array('id' => 'max_member_selected'));
$group[] = $form->createElement('text', 'max_member', null, array('class' => 'span1', 'id' => 'max_member'));
$group[] = $form->createElement('static', null, null, get_lang('GroupPlacesThis'));
$form->addGroup($group, 'max_member_group', null, '', false);
$form->addGroup($group, 'max_member_group', null, null, false);
$form->addRule('max_member_group', get_lang('InvalidMaxNumberOfMembers'), 'callback', 'check_max_number_of_members');
// Self registration
@ -195,42 +195,78 @@ $group = array(
$form->createElement('checkbox', 'self_registration_allowed', get_lang('GroupSelfRegistration'), get_lang('GroupAllowStudentRegistration'), 1),
$form->createElement('checkbox', 'self_unregistration_allowed', null, get_lang('GroupAllowStudentUnregistration'), 1)
);
$form->addGroup($group, '', Display::return_icon('user.png', get_lang('GroupSelfRegistration') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupSelfRegistration'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('user.png', get_lang('GroupSelfRegistration')) . ' ' . get_lang('GroupSelfRegistration'),
null,
false
);
// Documents settings
$group = array();
$group[] = $form->createElement('radio', 'doc_state', get_lang('GroupDocument'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE);
$group[] = $form->createElement('radio', 'doc_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC);
$group[] = $form->createElement('radio', 'doc_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE);
$form->addGroup($group, '', Display::return_icon('folder.png', get_lang('GroupDocument') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupDocument'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('folder.png', get_lang('GroupDocument')).' '.get_lang('GroupDocument'),
null,
false
);
// Work settings
$group = array();
$group[] = $form->createElement('radio', 'work_state', get_lang('GroupWork'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE);
$group[] = $form->createElement('radio', 'work_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC);
$group[] = $form->createElement('radio', 'work_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE);
$form->addGroup($group, '', Display::return_icon('work.png', get_lang('GroupWork') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupWork'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('work.png', get_lang('GroupWork')) . ' ' . get_lang('GroupWork'),
null,
false
);
// Calendar settings
$group = array();
$group[] = $form->createElement('radio', 'calendar_state', get_lang('GroupCalendar'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE);
$group[] = $form->createElement('radio', 'calendar_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC);
$group[] = $form->createElement('radio', 'calendar_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE);
$form->addGroup($group, '', Display::return_icon('agenda.png', get_lang('GroupCalendar') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupCalendar'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('agenda.png', get_lang('GroupCalendar')) . ' ' . get_lang('GroupCalendar'),
null,
false
);
// Announcements settings
$group = array();
$group[] = $form->createElement('radio', 'announcements_state', get_lang('GroupAnnouncements'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE);
$group[] = $form->createElement('radio', 'announcements_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC);
$group[] = $form->createElement('radio', 'announcements_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE);
$form->addGroup($group, '', Display::return_icon('announce.png', get_lang('GroupAnnouncements') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupAnnouncements'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('announce.png', get_lang('GroupAnnouncements')) . ' ' . get_lang('GroupAnnouncements'),
null,
false
);
//Forum settings
$group = array();
$group[] = $form->createElement('radio', 'forum_state', get_lang('GroupForum'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE);
$group[] = $form->createElement('radio', 'forum_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC);
$group[] = $form->createElement('radio', 'forum_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE);
$form->addGroup($group, '', Display::return_icon('forum.png', get_lang('GroupForum') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupForum'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('forum.png', get_lang('GroupForum')) . ' ' . get_lang('GroupForum'),
null,
false
);
// Wiki settings
$group = array(
@ -238,7 +274,13 @@ $group = array(
$form->createElement('radio', 'wiki_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'wiki_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('wiki.png', get_lang('GroupWiki') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupWiki'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('wiki.png', get_lang('GroupWiki')) . ' ' . get_lang('GroupWiki'),
null,
false
);
// Chat settings
$group = array(
@ -246,7 +288,13 @@ $group = array(
$form->createElement('radio', 'chat_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'chat_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('chat.png', get_lang('Chat'), array(), ICON_SIZE_SMALL).' '.get_lang('Chat'), '', false);
$form->addGroup(
$group,
'',
Display::return_icon('chat.png', get_lang('Chat')).' '.get_lang('Chat'),
null,
false
);
// submit button
$form->addButtonSave(get_lang('SaveSettings'), 'submit');

@ -57,7 +57,7 @@ $group = array(
$form->createElement('text', 'max_member', null, array('class' => 'span1', 'id' => 'max_member')),
$form->createElement('static', null, null, ' '.get_lang('GroupPlacesThis'))
);
$form->addGroup($group, 'max_member_group', get_lang('GroupLimit'), '', false);
$form->addGroup($group, 'max_member_group', get_lang('GroupLimit'), null, false);
$form->addRule('max_member_group', get_lang('InvalidMaxNumberOfMembers'), 'callback', 'check_max_number_of_members');
$form->addElement('html', '</div>');
@ -78,7 +78,13 @@ $group = array(
$form->createElement('checkbox', 'self_registration_allowed', get_lang('GroupSelfRegistration'), get_lang('GroupAllowStudentRegistration'), 1),
$form->createElement('checkbox', 'self_unregistration_allowed', null, get_lang('GroupAllowStudentUnregistration'), 1)
);
$form->addGroup($group, '', Display::return_icon('user.png', get_lang('GroupSelfRegistration'), array(), ICON_SIZE_SMALL).'<span>'.get_lang('GroupSelfRegistration').'</span>', '', false);
$form->addGroup(
$group,
'',
Display::return_icon('user.png', get_lang('GroupSelfRegistration')) . '<span>' . get_lang('GroupSelfRegistration') . '</span>',
null,
false
);
// Documents settings
$group = array(
@ -86,7 +92,13 @@ $group = array(
$form->createElement('radio', 'doc_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'doc_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('folder.png', get_lang('GroupDocument'), array(), ICON_SIZE_SMALL).'<span>'.get_lang('GroupDocument').'</span>', '', false);
$form->addGroup(
$group,
'',
Display::return_icon('folder.png', get_lang('GroupDocument')) . '<span>' . get_lang('GroupDocument') . '</span>',
null,
false
);
// Work settings
$group = array(
@ -94,7 +106,13 @@ $group = array(
$form->createElement('radio', 'work_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'work_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('works.png', get_lang('GroupWork'), array(), ICON_SIZE_SMALL).'<span>'.get_lang('GroupWork').'</span>', '', false);
$form->addGroup(
$group,
'',
Display::return_icon('works.png', get_lang('GroupWork')) . '<span>' . get_lang('GroupWork') . '</span>',
null,
false
);
// Calendar settings
$group = array(
@ -102,7 +120,13 @@ $group = array(
$form->createElement('radio', 'calendar_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'calendar_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('agenda.png', get_lang('GroupCalendar'), array(), ICON_SIZE_SMALL).'<span>'.get_lang('GroupCalendar').'</span>', '', false);
$form->addGroup(
$group,
'',
Display::return_icon('agenda.png', get_lang('GroupCalendar')) . '<span>' . get_lang('GroupCalendar') . '</span>',
null,
false
);
$form->addElement('html', '</div>');
$form->addElement('html', '<div class="col-md-6">');
@ -113,7 +137,13 @@ $group = array(
$form->createElement('radio', 'announcements_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'announcements_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('announce.png', get_lang('GroupAnnouncements'), array(), ICON_SIZE_SMALL).'<span>'.get_lang('GroupAnnouncements').'</span>', '', false);
$form->addGroup(
$group,
'',
Display::return_icon('announce.png', get_lang('GroupAnnouncements')) . '<span>' . get_lang('GroupAnnouncements') . '</span>',
null,
false
);
// Forum settings
$group = array(
@ -121,7 +151,13 @@ $group = array(
$form->createElement('radio', 'forum_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'forum_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('forum.png', get_lang('GroupForum'), array(), ICON_SIZE_SMALL).'<span>'.get_lang('GroupForum').'</span>', '', false);
$form->addGroup(
$group,
'',
Display::return_icon('forum.png', get_lang('GroupForum')) . '<span>' . get_lang('GroupForum') . '</span>',
null,
false
);
// Wiki settings
$group = array(
@ -129,7 +165,12 @@ $group = array(
$form->createElement('radio', 'wiki_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'wiki_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('wiki.png', get_lang('GroupWiki'), array(), ICON_SIZE_SMALL).'<span>'.get_lang('GroupWiki').'</span>', '', false);
$form->addGroup(
$group,
'',
Display::return_icon('wiki.png', get_lang('GroupWiki')).'<span>'.get_lang('GroupWiki').'</span>', '',
false
);
// Chat settings
$group = array(
@ -137,7 +178,13 @@ $group = array(
$form->createElement('radio', 'chat_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
$form->createElement('radio', 'chat_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
);
$form->addGroup($group, '', Display::return_icon('chat.png', get_lang('Chat'), array(), ICON_SIZE_SMALL).'<span>'.get_lang('Chat').'</span>', '', false);
$form->addGroup(
$group,
'',
Display::return_icon('chat.png', get_lang('Chat')) . '<span>' . get_lang('Chat') . '</span>',
null,
false
);
$form->addElement('html', '</div>');
$form->addElement('html', '<div class="col-md-12">');

@ -50,7 +50,7 @@ class Certificate extends Model
$this->user_id = !empty($userId) ? $userId : api_get_user_id();
if (empty($certificate_id)) {
if (!empty($certificate_id)) {
$certificate = $this->get($certificate_id);
if (!empty($certificate) && is_array($certificate)) {
$this->certificate_data = $certificate;
@ -76,7 +76,11 @@ class Certificate extends Model
}
//Setting the qr and html variables
if (isset($certificate_id) && !empty($this->certification_user_path)) {
if (
isset($certificate_id) &&
!empty($this->certification_user_path) &&
isset($this->certificate_data['path_certificate'])
) {
$pathinfo = pathinfo($this->certificate_data['path_certificate']);
$this->html_file = $this->certification_user_path.basename($this->certificate_data['path_certificate']);
$this->qr_file = $this->certification_user_path.$pathinfo['filename'].'_qr.png';

@ -904,8 +904,7 @@ class ExtraField extends Model
$form->addGroup(
$group,
'extra_'.$field_details['variable'],
$field_details['display_text'],
''
$field_details['display_text']
);
if (!$admin_permissions) {
if ($field_details['visible'] == 0) {
@ -951,8 +950,7 @@ class ExtraField extends Model
$form->addGroup(
$group,
'extra_'.$field_details['variable'],
$field_details['display_text'],
''
$field_details['display_text']
);
if (!$admin_permissions) {
if ($field_details['visible'] == 0) {
@ -1247,8 +1245,7 @@ class ExtraField extends Model
$form->addGroup(
$group,
'extra_'.$field_details['variable'],
$field_details['display_text'],
'&nbsp;'
$field_details['display_text']
);
if (!$admin_permissions) {
@ -2001,17 +1998,17 @@ EOF;
$group = array();
$group[] = $form->createElement('radio', 'visible', null, get_lang('Yes'), 1);
$group[] = $form->createElement('radio', 'visible', null, get_lang('No'), 0);
$form->addGroup($group, '', get_lang('Visible'), '', false);
$form->addGroup($group, '', get_lang('Visible'), null, false);
$group = array();
$group[] = $form->createElement('radio', 'changeable', null, get_lang('Yes'), 1);
$group[] = $form->createElement('radio', 'changeable', null, get_lang('No'), 0);
$form->addGroup($group, '', get_lang('FieldChangeability'), '', false);
$form->addGroup($group, '', get_lang('FieldChangeability'), null, false);
$group = array();
$group[] = $form->createElement('radio', 'filter', null, get_lang('Yes'), 1);
$group[] = $form->createElement('radio', 'filter', null, get_lang('No'), 0);
$form->addGroup($group, '', get_lang('FieldFilter'), '', false);
$form->addGroup($group, '', get_lang('FieldFilter'), null, false);
/* Enable this when field_loggeable is introduced as a table field (2.0)
$group = array();

@ -100,6 +100,8 @@ class HTML_QuickForm_group extends HTML_QuickForm_element
}
if (isset($separator)) {
$this->_separator = $separator;
} else {
$this->_separator = '';
}
if (isset($appendName)) {
$this->_appendName = $appendName;

@ -4635,7 +4635,7 @@ class UserManager
$option_details[1]
);
}
$form->addGroup($group, 'extra_'.$field_details[1], $field_details[3], '');
$form->addGroup($group, 'extra_'.$field_details[1], $field_details[3]);
if (!$admin_permissions) {
if ($field_details[7] == 0)
$form->freeze('extra_'.$field_details[1]);
@ -4729,7 +4729,7 @@ class UserManager
$group = '';
$group[] = $form->createElement('select', 'extra_'.$field_details[1], '', $values[0], '');
$group[] = $form->createElement('select', 'extra_'.$field_details[1].'*', '', $values['*'], '');
$form->addGroup($group, 'extra_'.$field_details[1], $field_details[3], '&nbsp;');
$form->addGroup($group, 'extra_'.$field_details[1], $field_details[3]);
if (!$admin_permissions) {
if ($field_details[7] == 0)

@ -91,13 +91,13 @@ $auth_sources = 0; //make available wider as we need it in case of form reset (s
$group[] =& $form->createElement('radio', 'password_auto', get_lang('Password'), get_lang('AutoGeneratePassword').'<br />', 1);
$group[] =& $form->createElement('radio', 'password_auto', 'id="radio_user_password"', null, 0);
$group[] =& $form->createElement('password', 'password', null, array('onkeydown' => 'javascript: password_switch_radio_button(document.user_add,"password[password_auto]");'));
$form->addGroup($group, 'password', get_lang('Password'), '');
$form->addGroup($group, 'password', get_lang('Password'));
// Send email
$group = array();
$group[] =& $form->createElement('radio', 'send_mail', null, get_lang('Yes'), 1);
$group[] =& $form->createElement('radio', 'send_mail', null, get_lang('No'), 0);
$form->addGroup($group, 'mail', get_lang('SendMailToNewUser'), '&nbsp;');
$form->addGroup($group, 'mail', get_lang('SendMailToNewUser'));
// Set default values
$defaults = array();

@ -54,7 +54,7 @@ if (isset($_GET['search']) && $_GET['search'] == 'advanced') {
$active_group = array();
$active_group[] = $form->createElement('checkbox', 'active', '', get_lang('Active'));
$active_group[] = $form->createElement('checkbox', 'inactive', '', get_lang('Inactive'));
$form->addGroup($active_group, '', get_lang('ActiveSession'), '<br/>', false);
$form->addGroup($active_group, '', get_lang('ActiveSession'), null, false);
$form->addButtonSearch(get_lang('SearchUsers'));
$defaults['active'] = 1;
$defaults['inactive'] = 1;

Loading…
Cancel
Save