From 82932b2cbbd8771a211bddb0ff0f8873f15a6e8b Mon Sep 17 00:00:00 2001 From: Astor Bizard <astor.bizard@grenoble-inp.fr> Date: Wed, 13 May 2020 11:37:46 +0200 Subject: [PATCH] Due date deactivated by default at VPL creation. --- mod_form.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mod_form.php b/mod_form.php index b945f0da..479a6fd2 100644 --- a/mod_form.php +++ b/mod_form.php @@ -33,7 +33,6 @@ class mod_vpl_mod_form extends moodleform_mod { $plugincfg = get_config('mod_vpl'); $mform = & $this->_form; $mform->addElement( 'header', 'general', get_string( 'general', 'form' ) ); - $modname = 'vpl'; $mform->addElement( 'text', 'name', get_string( 'name' ), array ( 'size' => '50' ) ); @@ -51,10 +50,6 @@ class mod_vpl_mod_form extends moodleform_mod { $this->standard_intro_elements( get_string( 'fulldescription', VPL ) ); } $mform->addElement( 'header', 'submissionperiod', get_string( 'submissionperiod', VPL ) ); - $secondsday = 24 * 60 * 60; - $now = time(); - $inittime = round( $now / $secondsday ) * $secondsday + 5 * 60; - $endtime = $inittime + (8 * $secondsday) - 5 * 60; $mform->addElement( 'date_time_selector', 'startdate', get_string( 'startdate', VPL ), array ( 'optional' => true ) ); @@ -63,7 +58,7 @@ class mod_vpl_mod_form extends moodleform_mod { $mform->addElement( 'date_time_selector', 'duedate', get_string( 'duedate', VPL ), array ( 'optional' => true ) ); - $mform->setDefault( 'duedate', $endtime ); + $mform->setDefault( 'duedate', 0 ); $mform->addElement( 'header', 'submissionrestrictions', get_string( 'submissionrestrictions', VPL ) ); $mform->addElement( 'text', 'maxfiles', get_string( 'maxfiles', VPL ) ); -- GitLab