Permalink
Browse files

Merge branch 'wip-MDL-36906-MOODLE_22_STABLE' of git://github.com/abg…

…reeve/moodle into MOODLE_22_STABLE
  • Loading branch information...
Sam Hemelryk
Sam Hemelryk committed Dec 9, 2012
2 parents 624e1d1 + 8e223e5 commit e32da64ee478affe73436934a4329c8dd2c4735f
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/data/field/latlong/kml.php
@@ -75,8 +75,10 @@
require_course_login($course, true, $cm);
+$context = context_module::instance($cm->id);
+
/// If it's hidden then it's don't show anything. :)
-if (empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities',get_context_instance(CONTEXT_MODULE, $cm->id))) {
+if (empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities', $context)) {
$PAGE->set_title($data->name);
echo $OUTPUT->header();
notice(get_string("activityiscurrentlyhidden"));

0 comments on commit e32da64

Please sign in to comment.