Skip to content

Commit

Permalink
Merge branch 'MDL-32238-master' of git://github.com/ankitagarwal/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Apr 30, 2012
2 parents c547c7c + 7ca5261 commit b5aa514
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions course/category.php
Expand Up @@ -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()));
}
}

Expand Down

0 comments on commit b5aa514

Please sign in to comment.