Moodle
  1. Moodle
  2. MDL-29064

"Question text" field in "Embedded answer (cloze)" question should be required text

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Questions
    • Labels:
      None
    • Testing Instructions:
      Hide

      1. Create a multianswer (Embedded answer) question.
      2. Make sure "Question text" is shown as "Required" field (Red with asterisk)
      3. Try submit form with all required fields except "Question text" and see if it gets validated by JS/Quickform code.

      However, note that client-side validation of HTML editor fields does not work I guess that is a separate bug.

      Show
      1. Create a multianswer (Embedded answer) question. 2. Make sure "Question text" is shown as "Required" field (Red with asterisk) 3. Try submit form with all required fields except "Question text" and see if it gets validated by JS/Quickform code. However, note that client-side validation of HTML editor fields does not work I guess that is a separate bug.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      18752

      Description

      While creating a "Embedded answer (cloze)" question "Question text" is required.
      But it is not visible as required field.

        Issue Links

          Activity

          Hide
          Tim Hunt added a comment -

          Note that client-side validation of HTML editor fields is currently broken. I guess since we switched to TinyMCE. I suppose we need a separate bug-report about that, if it is not already reported.

          Show
          Tim Hunt added a comment - Note that client-side validation of HTML editor fields is currently broken. I guess since we switched to TinyMCE. I suppose we need a separate bug-report about that, if it is not already reported.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Found MDL-28987 about to add client-side validation of TinyMCE fields.

          Show
          Eloy Lafuente (stronk7) added a comment - Found MDL-28987 about to add client-side validation of TinyMCE fields.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          Hide
          Sam Hemelryk added a comment -

          Hi guys,

          I'm passing this test as it does work, however I did note that there are noticed when saving a multianswer question in master presently.
          You get the notices even if the question is created successfully.

          Invalid array parameter detected in required_param(): questiontext

          line 555 of /lib/moodlelib.php: call to debugging()
          line 94 of /question/type/multianswer/edit_multianswer_form.php: call to optional_param()
          line 165 of /question/type/edit_question_form.php: call to qtype_multianswer_edit_form->definition_inner()
          line 154 of /lib/formslib.php: call to question_edit_form->definition()
          line 80 of /question/type/edit_question_form.php: call to moodleform->moodleform()
          line 79 of /question/type/multianswer/edit_multianswer_form.php: call to question_edit_form->__construct()
          line 231 of /question/type/questiontypebase.php: call to qtype_multianswer_edit_form->__construct()
          line 197 of /question/question.php: call to question_type->create_editing_form()

          Invalid array parameter detected in required_param(): questiontext

          line 555 of /lib/moodlelib.php: call to debugging()
          line 96 of /question/type/multianswer/edit_multianswer_form.php: call to optional_param()
          line 165 of /question/type/edit_question_form.php: call to qtype_multianswer_edit_form->definition_inner()
          line 154 of /lib/formslib.php: call to question_edit_form->definition()
          line 80 of /question/type/edit_question_form.php: call to moodleform->moodleform()
          line 79 of /question/type/multianswer/edit_multianswer_form.php: call to question_edit_form->__construct()
          line 231 of /question/type/questiontypebase.php: call to qtype_multianswer_edit_form->__construct()
          line 197 of /question/question.php: call to question_type->create_editing_form()

          Tim is this something you are aware of or shall I create an issue for you?

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Hi guys, I'm passing this test as it does work, however I did note that there are noticed when saving a multianswer question in master presently. You get the notices even if the question is created successfully. Invalid array parameter detected in required_param(): questiontext line 555 of /lib/moodlelib.php: call to debugging() line 94 of /question/type/multianswer/edit_multianswer_form.php: call to optional_param() line 165 of /question/type/edit_question_form.php: call to qtype_multianswer_edit_form->definition_inner() line 154 of /lib/formslib.php: call to question_edit_form->definition() line 80 of /question/type/edit_question_form.php: call to moodleform->moodleform() line 79 of /question/type/multianswer/edit_multianswer_form.php: call to question_edit_form->__construct() line 231 of /question/type/questiontypebase.php: call to qtype_multianswer_edit_form->__construct() line 197 of /question/question.php: call to question_type->create_editing_form() Invalid array parameter detected in required_param(): questiontext line 555 of /lib/moodlelib.php: call to debugging() line 96 of /question/type/multianswer/edit_multianswer_form.php: call to optional_param() line 165 of /question/type/edit_question_form.php: call to qtype_multianswer_edit_form->definition_inner() line 154 of /lib/formslib.php: call to question_edit_form->definition() line 80 of /question/type/edit_question_form.php: call to moodleform->moodleform() line 79 of /question/type/multianswer/edit_multianswer_form.php: call to question_edit_form->__construct() line 231 of /question/type/questiontypebase.php: call to qtype_multianswer_edit_form->__construct() line 197 of /question/question.php: call to question_type->create_editing_form() Tim is this something you are aware of or shall I create an issue for you? Cheers Sam
          Hide
          Rajesh Taneja added a comment -

          Hello Sam,

          I think this is related to MDL-26796.

          Cheers
          Rajesh

          Show
          Rajesh Taneja added a comment - Hello Sam, I think this is related to MDL-26796 . Cheers Rajesh
          Hide
          Sam Hemelryk added a comment -

          That's right, that is issue that had lead to this notice appearing now.

          Show
          Sam Hemelryk added a comment - That's right, that is issue that had lead to this notice appearing now.
          Hide
          Tim Hunt added a comment -

          Why don't you create an issue for Petr, who made this change, and said he had gone through the code and was sure there would not be any regressions?

          I like the testing instructions on MDL-26796

          Show
          Tim Hunt added a comment - Why don't you create an issue for Petr, who made this change, and said he had gone through the code and was sure there would not be any regressions? I like the testing instructions on MDL-26796
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Instructions @ MDL-26796 are, indeed, a good example, lol.

          BTW, dod you know that "vague" in Spanish is "vago" and that word, apart from "vague" also means "lazy"

          My fault, I was really relaxed last week with testing instructions but really in that case I could not imagine how to improve them (as far as really the change affects the whole thing).

          And yes, +1 for new issue, straight to Petr. Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Instructions @ MDL-26796 are, indeed, a good example, lol. BTW, dod you know that "vague" in Spanish is "vago" and that word, apart from "vague" also means "lazy" My fault, I was really relaxed last week with testing instructions but really in that case I could not imagine how to improve them (as far as really the change affects the whole thing). And yes, +1 for new issue, straight to Petr. Ciao
          Hide
          Sam Hemelryk added a comment -

          I've created MDL-29175 for the notices I noticed

          Show
          Sam Hemelryk added a comment - I've created MDL-29175 for the notices I noticed
          Hide
          Eloy Lafuente (stronk7) added a comment -

          git & cvs repositories have been populated with this solution. Many thanks for your collaboration, yay!

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - git & cvs repositories have been populated with this solution. Many thanks for your collaboration, yay! Closing, ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: