ethz-let / moodle-qtype_drawing

1 stars 6 forks source link

type kprime lang strings #22

Closed aspark21 closed 1 year ago

aspark21 commented 1 year ago

Moodle MOODLE_402_STABLE qtype_drawing master

we don't have qtype_kprime installed. Is this a dependency that needs to be added?

Test creating an drawing question/Create an drawing question with Response format set to 'HTML editor'
And I add a "drawing" question filling the form with:: debugging() message/s found:
Invalid get_string() identifier: 'tasktitle' or component 'qtype_kprime'. Perhaps you are missing $string['tasktitle'] = ''; in /lang/en/qtype_kprime.php?
line 356 of /lib/classes/string_manager_standard.php: call to debugging()
line 7414 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 113 of /question/type/drawing/edit_drawing_form.php: call to get_string()
line 214 of /lib/formslib.php: call to qtype_drawing_edit_form->definition()
line 128 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 218 of /question/type/questiontypebase.php: call to question_edit_form->__construct()
line 203 of /question/bank/editquestion/question.php: call to question_type->create_editing_form()

Invalid get_string() identifier: 'maxpoints' or component 'qtype_kprime'. Perhaps you are missing $string['maxpoints'] = ''; in /lang/en/qtype_kprime.php?
line 356 of /lib/classes/string_manager_standard.php: call to debugging()
line 7414 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 117 of /question/type/drawing/edit_drawing_form.php: call to get_string()
line 214 of /lib/formslib.php: call to qtype_drawing_edit_form->definition()
line 128 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 218 of /question/type/questiontypebase.php: call to question_edit_form->__construct()
line 203 of /question/bank/editquestion/question.php: call to question_type->create_editing_form()

Invalid get_string() identifier: 'stem' or component 'qtype_kprime'. Perhaps you are missing $string['stem'] = ''; in /lang/en/qtype_kprime.php?
line 356 of /lib/classes/string_manager_standard.php: call to debugging()
line 7414 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 121 of /question/type/drawing/edit_drawing_form.php: call to get_string()
line 214 of /lib/formslib.php: call to qtype_drawing_edit_form->definition()
line 128 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 218 of /question/type/questiontypebase.php: call to question_edit_form->__construct()
line 203 of /question/bank/editquestion/question.php: call to question_type->create_editing_form()

Invalid get_string() identifier: 'enterstemhere' or component 'qtype_kprime'. Perhaps you are missing $string['enterstemhere'] = ''; in /lang/en/qtype_kprime.php?
line 356 of /lib/classes/string_manager_standard.php: call to debugging()
line 7414 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 124 of /question/type/drawing/edit_drawing_form.php: call to get_string()
line 214 of /lib/formslib.php: call to qtype_drawing_edit_form->definition()
line 128 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 218 of /question/type/questiontypebase.php: call to question_edit_form->__construct()
line 203 of /question/bank/editquestion/question.php: call to question_type->create_editing_form()
 (Exception)
aspark21 commented 1 year ago

https://github.com/ethz-let/moodle-qtype_drawing/blob/master/edit_drawing_form.php#L113-L124 either those need wrapping so they only get loaded if qtype_kprime is also installed OR dependency needs to be added to https://github.com/ethz-let/moodle-qtype_drawing/blob/master/version.php#L31

nexterday commented 1 year ago

Dear aspark21 - there is no dependency, seems it slipped by language personnel; assuming its the same standard for all of our qtypes. I changed them to point at the lang in drawing plugin.

Thanks for reporting it.