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

Something went wrong in the 1.9 => 2.0 migration of the code in charge of marking questions as hidden

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Under 2.0, each time you try to delete one question already in use, it sets the hidden column to 1 (correct) but inmediately after that one error "Was not able to hide question" is thrown.

      Comparing 1.9 and 2.0, it seems that something was wrong in the upgrade of the DB API, as far as set_field() doesn't return false anymore but throws exception directly, so it seems that these lines (1452 and 1453) are 100% unnecessary:

      question_require_capability_on($questionid, 'edit');
      print_error('cannothidequestion', 'question');

      Ciao

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Tester:
            Nobody
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              24/Nov/10