Skip to content

Commit

Permalink
IOMAD: ad option to hide/show the completion criteria information in …
Browse files Browse the repository at this point in the history
…the downloaded reports
  • Loading branch information
turf212 committed Apr 26, 2024
1 parent 80d3e65 commit 2c096cf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion local/iomad_settings/lang/en/local_iomad_settings.php
Expand Up @@ -41,7 +41,9 @@
$string['iomadcertificate_borderdesc'] = 'This is the default border image used for the IOMAD Company certificate type. You can override it in the company edit pages. The uploaded image should be 800 pixels x 604 pixels.';
$string['iomadcertificate_watermarkdesc'] = 'This is the default watermark image used for the IOMAD Company certificate type. You can override it in the company edit pages. The uploaded image should be no more than 800 pixels x 604 pixels.';
$string['iomad_allow_username'] = 'Can specify username';
$string['iomad_allow_username_help'] = 'Selecting this will allow the username field to be presented when creating accounts. This will supercede the use email address as username setting.';
$string['iomad_allow_username_help'] = 'Selecting this will allow the username field to be presented when creating accounts. This will supersede the use email address as username setting.';
$string['iomad_downloaddetails'] = 'Download activity details in course completion report.';
$string['iomad_downloaddetails_help'] = 'Selecting this will download all of the details of the course completion criteria for the user as well as their status. Without this selected only their status will be included.';
$string['iomad_hidevalidcourses'] = 'Show only current course results in reports as default';
$string['iomad_hidevalidcourses_help'] = 'This changes the display of the completion reports so that it only shows current course results (ones which have not yet expired or have no expiry) by default.';
$string['iomad_max_list_classrooms'] = 'Maximum listed classrooms';
Expand Down
10 changes: 10 additions & 0 deletions local/iomad_settings/settings.php
Expand Up @@ -86,6 +86,16 @@
get_string('iomad_showcharts', 'local_iomad_settings'),
1));

$settings->add(new admin_setting_configcheckbox('iomad_downloaddetails',
get_string('iomad_downloaddetails', 'local_iomad_settings'),
get_string('iomad_downloaddetails_help', 'local_iomad_settings'),
1));

$settings->add(new admin_setting_configcheckbox('iomad_useicons',
get_string('iomad_useicons', 'local_iomad_settings'),
get_string('iomad_useicons', 'local_iomad_settings'),
0));

$settings->add(new admin_setting_configtext('iomad_emaildelay',
get_string('emaildelay', 'local_iomad_settings'),
get_string('emaildelay_help', 'local_iomad_settings'),
Expand Down
2 changes: 1 addition & 1 deletion local/iomad_settings/version.php
Expand Up @@ -23,5 +23,5 @@

$plugin->release = '4.1.10 (Build: 20240422)'; // Human-friendly version name
$plugin->component = 'local_iomad_settings';
$plugin->version = 2024041900; // The (date) version of this plugin.
$plugin->version = 2024042600; // The (date) version of this plugin.
$plugin->requires = 2019052000; // Requires this Moodle version.
2 changes: 1 addition & 1 deletion local/report_completion/index.php
Expand Up @@ -782,7 +782,7 @@
$completionsqlselect = "";

// Get the completion information if we need it.
if ($table->is_downloading() && $courseid != 1) {
if ($table->is_downloading() && $courseid != 1 && $CFG->iomad_downloaddetails) {
// Get the course completion criteria.
$info = new completion_info(get_course($courseid));
$coursecompletioncrits = $info->get_criteria(null);
Expand Down

0 comments on commit 2c096cf

Please sign in to comment.