Permalink
Browse files

MDL-36906 - mod_data: Latitude and Logitude error fix.

Thanks to Marcus Boon for providing a patch for this issue.

mod/data/field/latlong/kml.php was missing a context variable.
This was causing an error when trying to download a kml file for
google earth. This variable has now been included.
  • Loading branch information...
1 parent f42c34a commit 8f3622d89c5205467216a56ced8f3df9cda48189 @abgreeve abgreeve committed Nov 29, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/data/field/latlong/kml.php
View
4 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',context_module::instance($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 8f3622d

Please sign in to comment.