|
@ -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); |
|
|
|
|
|
|
|
|
|
|
|
if (!empty($pluginconfig->enablecalendar)) { |
|
|
$mform->addElement('checkbox', 'calendarevent', '', get_string('calendarevent', 'attendance')); |
|
|
$mform->addElement('checkbox', 'calendarevent', '', get_string('calendarevent', 'attendance')); |
|
|
$mform->addHelpButton('calendarevent', 'calendarevent', 'attendance'); |
|
|
$mform->addHelpButton('calendarevent', 'calendarevent', 'attendance'); |
|
|
// XXX - this should be modified to use a different config setting if we keep enablecalendar's current meaning |
|
|
if (isset($pluginconfig->calendarevent_default)) { |
|
|
$mform->setDefault('calendarevent', get_config('attendance', 'enablecalendar')); |
|
|
$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'))) { |
|
|