Permalink
Browse files

MDL-32991 - data - Fix to the context call in the preset page

  • Loading branch information...
1 parent efac2d2 commit 1c8dbf72b96bccc591599686fc37bfcac835551f @abgreeve abgreeve committed May 15, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 mod/data/preset.php
View
@@ -44,8 +44,7 @@
$course = $DB->get_record('course', array('id'=>$data->course), '*', MUST_EXIST);
$cm = get_coursemodule_from_instance('data', $data->id, $course->id, null, MUST_EXIST);
}
-
-$context = context_module::instance($cm->id, MUST_EXIST);
+$context = get_context_instance(CONTEXT_MODULE, $cm->id, MUST_EXIST);
require_login($course, false, $cm);
require_capability('mod/data:managetemplates', $context);

0 comments on commit 1c8dbf7

Please sign in to comment.