File tree Expand file tree Collapse file tree 3 files changed +3
-25
lines changed Expand file tree Collapse file tree 3 files changed +3
-25
lines changed Original file line number Diff line number Diff line change 31
31
class qtype_combined_multichoice_embedded_renderer extends qtype_renderer
32
32
implements qtype_combined_subquestion_renderer_interface {
33
33
34
- /**
35
- * Renders a sub-question.
36
- *
37
- * @param question_attempt $qa The question attempt.
38
- * @param question_display_options $options Display options for the question.
39
- * @param qtype_combined_combinable_base $subq The sub-question being rendered.
40
- * @param int $placeno The placement number of the sub-question.
41
- */
34
+ #[\Override]
42
35
public function subquestion (question_attempt $ qa ,
43
36
question_display_options $ options ,
44
37
qtype_combined_combinable_base $ subq ,
Original file line number Diff line number Diff line change @@ -76,11 +76,11 @@ public function test_form_validation(): void {
76
76
if (qtype_combined_test_helper::plugin_is_installed ('mod_qbank ' )) {
77
77
$ qbank = $ gen ->create_module ('qbank ' , ['course ' => $ course ->id ]);
78
78
$ context = \context_module::instance ($ qbank ->cmid );
79
- $ contexts = qtype_combined_test_helper:: question_edit_contexts ($ context );
79
+ $ contexts = $ this -> get_question_edit_contexts ($ context );
80
80
$ category = question_get_default_category ($ context ->id , true );
81
81
} else {
82
82
// TODO: remove this once Moodle 5.0 is the lowest supported version.
83
- $ contexts = qtype_combined_test_helper:: question_edit_contexts (\context_course::instance ($ course ->id ));
83
+ $ contexts = $ this -> get_question_edit_contexts (\context_course::instance ($ course ->id ));
84
84
$ category = question_make_default_categories ($ contexts ->all ());
85
85
}
86
86
Original file line number Diff line number Diff line change @@ -847,19 +847,4 @@ public static function plugin_is_installed(string $plugin): bool {
847
847
}
848
848
return true ;
849
849
}
850
-
851
- /**
852
- * Retrieve the context object.
853
- * @param \context $context the current context.
854
- *
855
- * @return question_edit_contexts The context object.
856
- */
857
- public static function question_edit_contexts (\context $ context ): object {
858
- if (class_exists ('\core_question\local\bank\question_edit_contexts ' )) {
859
- $ contexts = new \core_question \local \bank \question_edit_contexts ($ context );
860
- } else {
861
- $ contexts = new \question_edit_contexts ($ context );
862
- }
863
- return $ contexts ;
864
- }
865
850
}
You can’t perform that action at this time.
0 commit comments