Merge branch 'MDL-68113-master' of https://github.com/HuongNV13/moodle
[moodle.git] / question / type / ddwtos / renderer.php
index 6d216f0..29ce77d 100644 (file)
@@ -38,11 +38,10 @@ class qtype_ddwtos_renderer extends qtype_elements_embedded_in_question_text_ren
 
     public function formulation_and_controls(question_attempt $qa,
             question_display_options $options) {
-        global $PAGE;
 
         $result = parent::formulation_and_controls($qa, $options);
 
-        $PAGE->requires->js_call_amd('qtype_ddwtos/ddwtos', 'init',
+        $this->page->requires->js_call_amd('qtype_ddwtos/ddwtos', 'init',
                 [$qa->get_outer_question_div_unique_id(), $options->readonly]);
         return $result;
     }