Allow hide the certificate export link to students - refs BT#9237

Conflicts:
	main/gradebook/lib/be/category.class.php
1.10.x
Angel Fernando Quiroz Campos 11 years ago
parent 2d368bf75f
commit 44f2b22a8e
  1. 7
      certificates/index.php
  2. 7
      main/gradebook/lib/be/category.class.php
  3. 3
      main/install/configuration.dist.php

@ -18,6 +18,13 @@ $certificate = new Certificate($_GET['id']);
switch ($action) {
case 'export':
if (
api_is_student() &&
api_get_configuration_value('hide_certificate_export_link_students')
) {
api_not_allowed(true);
}
$certificate->generate(array('hide_print_button' => true));
if ($certificate->html_file_is_generated()) {

@ -1859,6 +1859,13 @@ class Category implements GradebookItem
"$url&action=export"
);
if (
api_is_student() &&
api_get_configuration_value('hide_certificate_export_link_students')
) {
$exportToPDF = null;
}
$html = array(
'certificate_link' => $certificates,
'pdf_link' => $exportToPDF

@ -326,4 +326,5 @@ $_configuration['system_stable'] = NEW_VERSION_STABLE;
//$_configuration['limit_session_admin_role'] = false;
// Show session description
//$_configuration['show_session_description'] = false;
// Hide only for students the link to export certificates to PDF
//$_configuration['hide_certificate_export_link_students'] = false;

Loading…
Cancel
Save