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

Deleting the last version of a question in the history view throws warnings and has confusing UX

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.1.5, 4.2.2
    • 4.1.4, 4.2.1
    • Questions
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-78477_401
    • Hide

      Steps:

      1. Go to the Question bank
      2. Add a question
      3. Click on Question Edit > History
      4. The Question history is displayed.
      5. In the History table, click on Question’s Edit menu and select ‘Delete’
      6. Confirm Delete
      7. Verify that no warnings/errors are displayed when there are no items to display in the history table.
      8. And the following message should be displayed in the history view when all the question versions are deleted: 'All versions of this question have been deleted.' 
      9. Then clicking on the Continue button should take us back to the Question bank.
      Show
      Steps: Go to the Question bank Add a question Click on Question Edit > History The Question history is displayed. In the History table, click on Question’s Edit menu and select ‘Delete’ Confirm Delete Verify that no warnings/errors are displayed when there are no items to display in the history table. And the following message should be displayed in the history view when all the question versions are deleted: 'All versions of this question have been deleted.'   Then clicking on the Continue button should take us back to the Question bank.

      When we delete the question from the Question bank history table using question's Edit menu > Delete option and if there are no more questions to display in the history table, then the below mentioned warnings are seen.

      Steps:

      1. Go to the Question bank
      2. Add a question
      3. Click on Question Edit > History
      4. The Question history is displayed.
      5. In the History table, click on Question’s Edit menu and select ‘Delete’
      6. Confirm Delete
      7. Observe that the following warnings are displayed when there are no questions to display in the history table.

      Errors:

      Warning: Attempt to read property "name" on bool in /opt/app/question/bank/history/classes/question_history_view.php on line 191

      Warning: Attempt to read property "qtype" on bool in /opt/app/lib/questionlib.php on line 1135

      Warning: Attempt to read property "qtype" on bool in /opt/app/lib/questionlib.php on line 1139

        1. image-2023-06-14-13-30-09-676.png
          38 kB
          Anupama Sarjoshi
        2. Issue_delete.mp4
          2.54 MB
          Anupama Sarjoshi
        3. MDL-78477.png
          563 kB
          Ron Carl Alfon Yu

            Anupama Sarjoshi Anupama Sarjoshi
            Anupama Sarjoshi Anupama Sarjoshi
            Mahmoud Kassaei Mahmoud Kassaei
            Tim Hunt Tim Hunt
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 55 minutes
                55m

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