Browse Source

Allow id number to be enabled/disabled in export form.

nwp90-nwp90-allsessionsreport
Dan Marsden 4 years ago
parent
commit
30f26ee34d
  1. 7
      export_form.php
  2. 2
      settings.php

7
export_form.php

@ -104,10 +104,11 @@ class mod_attendance_export_form extends moodleform {
$ident = array();
$checkedfields = array();
$ident[] =& $mform->createElement('checkbox', 'id', '', get_string('studentid', 'attendance'));
$checkedfields['ident[id]'] = true;
$adminsetfields = get_config('attendance', 'customexportfields');
if (in_array('id', explode(',', $adminsetfields))) {
$ident[] =& $mform->createElement('checkbox', 'id', '', get_string('studentid', 'attendance'));
$checkedfields['ident[id]'] = true;
}
$extrafields = get_extra_user_fields($modcontext);
foreach ($extrafields as $field) {

2
settings.php

@ -106,7 +106,7 @@ if ($ADMIN->fulltree) {
get_string('enablewarnings', 'attendance'),
get_string('enablewarnings_desc', 'attendance'), 0));
$fields = array();
$fields = array('id' => get_string('studentid', 'attendance'));
$customfields = profile_get_custom_fields();
foreach ($customfields as $field) {
$fields[$field->shortname] = $field->name;

Loading…
Cancel
Save