some changes to events to make grade_added work

This commit is contained in:
toyomoyo
2007-05-15 03:19:01 +00:00
parent 3b98c475cd
commit 9492291c82
4 changed files with 22 additions and 13 deletions
+2 -2
View File
@@ -2292,11 +2292,11 @@ function role_unassign($roleid=0, $userid=0, $groupid=0, $contextid=0, $enrol=NU
*/
function enrol_into_course($course, $user, $enrol) {
$timestart = time();
if ($course->enrolperiod) {
$timestart = time();
$timeend = time() + $course->enrolperiod;
} else {
$timestart = $timeend = 0;
$timeend = 0;
}
if ($role = get_default_course_role($course)) {