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

A way to export a single question from the question bank

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4.5, 3.5.2
    • Fix Version/s: 3.6
    • Component/s: Questions
    • Testing Instructions:
      Hide

      Either find a course that already has some questions in the question bank; or make a new course and add some questions (true/false tends to be quickest).

      1. Go to that question bank.
      2. Preview one of the questions.
      3. In the pop-up, click the "Download this question in Moodle XML format" link.
      4. Go to another course.
      5. Go to Question bank -> Import.
      6. Select "Moodle XML format", upload the file you just downloaded, and click the Import button.
      7. The qustion you downloaded should now be in this course.

      Note: You don't need to test the details of the import/export itself. For example it is fine to test with a single question of just one type. All the code for doing the importing and exporting of questions already exists and works. We just need to test that the new UI triggers it correctly.

      Show
      Either find a course that already has some questions in the question bank; or make a new course and add some questions (true/false tends to be quickest). Go to that question bank. Preview one of the questions. In the pop-up, click the "Download this question in Moodle XML format" link. Go to another course. Go to Question bank -> Import. Select "Moodle XML format", upload the file you just downloaded, and click the Import button. The qustion you downloaded should now be in this course. Note: You don't need to test the details of the import/export itself. For example it is fine to test with a single question of just one type. All the code for doing the importing and exporting of questions already exists and works. We just need to test that the new UI triggers it correctly.
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Currently, Moodle question export is geared to exporting a whole category of questions. There are times you just want to export one question (to share with another teacher, to report a bug) and it is a big hassle. You have to move things in the question bank, do the exprot, move things back.

      However, the export back-end is capabile of writing out a single question. We should expose that in the UI. I am planning to add a link to the Preview question pop-up. I diecded it was not good to add yet another icon in the question list in the question bank for this. To my mind it seems fairly natural to open the question and look at it, which confirms it is the one you want, before downloading it.

      The STACK question type has had this feature for some years, and it is extremely useful. Indeed, I have recently found myself hacking the URL to use the STACK code to export other questions, at which point I decided it was time to add this feature to core properly.

        Attachments

          Activity

            People

            • Votes:
              23 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Dec/18