@@ -53,7 +53,7 @@ function lesson_question_page(array $config, \stdClass $course, \stdClass $lesso
5353 });
5454
5555 switch ($ page ->qtype ) {
56- case LESSON_PAGE_SHORTANSWER :
56+ case 1 : // LESSON_PAGE_SHORTANSWER.
5757 $ correctresponses = array_values (
5858 array_map (
5959 function ($ answer ) {
@@ -70,16 +70,16 @@ function($answer) {
7070 $ correctresponses
7171 );
7272 break ;
73- case LESSON_PAGE_ESSAY :
73+ case 10 : // LESSON_PAGE_ESSAY.
7474 $ activity ['definition ' ] = utils \get_activity \definition \cmi \long_fill_in (
7575 $ config ,
7676 $ page ->title ,
7777 utils \get_string_html_removed ($ page ->contents ),
7878 $ courselang
7979 );
8080 break ;
81- case LESSON_PAGE_TRUEFALSE :
82- case LESSON_PAGE_MULTICHOICE :
81+ case 2 : // LESSON_PAGE_TRUEFALSE.
82+ case 3 : // LESSON_PAGE_MULTICHOICE.
8383 $ choices = array_values (
8484 array_map (
8585 function ($ answer ) {
@@ -105,7 +105,7 @@ function($answer) {
105105 $ correctchoices
106106 );
107107 break ;
108- case LESSON_PAGE_MATCHING :
108+ case 5 : // LESSON_PAGE_MATCHING.
109109 $ source = [];
110110 $ target = [];
111111 foreach ($ answers as $ a ) {
@@ -123,7 +123,7 @@ function($answer) {
123123 $ courselang
124124 );
125125 break ;
126- case LESSON_PAGE_NUMERICAL :
126+ case 8 : // LESSON_PAGE_NUMERICAL.
127127 // XAPI Numerical can only have one discrete correct response, or a
128128 // range but lessons do not support ranges, so taking first correct
129129 // answer to cover most cases.
0 commit comments