Permalink
Browse files

MDL-32238 course: Timemodifed should be updated when a course's visib…

…le status is toggled from the category page
  • Loading branch information...
1 parent 93fb7b5 commit 525a4642cd9e510f104a71d67d63e6ef8c75ccfa @ankitagarwal ankitagarwal committed Apr 24, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 course/category.php
View
@@ -131,10 +131,8 @@
if ($course) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('moodle/course:visibility', $coursecontext);
- // Set the visibility of the course
- $DB->set_field('course', 'visible', $visible, array('id' => $course->id));
- // we set the old flag when user manually changes visibility of course
- $DB->set_field('course', 'visibleold', $visible, array('id' => $course->id));
+ // Set the visibility of the course. we set the old flag when user manually changes visibility of course.
+ $DB->update_record('course', array('id' => $course->id, 'visible' => $visible, 'visibleold' => $visible, 'timemodified' => time()));
}
}

0 comments on commit 525a464

Please sign in to comment.