Skip to content
Browse files

Merge branch 'MDL-34645_23' of git://github.com/aolley/moodle into MO…

…ODLE_23_STABLE
  • Loading branch information...
2 parents 9d705d4 + 10813a0 commit 3d84e69328368461a3f7a8ce409a6c7bf9e9d700 Sam Hemelryk committed Aug 6, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 enrol/manual/lib.php
View
2 enrol/manual/lib.php
@@ -215,6 +215,7 @@ public function get_manual_enrol_button(course_enrolment_manager $manager) {
$today = time();
$today = make_timestamp(date('Y', $today), date('m', $today), date('d', $today), 0, 0, 0);
$startdateoptions[3] = get_string('today') . ' (' . userdate($today, $timeformat) . ')' ;
+ $defaultduration = $instance->enrolperiod > 0 ? $instance->enrolperiod / 86400 : '';
$modules = array('moodle-enrol_manual-quickenrolment', 'moodle-enrol_manual-quickenrolment-skin');
$arguments = array(
@@ -224,6 +225,7 @@ public function get_manual_enrol_button(course_enrolment_manager $manager) {
'url' => $manager->get_moodlepage()->url->out(false),
'optionsStartDate' => $startdateoptions,
'defaultRole' => $instance->roleid,
+ 'defaultDuration' => $defaultduration,
'disableGradeHistory' => $CFG->disablegradehistory,
'recoverGradesDefault'=> ''
);

0 comments on commit 3d84e69

Please sign in to comment.
Something went wrong with that request. Please try again.