Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 1c8dbf72b96bccc591599686fc37bfcac835551f 1 parent efac2d2
Adrian Greeve authored May 15, 2012

Showing 1 changed file with 1 addition and 2 deletions. Show diff stats Hide diff stats

  1. 3  mod/data/preset.php
3  mod/data/preset.php
@@ -44,8 +44,7 @@
44 44
     $course = $DB->get_record('course', array('id'=>$data->course), '*', MUST_EXIST);
45 45
     $cm = get_coursemodule_from_instance('data', $data->id, $course->id, null, MUST_EXIST);
46 46
 }
47  
-
48  
-$context = context_module::instance($cm->id, MUST_EXIST);
  47
+$context = get_context_instance(CONTEXT_MODULE, $cm->id, MUST_EXIST);
49 48
 require_login($course, false, $cm);
50 49
 
51 50
 require_capability('mod/data:managetemplates', $context);

0 notes on commit 1c8dbf7

Please sign in to comment.
Something went wrong with that request. Please try again.