Skip to content

Commit

Permalink
MDL-32991 - data - Fix to the context call in the preset page
Browse files Browse the repository at this point in the history
  • Loading branch information
abgreeve committed May 15, 2012
1 parent efac2d2 commit 1c8dbf7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mod/data/preset.php
Expand Up @@ -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);
Expand Down

0 comments on commit 1c8dbf7

Please sign in to comment.