Tracking: add option to hide certificate of achievement and clearer presentation of certificate generation page

pull/4737/head
NicoDucou 2 years ago
parent 0a52fc820a
commit 28728faa32
  1. 2
      main/install/configuration.dist.php
  2. 10
      main/mySpace/access_details_session.php
  3. 11
      main/mySpace/myStudents.php

@ -415,6 +415,8 @@ INSERT INTO extra_field (extra_field_type, field_type, variable, display_text, d
//$_configuration['student_follow_page_add_LP_invisible_checkbox'] = false;
// Show the LP not marked as invisible by teacher in tracking page
//$_configuration['student_follow_page_include_not_subscribed_lp_students'] = false;
// Hide certificate of achievement icon from the student details in course tracking
//$_configuration['course_tracking_student_detail_hide_certificate_of_achievement'] = false;
// Allow change the order to show the tools in "My progress" page.
/*$_configuration['my_progress_course_tools_order'] = [
'order' => ['quizzes', 'learning_paths', 'skills'],

@ -76,8 +76,8 @@ $form = new FormValidator(
null,
['id' => 'myform']
);
$form->addElement('text', 'from', get_lang('From'));
$form->addElement('text', 'to', get_lang('Until'));
$form->addElement('text', 'from', get_lang('From'), ['placeholder' => get_lang('DateFormatddmmyyyy')]);
$form->addElement('text', 'to', get_lang('Until'), ['placeholder' => get_lang('DateFormatddmmyyyy')]);
$form->addHidden('user_id', $userId);
$form->addRule('from', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('from', get_lang('ThisFieldIsRequired').' dd/mm/yyyy', 'callback', 'validateDate');
@ -401,8 +401,8 @@ $formByDay = new FormValidator(
null,
['id' => 'by_day']
);
$formByDay->addElement('text', 'from', get_lang('From'));
$formByDay->addElement('text', 'to', get_lang('Until'));
$formByDay->addElement('text', 'from', get_lang('From'), ['placeholder' => get_lang('DateFormatddmmyyyy')]);
$formByDay->addElement('text', 'to', get_lang('Until'), ['placeholder' => get_lang('DateFormatddmmyyyy')]);
$formByDay->addCheckBox('reduced', null, get_lang('ReducedReport'));
$formByDay->addHidden('user_id', $userId);
$formByDay->addRule('from', get_lang('ThisFieldIsRequired'), 'required');
@ -588,7 +588,7 @@ if ($formByDay->validate()) {
$formByDay->setDefaults(['from' => $startDate, 'to' => $endDate]);
Display::display_header('');
echo Display::page_header(get_lang('DetailsStudentInCourse'));
echo Display::page_header(get_lang('CertificateOfAchievement'),get_lang('CertificateOfAchievementHelp'));
echo Display::page_subheader(
get_lang('User').': '.$userInfo['complete_name']
);

@ -734,11 +734,12 @@ if (!empty($student_id) && empty($courseCode)) {
['class' => 'ajax', 'data-title' => get_lang('ExportToPDF')]
);
}
echo Display::url(
Display::return_icon('activity_monitor.png', get_lang('AccessDetails'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'mySpace/access_details_session.php?user_id='.$student_id
);
if (true !== api_get_configuration_value('course_tracking_student_detail_hide_certificate_of_achievement')) {
echo Display::url(
Display::return_icon('activity_monitor.png', get_lang('AccessDetails'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'mySpace/access_details_session.php?user_id='.$student_id
);
}
if (!empty($user_info['email'])) {
$send_mail = '<a href="mailto:'.$user_info['email'].'">'.

Loading…
Cancel
Save