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

Warning on moving questions when usetags disabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5, 3.5.1, 3.8.3, 3.9
    • Fix Version/s: 3.8.4
    • Component/s: Questions, Tags
    • Labels:
    • Testing Instructions:
      Hide
      1. Login as admin
      2. Ensure that you've "debug" set to developer level and also "debugdisplay" = true (or alternatively look to web server logs).
      3. Navigate to "Administration -> Advanced features" and turn off "Enable tags functionality".
      4. Navigation to any question bank in any course.
      5. Create a couple of question categories (A and B) and a question of any type to category A.
      6. Move the question to category B.
      7. Verify that no errors (of type "Notice: Undefined offset") are shown on screen or the web server logs and the question is effectively moved to category B.
      Show
      Login as admin Ensure that you've "debug" set to developer level and also "debugdisplay" = true (or alternatively look to web server logs). Navigate to "Administration -> Advanced features" and turn off "Enable tags functionality". Navigation to any question bank in any course. Create a couple of question categories (A and B) and a question of any type to category A. Move the question to category B. Verify that no errors (of type "Notice: Undefined offset") are shown on screen or the web server logs and the question is effectively moved to category B.
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE
    • Pull from Repository:
    • Pull 3.8 Branch:
    • Pull Master Branch:
      MDL-63284-master

      Description

      When the Tag functionality (global setting usetags) is disabled, if you try to move a question from a category to another, the following warning is shown:

      Notice: Undefined offset: 7030 in /var/www/.../moodle/lib/questionlib.php on line 584 
      Warning: Invalid argument supplied for foreach() in /var/www/.../moodle/lib/questionlib.php on line 586

       

        Attachments

          Activity

            People

            Assignee:
            Clyxz Martin Hanusch
            Reporter:
            kemmotar Giorgio Riva
            Peer reviewer:
            Tim Hunt
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Anna Carissa Sadia
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Jul/20

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 40 minutes
                40m