Moodle
  1. Moodle
  2. MDL-28369

hints are not being restored by new question engine code

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical 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:
    • Rank:
      18021

      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.

        Activity

        Hide
        Dan Poltawski added a comment -

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

        Show
        Dan Poltawski added a comment - I think Tim introduced this, so assigning to him for expertise
        Hide
        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
        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
        Petr Škoda added a comment -

        Integrated, thanks.

        Show
        Petr Škoda added a comment - Integrated, thanks.
        Hide
        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 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
        Tim Hunt added a comment -

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

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

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

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

        Thanks Petr, Tim and everyone.

        Show
        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: