Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-35026

Missing string in multianswer question

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.2.5, 2.3.2
    • 2.2.4, 2.3.1, 2.4
    • Questions
    • MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • Hide

      1. You need a quiz, containing a multianswer question, that has been attempted by students.

      2. Go to the quiz edit page, and edit the multianswer question that is in the quiz. Add an extra subquestion at the end of the quiz. For example, add {:MULTICHOICE:=Yes#Correct~No#We have a different opinion}

      3. Click save changes. The form will re-display with a validation message about "Questions added ...". There should be no missing string errors.

      Show
      1. You need a quiz, containing a multianswer question, that has been attempted by students. 2. Go to the quiz edit page, and edit the multianswer question that is in the quiz. Add an extra subquestion at the end of the quiz. For example, add {:MULTICHOICE:=Yes#Correct~No#We have a different opinion} 3. Click save changes. The form will re-display with a validation message about "Questions added ...". There should be no missing string errors.

      I was editing a multianswer question, using the following question text

      This question consists of some text with an answer embedded right here {1:MULTICHOICE:Wrong answer#Feedback for this wrong answer~Another wrong answer#Feedback for the other wrong answer~=Correct answer#Feedback for correct answer~%50%Answer that gives half the credit#Feedback for half credit answer}
       
      and right after that you will have to deal with this short answer {1:SHORTANSWER:Wrong answer#Feedback for this wrong answer~=Correct answer#Feedback for correct answer~%50%Answer that gives half the credit#Feedback for half credit answer}
       
      and finally we have a floating point number {2:NUMERICAL:=23.8:0.1#Feedback for correct answer 23.8~%50%23.8:2#Feedback for half credit answer in the nearby region of the correct answer}.
       
      The multichoice question can also be shown in the vertical display of the standard moodle multiple choice. {2:MCV:1. Wrong answer#Feedback for this wrong answer~2. Another wrong answer#Feedback for the other wrong answer~=3. Correct answer#Feedback for correct answer~%50%4. Answer that gives half the credit#Feedback for half credit answer}
       
      Or in an horizontal display that is included here in a table {2:MCH:a. Wrong answer#Feedback for this wrong answer~b. Another wrong answer#Feedback for the other wrong answer~=c. Correct answer#Feedback for correct answer~%50%d. Answer that gives half the credit#Feedback for half credit answer}
       
      A shortanswer question where case must match. Write moodle in upper case letters {1:SHORTANSWER_C:moodle#Feedback for moodle in lower case ~=MOODLE#Feedback for MOODLE in upper case ~%50%Moodle#Feedback for only first letter in upper case}
       
      Note that addresses like www.moodle.org and smileys :-) all work as normal:
       
      a) How good is this? {:MULTICHOICE:=Yes#Correct~No#We have a different opinion}
       
      b) What grade would you give it? {3:NUMERICAL:=3:2}

      This wild error appeared!

      Invalid get_string() identifier: 'questionsadded' or component 'qtype_multianswer'. Perhaps you are missing $string['questionsadded'] = ''; in /home/fred/www/repositories/stable_master/moodle/question/type/multianswer/lang/en/qtype_multianswer.php?
      line 6624 of /lib/moodlelib.php: call to debugging()
      line 7248 of /lib/moodlelib.php: call to core_string_manager->get_string()
      line 227 of /question/type/multianswer/edit_multianswer_form.php: call to get_string()
      line 204 of /question/type/edit_question_form.php: call to qtype_multianswer_edit_form->definition_inner()
      line 191 of /lib/formslib.php: call to question_edit_form->definition()
      line 113 of /question/type/edit_question_form.php: call to moodleform->moodleform()
      line 75 of /question/type/multianswer/edit_multianswer_form.php: call to question_edit_form->__construct()
      line 217 of /question/type/questiontypebase.php: call to qtype_multianswer_edit_form->__construct()
      line 200 of /question/question.php: call to question_type->create_editing_form()

      Test pre-requisites

      • Debug level developer
      • A quiz with 6 questions (calculated, numerical, short answer, essay, match, multianswer)
      • 2 attempts submitted to the quiz so that we can't add new questions

      Steps

      1. Edit the quiz
      2. Edit the multianswer question
      3. Change the question text to '.' and click save
      4. You're redirected back on the same page
      5. Now change the question text to the one specified here above
      6. Click on 'Save'
      7. The missing string text appear on the top of the page

            timhunt Tim Hunt
            fred Frédéric Massart
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Adrian Greeve Adrian Greeve
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.