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

Add list of questions to the "Add a random question" dialog

XMLWordPrintable

    • MOODLE_35_STABLE
    • MOODLE_35_STABLE
    • MDL-61138-master-require-context-id
    • Hide

      Remember to test this new UI in both Boost and Clean themes.

      Set up

      1. Log in as admin
      2. Create a course (c1)
      3. Enrol a teacher (t1) in the course and give them the question sharer role (so that they have access to the course category questions)
      4. Create a quiz activity (quiz1) in c1
      5. View quiz1 and go to the question bank categories
        • cog icon > question bank > categories
      6. Add a sub category (c1 subcategory) to the “Default for c1” category
      7. Go to the questions tab in the question bank
      8. Create 10 questions (doesn’t matter the type) in the “Default for c1” category
        • Name the questions something that identifies the category, such as “c1 cat q1”, “c1 cat q2” etc
        • Give 5 of the questions the tag “c1”
      9. Create 1 question in the “c1 subcategory” category
        • Name it something identifiable like “sub c2 cat q1”
        • Give it the tags “c1” and “sub”
      10. Create 1 question in the category “Default for Miscellaneous”
        • Name it something identifiable like “misc cat q1”
        • Give it the tags “c1” and “misc”

      Testing the preview section

      1. Please test this on both Boost and Clean themes
      2. Log in as t1
      3. Go to quiz1 and edit it
      4. Open the “Add” menu and click “+ a random question” to open the modal
      5. CONFIRM that the modal has two tabs, “Existing category” and “New category”
      6. CONFIRM that each tab has two buttons at the bottom, a cancel button and another button
      7. In the “Existing category” tab modify the filters with various combinations and CONFIRM that the preview section behaves according to the following in each case:
        • There is a sentence stating the number of questions that match the filter, e.g. “There are 10 questions matching this filter” or “There are no questions matching this filter”
        • The sets of questions are displayed in a tabbed list where each page has no more than 5 questions in it
        • The questions displayed match the filters selected, e.g. they have all tags selected, they belong to the category selected, and sub categories aren’t included unless the checkbox is checked

      Regression testing

      Since the modal was moved into a different JavaScript module we need to check that it functions the same as the old dialogue.

      1. Open a version of Moodle without this patch (stable master is fine)
      2. Perform different actions with the old modal and the new one including adding new questions from existing categories, adding new categories, adding to different pages in the quiz, etc. As many combinations as you can think of.
      3. CONFIRM that the new modal is functionally the same as the old modal in all cases.

      Testing the paged content widget

      As part of this issue I’ve added a general set of templates and JavaScript to render paged content. The UX team also has a need to have the paged content controlled using a dropdown (as well as the standard paging bar) so both options are available.

      I’ve created a testing page that renders the paged content in each of the different possible combinations to have a play with (it’s also being used to render the preview list in the random question modal).

      This test requires you to check out the testing commit at the end of my branch:
      git@github.com:ryanwyllie/moodle.git MDL-61138-master-with-test-page
      0574bb03bd043cdc4848cd673b9b2e18f40d1b4b

      1. Log in as admin
      2. Navigate to <your_moodle>/test_paged_content.php
        • Note: sometimes there is an error popup about failing to load templates. That is unrelated to these changes. You’ll need to reload the page if that occurs.
      3. Have a look over each of the content renders and interact with them
      4. CONFIRM that they all work as you expect, changing pages should show more content, pages should be shown and hidden correctly etc

      Internationalisation

      1. Be sure to verify that any number displayed in the UI (E.g. marks) are displayed with the correct type of decimal point character. E.g. 3,14159 in the French lang pack.
      Show
      Remember to test this new UI in both Boost and Clean themes. Set up Log in as admin Create a course (c1) Enrol a teacher (t1) in the course and give them the question sharer role (so that they have access to the course category questions) Create a quiz activity (quiz1) in c1 View quiz1 and go to the question bank categories cog icon > question bank > categories Add a sub category (c1 subcategory) to the “Default for c1” category Go to the questions tab in the question bank Create 10 questions (doesn’t matter the type) in the “Default for c1” category Name the questions something that identifies the category, such as “c1 cat q1”, “c1 cat q2” etc Give 5 of the questions the tag “c1” Create 1 question in the “c1 subcategory” category Name it something identifiable like “sub c2 cat q1” Give it the tags “c1” and “sub” Create 1 question in the category “Default for Miscellaneous” Name it something identifiable like “misc cat q1” Give it the tags “c1” and “misc” Testing the preview section Please test this on both Boost and Clean themes Log in as t1 Go to quiz1 and edit it Open the “Add” menu and click “+ a random question” to open the modal CONFIRM that the modal has two tabs, “Existing category” and “New category” CONFIRM that each tab has two buttons at the bottom, a cancel button and another button In the “Existing category” tab modify the filters with various combinations and CONFIRM that the preview section behaves according to the following in each case: There is a sentence stating the number of questions that match the filter, e.g. “There are 10 questions matching this filter” or “There are no questions matching this filter” The sets of questions are displayed in a tabbed list where each page has no more than 5 questions in it The questions displayed match the filters selected, e.g. they have all tags selected, they belong to the category selected, and sub categories aren’t included unless the checkbox is checked Regression testing Since the modal was moved into a different JavaScript module we need to check that it functions the same as the old dialogue. Open a version of Moodle without this patch (stable master is fine) Perform different actions with the old modal and the new one including adding new questions from existing categories, adding new categories, adding to different pages in the quiz, etc. As many combinations as you can think of. CONFIRM that the new modal is functionally the same as the old modal in all cases. Testing the paged content widget As part of this issue I’ve added a general set of templates and JavaScript to render paged content. The UX team also has a need to have the paged content controlled using a dropdown (as well as the standard paging bar) so both options are available. I’ve created a testing page that renders the paged content in each of the different possible combinations to have a play with (it’s also being used to render the preview list in the random question modal). This test requires you to check out the testing commit at the end of my branch: git@github.com:ryanwyllie/moodle.git MDL-61138 -master-with-test-page 0574bb03bd043cdc4848cd673b9b2e18f40d1b4b Log in as admin Navigate to <your_moodle>/test_paged_content.php Note: sometimes there is an error popup about failing to load templates. That is unrelated to these changes. You’ll need to reload the page if that occurs. Have a look over each of the content renders and interact with them CONFIRM that they all work as you expect, changing pages should show more content, pages should be shown and hidden correctly etc Internationalisation Be sure to verify that any number displayed in the UI (E.g. marks) are displayed with the correct type of decimal point character. E.g. 3,14159 in the French lang pack.

      As a teacher, when searching for questions to add to a 'random question' I see the question with its context clearly visible.

      • I can see the questions listed in the add 'a random question' dialog
      • I can see the counts of questions matching the search criteria for each separate context

        1. randomquestionboost_before.png
          randomquestionboost_before.png
          13 kB
        2. randomquestionboost.png
          randomquestionboost.png
          13 kB
        3. seequestionslink.png
          seequestionslink.png
          7 kB
        4. selectmode_before.png
          selectmode_before.png
          26 kB
        5. selectmode.png
          selectmode.png
          21 kB
        6. templatelist.png
          templatelist.png
          31 kB

            ryanwyllie Ryan Wyllie
            dobedobedoh Andrew Lyons
            Tim Hunt Tim Hunt
            David Monllaó David Monllaó
            Marina Glancy Marina Glancy
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 4 days, 6 hours, 15 minutes
                1w 4d 6h 15m

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