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

hints are not being restored by new question engine code

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.2
    • Fix Version/s: 2.1.1, 2.2
    • Component/s: Backup, Questions
    • Labels:
    • Testing Instructions:
      Hide

      1. Create some questions with hints in a course.
      2. Backup the course.
      3. Restore the course
      4. Verify that the hints have come through the process correctly.

      Show
      1. Create some questions with hints in a course. 2. Backup the course. 3. Restore the course 4. Verify that the hints have come through the process correctly.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      It seems that hints are not being restored in the new question engine code.

      There is an obvious typos or ommissions in process_question_hint in backup/moodle2/restore_stepslib.php '$newitemid = $DB->insert_record('question_answers', $data);' at line 2486 but I was unable to fix this quickly as I am not that familiar with the restore code.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            poltawski Dan Poltawski added a comment -

            I think Tim introduced this, so assigning to him for expertise

            Show
            poltawski Dan Poltawski added a comment - I think Tim introduced this, so assigning to him for expertise
            Hide
            timhunt Tim Hunt added a comment -

            Doh!

            I think it is as simple as changing question_answers to question_hits as the name of the DB table to insert into, but I will look properly once I get back to work tomorrow.

            Show
            timhunt Tim Hunt added a comment - Doh! I think it is as simple as changing question_answers to question_hits as the name of the DB table to insert into, but I will look properly once I get back to work tomorrow.
            Hide
            skodak Petr Skoda added a comment -

            Integrated, thanks.

            Show
            skodak Petr Skoda added a comment - Integrated, thanks.
            Hide
            marina Marina Glancy added a comment -

            Tim, I created a quiz with multiple-choice question with hints. During backup/restore hints were restored (as I can see in edit question mode). But I did not understand how to view those hints when I make an attempt.

            Show
            marina Marina Glancy added a comment - Tim, I created a quiz with multiple-choice question with hints. During backup/restore hints were restored (as I can see in edit question mode). But I did not understand how to view those hints when I make an attempt.
            Hide
            timhunt Tim Hunt added a comment -

            Hints are only used if you set the quiz to How questions behave: Interactive with multiple tries.

            Show
            timhunt Tim Hunt added a comment - Hints are only used if you set the quiz to How questions behave: Interactive with multiple tries.
            Hide
            skodak Petr Skoda added a comment -

            Thanks everybody, this is now part of the weekly build.

            Show
            skodak Petr Skoda added a comment - Thanks everybody, this is now part of the weekly build.
            Hide
            jamiesensei Jamie Pratt added a comment -

            Thanks Petr, Tim and everyone.

            Show
            jamiesensei Jamie Pratt added a comment - Thanks Petr, Tim and everyone.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  1/Aug/11