Skip to content
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 ead4f18 commit 7ca52615d1b92376e2469ac3e77f7c31baf29000 @ankitagarwal ankitagarwal committed Apr 24, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 course/category.php
View
6 course/category.php
@@ -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 7ca5261

Please sign in to comment.
Something went wrong with that request. Please try again.