Permalink
Browse files

Merge branch 'MDL-32238-m22' of git://github.com/ankitagarwal/moodle …

…into MOODLE_22_STABLE
  • Loading branch information...
2 parents ba69b69 + 525a464 commit b969338742d41c268226d7ef99c7c9f3b06eb131 Sam Hemelryk committed Apr 30, 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 b969338

Please sign in to comment.