Permalink
Browse files

MDL-11142 Roles upgrade was losing timestart and timeend for teachers…

… and students :-(
  • Loading branch information...
1 parent 7f3c24f commit fbdc843096b54595f754fae7f64be6bf148468e8 moodler committed Apr 18, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/accesslib.php
View
@@ -1296,9 +1296,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');
@@ -1322,7 +1322,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');
}

0 comments on commit fbdc843

Please sign in to comment.