From: moodler Date: Fri, 18 Apr 2008 03:33:22 +0000 (+0000) Subject: MDL-11142 Roles upgrade was losing timestart and timeend for teachers and students... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1d19d8a7b35d5e61e222359d4d8363a2b6c7fbd0;p=moodle.git MDL-11142 Roles upgrade was losing timestart and timeend for teachers and students (Merged from 1.7) --- diff --git a/lib/accesslib.php b/lib/accesslib.php index a2d490ff5f..c5473efee5 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -1965,9 +1965,9 @@ function moodle_install_roles() { } if ($teacher->editall) { // editting teacher - role_assign($editteacherrole, $teacher->userid, 0, $coursecontext->id, 0, 0, $hiddenteacher); + role_assign($editteacherrole, $teacher->userid, 0, $coursecontext->id, $teacher->timestart, $teacher->timeend, $hiddenteacher, $teacher->enrol, $teacher->timemodified); } else { - role_assign($noneditteacherrole, $teacher->userid, 0, $coursecontext->id, 0, 0, $hiddenteacher); + role_assign($noneditteacherrole, $teacher->userid, 0, $coursecontext->id, $teacher->timestart, $teacher->timeend, $hiddenteacher, $teacher->enrol, $teacher->timemodified); } $progresscount++; print_progress($progresscount, $totalcount, 5, 1, 'Processing role assignments'); @@ -1991,7 +1991,7 @@ function moodle_install_roles() { // assign the default student role $coursecontext = get_context_instance(CONTEXT_COURSE, $student->course); - role_assign($studentrole, $student->userid, 0, $coursecontext->id); + role_assign($studentrole, $student->userid, 0, $coursecontext->id, $student->timestart, $student->timeend, 0, $student->enrol, $student->time); $progresscount++; print_progress($progresscount, $totalcount, 5, 1, 'Processing role assignments'); }