mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Revert "MDL-37490 Assign: Minor patch cleanup"
This reverts commit 06b9df1145
.
This commit is contained in:
parent
2b46a31a3f
commit
3e69c074ac
4 changed files with 21 additions and 18 deletions
|
@ -42,7 +42,7 @@ class mod_assign_mod_form extends moodleform_mod {
|
|||
* @return void
|
||||
*/
|
||||
public function definition() {
|
||||
global $CFG, $DB, $PAGE;
|
||||
global $CFG, $DB, $PAGE, $OUTPUT;
|
||||
$mform = $this->_form;
|
||||
|
||||
$mform->addElement('header', 'general', get_string('general', 'form'));
|
||||
|
@ -83,7 +83,7 @@ class mod_assign_mod_form extends moodleform_mod {
|
|||
$mform->addHelpButton('allowsubmissionsfromdate', 'allowsubmissionsfromdate', 'assign');
|
||||
$mform->setDefault('allowsubmissionsfromdate', time());
|
||||
|
||||
$name = get_string('duedate', 'assign').$assignment->get_renderer()->help_icon('duedate', 'assign');
|
||||
$name = get_string('duedate', 'assign').$OUTPUT->help_icon('duedate', 'assign');
|
||||
$duedateelements[] = $mform->createElement('date_time_selector', 'duedate', $name);
|
||||
$duedateelements[] = $mform->createElement('checkbox', 'duedateenable', null, get_string('enable'));
|
||||
try {
|
||||
|
@ -97,15 +97,13 @@ class mod_assign_mod_form extends moodleform_mod {
|
|||
} else {
|
||||
$mform->setDefault('duedate', time()+7*24*3600);
|
||||
$mform->setDefault('duedateenable', 0);
|
||||
$mform->setType('duedateenable', PARAM_BOOL);
|
||||
}
|
||||
|
||||
$dddname = get_string('displayduedate', 'assign').$assignment->get_renderer()->help_icon('displayduedate', 'assign');
|
||||
$dddname = get_string('displayduedate', 'assign').$OUTPUT->help_icon('displayduedate', 'assign');
|
||||
$duedateelements[] = $mform->createElement('checkbox', 'displayduedate', null, $dddname);
|
||||
$mform->setDefault('displayduedate', 0);
|
||||
|
||||
$mform->addGroup($duedateelements, 'duedategrp', $name, null, false);
|
||||
$mform->setType('displayduedate', PARAM_BOOL);
|
||||
$mform->disabledIf('duedategrp', 'duedateenable');
|
||||
|
||||
$name = get_string('cutoffdate', 'assign');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue