Permalink
Browse files

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

…into MOODLE_21_STABLE
  • Loading branch information...
Sam Hemelryk
Sam Hemelryk committed Apr 30, 2012
2 parents 45bfe33 + 8477740 commit 8374754563129da8dddb6b1bbe9eac5875053c50
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 8374754

Please sign in to comment.