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

Strip out question/bank/editquestion/addquestion.php and convert question chooser to templates and ES6

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 2.7
    • Questions, Quiz
    • MOODLE_27_STABLE
    • Hide
      1. Go do the question bank in a course.
      2. Turn on "Show question text in the question list", or something, to get some options in the URL.
      3. Verify that you can create a question.
      4. After you have created a question, verify that you get back to the question bank with the same options in the URL.
      5. As 1-4, but using the question bank on the Edit quiz page.
      6. Add some questions to the quiz, and split the quiz into at least three pages.
      7. Click the Add question... button on a page in the quiz that is neither first nor last..
      8. Verify that the newly created question is added on the right page.

      (Hint: true/false questoins have the fewest required fields to create.)

      Show
      Go do the question bank in a course. Turn on "Show question text in the question list", or something, to get some options in the URL. Verify that you can create a question. After you have created a question, verify that you get back to the question bank with the same options in the URL. As 1-4, but using the question bank on the Edit quiz page. Add some questions to the quiz, and split the quiz into at least three pages. Click the Add question... button on a page in the quiz that is neither first nor last.. Verify that the newly created question is added on the right page. (Hint: true/false questoins have the fewest required fields to create.)

      We no longer need a non-js fallback. Deleting this file will reduce the amount of code we need to maintain. Also, this is some old YUI code that should go.

      Specifically, I think we should:

      1. Change question/bank/editquestion/classes/output/add_new_question.php and the associated template so it just renders a simple button with some data- attributes. Don't render the HTML of the question chooser into the page.
      2. Deprecate editquestion_helper::print_choose_qtype_to_add_form etc, and change rendering of the body of the question chooser dialoge to render a tempate. (Does this need to be a fragment, so in order to get the list of qtypes, or should the data go in a data attribut on the button? either might work, need to work out which is best.)
      3. Replace question/bank/editquestion/yui/src/chooser/js/chooser.js with an ES6 module which makes the Create button and dialogue work.
      4. Search and destroy any remaining usages of question/bank/editquestion/addquestion.php, then delete that file.
      5. Work out why \mod_quiz\output\question_chooser exists, and probably get rid of it.
      6. Make a separate issue for deprecating core\output\chooser and related code, but this is the last use in core.

            Unassigned Unassigned
            timhunt Tim Hunt
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:

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