Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…ODLE_22_STABLE
  • Loading branch information...
commit 07d8e5cfa7cd990b7e389fd68f634a5d71f86a94 2 parents f5543aa + aef7e75
@samhemelryk samhemelryk authored
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
);
$function = 'M.enrol_manual.quickenrolment.init';
Please sign in to comment.
Something went wrong with that request. Please try again.