|
@ -125,10 +125,16 @@ class mod_attendance_add_form extends moodleform { |
|
|
array('maxfiles' => EDITOR_UNLIMITED_FILES, 'noclean' => true, 'context' => $modcontext)); |
|
|
array('maxfiles' => EDITOR_UNLIMITED_FILES, 'noclean' => true, 'context' => $modcontext)); |
|
|
$mform->setType('sdescription', PARAM_RAW); |
|
|
$mform->setType('sdescription', PARAM_RAW); |
|
|
|
|
|
|
|
|
$mform->addElement('checkbox', 'calendarevent', '', get_string('calendarevent', 'attendance')); |
|
|
if (!empty($pluginconfig->enablecalendar)) { |
|
|
$mform->addHelpButton('calendarevent', 'calendarevent', 'attendance'); |
|
|
$mform->addElement('checkbox', 'calendarevent', '', get_string('calendarevent', 'attendance')); |
|
|
// XXX - this should be modified to use a different config setting if we keep enablecalendar's current meaning |
|
|
$mform->addHelpButton('calendarevent', 'calendarevent', 'attendance'); |
|
|
$mform->setDefault('calendarevent', get_config('attendance', 'enablecalendar')); |
|
|
if (isset($pluginconfig->calendarevent_default)) { |
|
|
|
|
|
$mform->setDefault('calendarevent', $pluginconfig->calendarevent_default); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
$mform->addElement('hidden', 'calendarevent', 0); |
|
|
|
|
|
$mform->setType('calendarevent', PARAM_INT); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// If warnings allow selector for reporting. |
|
|
// If warnings allow selector for reporting. |
|
|
if (!empty(get_config('attendance', 'enablewarnings'))) { |
|
|
if (!empty(get_config('attendance', 'enablewarnings'))) { |
|
|