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

Give teachers more flexibility to customise their own view of the question bank

    XMLWordPrintable

Details

    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_403_STABLE
    • MDL-74054_master-behat-fix
    • Hide

      All functionality is also covered in automated tests, /question/bank/columnsortorder/tests/behat/admin_settings.feature and question_bank.feature.

      Set up

      1. Create a course (Course 1)
      2. Navigate to the question bank
      3. Create 2 True/False questions

      Plugin config page (Column sort order ):

      Site Administration > Plugins > Questions bank plugin > Column sort order 

      http://{site}/question/bank/columnsortorder/sortcolumns.php?section=columnsortorder

       

      Question bank page

      Sort Column

      1. Go to the plugin config page (see above)
      2. Using the move icon, drag a column (A) onto the column above (B) :
        • Column A should be inserted before column B
        • Clicking the move icon should also allow the columns to be re-ordered without dragging. This is also keyboard accessible.
      3. Reload the page:
        • Column A should still be before column B
      4. Click "Preview"
        • The question bank table will be displayed with Column A before column B.
      5. Go to Course 1 question bank
        • Column A  should be displayed before column B
      6. Hover over column B's heading
      7. Using the move icon, drag a Column B before Column A
        • Column B should be inserted before column A
        • Expanding the action menu in the column header and clicking "move" also allows the columns to be re-orderd without dragging. This is also keyboard accessible.
      8. Reload the page:
        • Column B should still be before column A
      9. Go to plugin config page, the change we made in question bank should not be reflected on this page:
        • Column B should NOT be before column A

      Hide and show column

      1. Go to plugin config page
      2. In a column (A)'s table row, expand the action menu and select the Remove action.
        • The column should be removed from the list.
        • The "Add column" menu should appear above the list of columns, containing the removed column.
      1. Remove a second column (B).
      2. Click "Preview"
        • The question bank table should be displayed, minus Column A and Column B
      3. Click "Back"
      4. Click "Add column" and select Column A.
        • Column A should be restored to the list. Column B should not.
      5. Go to Course 1 question bank.
        • The question bank table should contain Column A but not column B.
      6. In the header for column A, expand the action list and select "Remove".
        • Column A should be removed.
      7. Expand the "Add columns" list and select "Column B"
        • Column B should be added to the table, Column A should not.
      8. Return to the plugin config page
        • Column A should still be visible in the list, Column B should not.

      Resize column

      1. Go to the plugin config page
      2. Enter a width less than 10 for the Question column.
        • An error message should be displayed
      1. Reload the page
        • The Question column's with field should show the "Auto" placeholder, the invalid value was not saved.
      2. Enter a width of 300 for the Question column
      3. Reload the page
        • The value of 300 should still appear for the Question column.
      4. Click "Preview"
        • The Question column should appear at 300px wide.
      5. Go to Course 1 question bank.
        • The Question column should appear at 300px wide.
      6. Hover over the Question column's header
      7. Drag the resize handle to make the Question column much wider.
        • Expanding the action menu in the column header and clicking "Resize" also allows the columns to be resized without dragging. This is also keyboard accessible.
      8. Reload the page
        • The Question column should still appear at the new wider width.
      9. Return to the plugin config page
        • The Question column's width should still show 300.

      Reset

      1. Go to the plugin config page
      2. Remove some columns, reorder columns and set column widths.
      3. Go to Course 1 question bank.
      4. Make further changes to the order, visibility and width of columns.
      5. Press "Reset columns"
        • Columns should return to the state set on the plugin config page.
      6. Add all hidden columns to the page. This is a special case as it sets the user preference to an empty value, but it should still override the site-level config which is not empty.
      7. Press "Reset columns"
        • Columns should return to the state set on the plugin config page.
      8. Return to the plugin config page
      9. Press "Reset columns"
        • All columns should be visible, in the original order, with column widths showing the "Auto" placeholder.
      Show
      All functionality is also covered in automated tests, /question/bank/columnsortorder/tests/behat/admin_settings.feature and question_bank.feature. Set up Create a course (Course 1) Navigate to the question bank Create 2 True/False questions Plugin config page (Column sort order ): Site Administration > Plugins > Questions bank plugin > Column sort order  http://{site}/question/bank/columnsortorder/sortcolumns.php?section=columnsortorder   Question bank page Sort Column Go to the plugin config page (see above) Using the move icon, drag a column (A) onto the column above (B) : Column A should be inserted before column B Clicking the move icon should also allow the columns to be re-ordered without dragging. This is also keyboard accessible. Reload the page: Column A should still be before column B Click "Preview" The question bank table will be displayed with Column A before column B. Go to Course 1 question bank Column A  should be displayed before column B Hover over column B's heading Using the move icon, drag a Column B before Column A Column B should be inserted before column A Expanding the action menu in the column header and clicking "move" also allows the columns to be re-orderd without dragging. This is also keyboard accessible. Reload the page: Column B should still be before column A Go to plugin config page, the change we made in question bank should not be reflected on this page: Column B should NOT be before column A Hide and show column Go to plugin config page In a column (A)'s table row, expand the action menu and select the Remove action. The column should be removed from the list. The "Add column" menu should appear above the list of columns, containing the removed column. Remove a second column (B). Click "Preview" The question bank table should be displayed, minus Column A and Column B Click "Back" Click "Add column" and select Column A. Column A should be restored to the list. Column B should not. Go to Course 1 question bank. The question bank table should contain Column A but not column B. In the header for column A, expand the action list and select "Remove". Column A should be removed. Expand the "Add columns" list and select "Column B" Column B should be added to the table, Column A should not. Return to the plugin config page Column A should still be visible in the list, Column B should not. Resize column Go to the plugin config page Enter a width less than 10 for the Question column. An error message should be displayed Reload the page The Question column's with field should show the "Auto" placeholder, the invalid value was not saved. Enter a width of 300 for the Question column Reload the page The value of 300 should still appear for the Question column. Click "Preview" The Question column should appear at 300px wide. Go to Course 1 question bank. The Question column should appear at 300px wide. Hover over the Question column's header Drag the resize handle to make the Question column much wider. Expanding the action menu in the column header and clicking "Resize" also allows the columns to be resized without dragging. This is also keyboard accessible. Reload the page The Question column should still appear at the new wider width. Return to the plugin config page The Question column's width should still show 300. Reset Go to the plugin config page Remove some columns, reorder columns and set column widths. Go to Course 1 question bank. Make further changes to the order, visibility and width of columns. Press "Reset columns" Columns should return to the state set on the plugin config page. Add all hidden columns to the page. This is a special case as it sets the user preference to an empty value, but it should still override the site-level config which is not empty. Press "Reset columns" Columns should return to the state set on the plugin config page. Return to the plugin config page Press "Reset columns" All columns should be visible, in the original order, with column widths showing the "Auto" placeholder.

    Description

      The agreed scope of this issue for 4.3 is as follows:

      • Column sort order admin screen:
        • Add controls to set the default width of each column
        • Add action menu with an option to hide a column to hide the column by default
        • Add an "Add columns" menu to add back any hidden columns
        • Add a preview to show an example of the question bank table with the configured defaults
      • Question bank teacher view:
        • Add an action menu to each column header with options to hide, move or resize the column, providing keyboard-accessible interfaces.
        • Add draggable move and resize icons to each column header that appear on hover.
        • Add an "Add columns" menu to add back any hidden columns.
        • Adding overflow scrolling to the table, so it scrolls within the available page width.

      Out of scope for this issue, but will be addressed later through separate issues:

      • Combining the checkbox, type and question name into a single column.
      • Hiding some columns by default on new installs, to provide a cleaner interface for the most common use cases.
      • Fixing any inconsistencies with table styling in other areas of Moodle.
      • Add column pinning/freezing
      • Change the bulk edit UI to use the sticky footer widget, following the bulk edit on the course page.

      The UI mockups (including all of the above) can be seen here:

      Attachments

        1. Screenshot from 2022-11-16 13-48-18.png
          Screenshot from 2022-11-16 13-48-18.png
          278 kB
        2. Screenshot from 2022-11-16 13-14-35.png
          Screenshot from 2022-11-16 13-14-35.png
          69 kB
        3. Screenshot from 2022-11-16 13-15-24.png
          Screenshot from 2022-11-16 13-15-24.png
          77 kB
        4. Screenshot from 2022-11-16 09-25-58.png
          Screenshot from 2022-11-16 09-25-58.png
          127 kB
        5. Screenshot from 2022-11-16 13-52-33.png
          Screenshot from 2022-11-16 13-52-33.png
          322 kB
        6. Screenshot from 2022-11-16 09-25-03.png
          Screenshot from 2022-11-16 09-25-03.png
          155 kB
        7. admin1.png
          admin1.png
          95 kB
        8. admin2-resize.png
          admin2-resize.png
          95 kB
        9. admin3-resizemodal.png
          admin3-resizemodal.png
          98 kB
        10. admin4-pinned.png
          admin4-pinned.png
          86 kB
        11. admin5-reorder.png
          admin5-reorder.png
          96 kB
        12. admin6-showhide.png
          admin6-showhide.png
          93 kB
        13. questionbank.png
          questionbank.png
          91 kB
        14. mdl-74054.webm
          3.29 MB
        15. reset.png
          reset.png
          893 kB
        16. hide and show column.png
          hide and show column.png
          701 kB
        17. pin column.png
          pin column.png
          737 kB
        18. resize column.png
          resize column.png
          1.47 MB
        19. sort column.png
          sort column.png
          849 kB
        20. queestionpinnotworking.gif
          queestionpinnotworking.gif
          1.53 MB
        21. dropdown-pin.png
          dropdown-pin.png
          34 kB
        22. dropdrown-nopin.png
          dropdrown-nopin.png
          65 kB
        23. screenshot-1.png
          screenshot-1.png
          265 kB
        24. screenshot-2.png
          screenshot-2.png
          68 kB
        25. MDL-74054-Reset.png
          MDL-74054-Reset.png
          729 kB
        26. MDL-74054- Hide and show column.png
          MDL-74054- Hide and show column.png
          1.09 MB
        27. MDL-74054-Sort Column.png
          MDL-74054-Sort Column.png
          1.10 MB
        28. MDL-74054-resize Column.png
          MDL-74054-resize Column.png
          1.19 MB
        29. 2023-09-23 , 14_50_47 - Edit questions _ Moodle QA Testing Site — Mozilla Firefox.png
          2023-09-23 , 14_50_47 - Edit questions _ Moodle QA Testing Site — Mozilla Firefox.png
          106 kB

        Issue Links

          Activity

            People

              Votes:
              4 Vote for this issue
              Watchers:
              30 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 1 day, 5 hours, 22 minutes
                  1w 1d 5h 22m

                  Clockify

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