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

Add support for course level tags when importing and exporting question

XMLWordPrintable

    • MOODLE_35_STABLE
    • MOODLE_35_STABLE
    • MDL-61410-master
    • Hide

      Setup

      Create categories and questions

      1. Log in as admin
      2. Create 2 courses, c1 and c2
      3. View c1
      4. Create a quiz activity called “quiz1”
      5. View quiz1
      6. View the question bank categories
        • Edit cog > question bank > categories
      7. Add a new category called “cat with course tags”
        • Set the “Parent category” to “Default for System”
      8. Add a new category called “cat without course tags”
        • Set the “Parent category” to “Default for System”
      9. Click the “Questions” tab
      10. Change “Select a category” to “cat with course tags”
      11. Click “Create a new question” to create a question in the system context (it doesn’t matter what type of question you create)
        • Make sure “Category” is set to “cat with course tags”
        • Set the question name to “q with course tags”
        • Enter some question text "q with course tags"
        • In the “Tags” section add a tag called “q tag”
        • In the “Course: <course name> tags” section add a tag called “c tag”
        • Save changes
      12. Change “Select a category” to “cat without course tags”
      13. Click “Create a new question” to create a question in the system context (it doesn’t matter what type of question you create)
        • Make sure “Category” is set to “cat without course tags”
        • Set the question name to “q without course tags”
        • Enter some question text "q without course tags"
        • In the “Tags” section add a tag called “q tag”
        • Don’t add any tags to the “Course: <course name> tags” section
        • Save changes
      14. Change “Select a category” to “Default for c1”
      15. Click “Create a new question” to create a question in the course context (it doesn’t matter what type of question you create)
        • Make sure “Category” is set to “Default for c1”
        • Set the question name to “course q”
        • Enter some question text "course q"
        • In the “Tags” section add a tag called “c1 tag”
        • Save changes

      Exporting category with course tags

      1. Go to the question bank export tab
      2. Select “Moodle XML format” as the file format
      3. Set the “Export category” to “cat with course tags”
      4. Uncheck “Write category to file”
      5. Click “Export questions to file”
      6. Rename the downloaded file to “cat with course tags” to make it easier to reference

      Exporting category without course tags

      1. Go to the question bank export tab
      2. Select “Moodle XML format” as the file format
      3. Set the “Export category” to “cat without course tags”
      4. Uncheck “Write category to file”
      5. Click “Export questions to file”
      6. Rename the downloaded file to “cat without course tags” to make it easier to reference

      Exporting course question

      1. Go to the question bank export tab
      2. Select “Moodle XML format” as the file format
      3. Set the “Export category” to “Default for c1”
      4. Uncheck “Write category to file”
      5. Click “Export questions to file”
      6. Rename the downloaded file to “course question” to make it easier to reference

      Tests

      Import course tags into system context

      1. View c1
      2. Go to the question bank import tab
      3. Set the file format to “Moodle XML format”
      4. Under the “General” section set:
        • Import category to “Default for system”
        • Uncheck “Get category from file”
      5. Add the “cat with course tags” XML file to the import page
      6. Click “Import”
      7. View the questions tab
      8. Set “Select a category” to “Default for System”
      9. Uncheck “Also show questions from sub categories”
      10. CONFIRM that you see the imported question “q with course tags”
      11. Edit the question
      12. CONFIRM that you see “q tag” in the “Tags” section
      13. CONFIRM that you see “c tag” in the “Course: <course name> tags” section
      14. Click “Cancel”
      15. Delete the question

      Import course tags into category context

      1. View c1
      2. Go to the question bank import tab
      3. Set the file format to “Moodle XML format”
      4. Under the “General” section set:
        • Import category to “Default for Miscellaneous”
        • Uncheck “Get category from file”
      5. Add the “cat with course tags” XML file to the import page
      6. Click “Import”
      7. View the questions tab
      8. Set “Select a category” to “Default for Miscellaneous”
      9. Uncheck “Also show questions from sub categories”
      10. CONFIRM that you see the imported question “q with course tags”
      11. Edit the question
      12. CONFIRM that you see “q tag” in the “Tags” section
      13. CONFIRM that you see “c tag” in the “Course: <course name> tags” section
      14. Click “Cancel”
      15. Delete the question

      Import course tags into course context

      1. View c1
      2. Go to the question bank import tab
      3. Set the file format to “Moodle XML format”
      4. Under the “General” section set:
        • Import category to “Default for c1”
        • Uncheck “Get category from file”
      5. Add the “cat with course tags” XML file to the import page
      6. Click “Import”
      7. View the questions tab
      8. Set “Select a category” to “Default for c1”
      9. Uncheck “Also show questions from sub categories”
      10. CONFIRM that you see the imported question “q with course tags”
      11. Edit the question
      12. CONFIRM that you see “q tag” and “c tag” in the “Tags” section
      13. Click “Cancel”
      14. Delete the question

      Import course tags into activity context

      1. View c1
      2. Go to quiz 1, click on the cog and then Question bank
      3. Go to the question bank import tab
      4. Set the file format to “Moodle XML format”
      5. Under the “General” section set:
        • Import category to “Default for quiz1”
        • Uncheck “Get category from file”
      6. Add the “cat with course tags” XML file to the import page
      7. Click “Import”
      8. View the questions tab
      9. Set “Select a category” to “Default for quiz1”
      10. Uncheck “Also show questions from sub categories”
      11. CONFIRM that you see the imported question “q with course tags”
      12. Edit the question
      13. CONFIRM that you see “q tag” and “c tag” in the “Tags” section
      14. Click “Cancel”
      15. Delete the question

      Import course category question without course tags into all contexts

      1. Repeat the import process for each of the 4 contexts above but:
        • Import the “course without course tags” XML file instead of the one with course tags.
        • The question being imported should be the “q without course tags” not “q with course tags”
        • In each case CONFIRM that you see “q tag” in the “Tags” section
        • Also CONFIRM that if the question has a Course: <course name> tags” section that it is empty (on system and category context only, on course and activity that field is not displayed)

      Import course question into all contexts

      1. Repeat the import process for each of the 4 contexts above but:
        • Import the “course question” XML file instead of the one with course tags.
        • The question being imported should be the “course q”
        • In each case CONFIRM that you see “c1 tag” in the “Tags” section
        • Also CONFIRM that if the question has a Course: <course name> tags” section that it is empty (on system and category context only, on course and activity that field is not displayed)

      Import course tags question into different course

      1. View course c2
      2. Create a quiz
      3. Repeat the 4 “Import course tags into” tests from above
      4. CONFIRM that the results are the same as described in those tests (this confirms that questions with course tags can be imported into multiple different courses, not just back into the origin course).

      Question category export should not include tags from different courses

      1. View course c1
      2. Go to the question bank
      3. On "Select a category" drop-down select "Default for Miscellaneous" category.
      4. Click "Create a new question.." button and add a new question, let's name it "default misc question" and add a tag (c1tag) to "Course: <course name> tags” field
      5. View course c2
      6. Go to the question bank export tab
      7. Select “Moodle XML format” as the file format
      8. Set the “Export category” to “Default for Miscellaneous”
      9. Uncheck “Write category to file”
      10. Click “Export questions to file”
      11. Rename the downloaded file to “default for misc c2” to make it easier to reference
      12. Go to the question bank import tab
      13. Set the file format to “Moodle XML format”
      14. Under the “General” section set:
        • Import category to “Default for Miscellaneous”
        • Uncheck “Get category from file”
      15. Add the “default for misc c2” XML file to the import page
      16. Click “Import”
      17. View the questions tab, note there will be two questions with the same name, please refer to the date to view the recently imported question.
      18. Click Edit icon on the imported question
      19. CONFIRM that "Tags" and "Course: <course 2 name> tags" are both empty
      20. Click “Cancel”
      21. Delete the question
      22. View c1 course
      23. Go to the question bank export tab
      24. Select “Moodle XML format” as the file format
      25. Set the “Export category” to “Default for Miscellaneous”
      26. Uncheck “Write category to file”
      27. Click “Export questions to file”
      28. Rename the downloaded file to “default for misc c1” to make it easier to reference
      29. Go to the question bank import tab
      30. Set the file format to “Moodle XML format”
      31. Under the “General” section set:
        • Import category to “Default for Miscellaneous”
        • Uncheck “Get category from file”
      32. Add the “default for misc c1” XML file to the import page
      33. Click “Import”
      34. View the questions tab, note there will be two questions with the same name, please refer to the date to view the recently imported question.
      35. Click Edit icon on the imported question
      36. CONFIRM that "Tags" field is empty and "Course: <course 1 name> tags" has c1tag
      37. Click “Cancel”
      38. Delete the question
      Show
      Setup Create categories and questions Log in as admin Create 2 courses, c1 and c2 View c1 Create a quiz activity called “quiz1” View quiz1 View the question bank categories Edit cog > question bank > categories Add a new category called “cat with course tags” Set the “Parent category” to “Default for System” Add a new category called “cat without course tags” Set the “Parent category” to “Default for System” Click the “Questions” tab Change “Select a category” to “cat with course tags” Click “Create a new question” to create a question in the system context (it doesn’t matter what type of question you create) Make sure “Category” is set to “cat with course tags” Set the question name to “q with course tags” Enter some question text "q with course tags" In the “Tags” section add a tag called “q tag” In the “Course: <course name> tags” section add a tag called “c tag” Save changes Change “Select a category” to “cat without course tags” Click “Create a new question” to create a question in the system context (it doesn’t matter what type of question you create) Make sure “Category” is set to “cat without course tags” Set the question name to “q without course tags” Enter some question text "q without course tags" In the “Tags” section add a tag called “q tag” Don’t add any tags to the “Course: <course name> tags” section Save changes Change “Select a category” to “Default for c1” Click “Create a new question” to create a question in the course context (it doesn’t matter what type of question you create) Make sure “Category” is set to “Default for c1” Set the question name to “course q” Enter some question text "course q" In the “Tags” section add a tag called “c1 tag” Save changes Exporting category with course tags Go to the question bank export tab Select “Moodle XML format” as the file format Set the “Export category” to “cat with course tags” Uncheck “Write category to file” Click “Export questions to file” Rename the downloaded file to “cat with course tags” to make it easier to reference Exporting category without course tags Go to the question bank export tab Select “Moodle XML format” as the file format Set the “Export category” to “cat without course tags” Uncheck “Write category to file” Click “Export questions to file” Rename the downloaded file to “cat without course tags” to make it easier to reference Exporting course question Go to the question bank export tab Select “Moodle XML format” as the file format Set the “Export category” to “Default for c1” Uncheck “Write category to file” Click “Export questions to file” Rename the downloaded file to “course question” to make it easier to reference Tests Import course tags into system context View c1 Go to the question bank import tab Set the file format to “Moodle XML format” Under the “General” section set: Import category to “Default for system” Uncheck “Get category from file” Add the “cat with course tags” XML file to the import page Click “Import” View the questions tab Set “Select a category” to “Default for System” Uncheck “Also show questions from sub categories” CONFIRM that you see the imported question “q with course tags” Edit the question CONFIRM that you see “q tag” in the “Tags” section CONFIRM that you see “c tag” in the “Course: <course name> tags” section Click “Cancel” Delete the question Import course tags into category context View c1 Go to the question bank import tab Set the file format to “Moodle XML format” Under the “General” section set: Import category to “Default for Miscellaneous” Uncheck “Get category from file” Add the “cat with course tags” XML file to the import page Click “Import” View the questions tab Set “Select a category” to “Default for Miscellaneous” Uncheck “Also show questions from sub categories” CONFIRM that you see the imported question “q with course tags” Edit the question CONFIRM that you see “q tag” in the “Tags” section CONFIRM that you see “c tag” in the “Course: <course name> tags” section Click “Cancel” Delete the question Import course tags into course context View c1 Go to the question bank import tab Set the file format to “Moodle XML format” Under the “General” section set: Import category to “Default for c1” Uncheck “Get category from file” Add the “cat with course tags” XML file to the import page Click “Import” View the questions tab Set “Select a category” to “Default for c1” Uncheck “Also show questions from sub categories” CONFIRM that you see the imported question “q with course tags” Edit the question CONFIRM that you see “q tag” and “c tag” in the “Tags” section Click “Cancel” Delete the question Import course tags into activity context View c1 Go to quiz 1, click on the cog and then Question bank Go to the question bank import tab Set the file format to “Moodle XML format” Under the “General” section set: Import category to “Default for quiz1” Uncheck “Get category from file” Add the “cat with course tags” XML file to the import page Click “Import” View the questions tab Set “Select a category” to “Default for quiz1” Uncheck “Also show questions from sub categories” CONFIRM that you see the imported question “q with course tags” Edit the question CONFIRM that you see “q tag” and “c tag” in the “Tags” section Click “Cancel” Delete the question Import course category question without course tags into all contexts Repeat the import process for each of the 4 contexts above but: Import the “course without course tags” XML file instead of the one with course tags. The question being imported should be the “q without course tags” not “q with course tags” In each case CONFIRM that you see “q tag” in the “Tags” section Also CONFIRM that if the question has a Course: <course name> tags” section that it is empty (on system and category context only, on course and activity that field is not displayed) Import course question into all contexts Repeat the import process for each of the 4 contexts above but: Import the “course question” XML file instead of the one with course tags. The question being imported should be the “course q” In each case CONFIRM that you see “c1 tag” in the “Tags” section Also CONFIRM that if the question has a Course: <course name> tags” section that it is empty (on system and category context only, on course and activity that field is not displayed) Import course tags question into different course View course c2 Create a quiz Repeat the 4 “Import course tags into” tests from above CONFIRM that the results are the same as described in those tests (this confirms that questions with course tags can be imported into multiple different courses, not just back into the origin course). Question category export should not include tags from different courses View course c1 Go to the question bank On "Select a category" drop-down select "Default for Miscellaneous" category. Click "Create a new question.." button and add a new question, let's name it "default misc question" and add a tag (c1tag) to "Course: <course name> tags” field View course c2 Go to the question bank export tab Select “Moodle XML format” as the file format Set the “Export category” to “Default for Miscellaneous” Uncheck “Write category to file” Click “Export questions to file” Rename the downloaded file to “default for misc c2” to make it easier to reference Go to the question bank import tab Set the file format to “Moodle XML format” Under the “General” section set: Import category to “Default for Miscellaneous” Uncheck “Get category from file” Add the “default for misc c2” XML file to the import page Click “Import” View the questions tab, note there will be two questions with the same name, please refer to the date to view the recently imported question. Click Edit icon on the imported question CONFIRM that "Tags" and "Course: <course 2 name> tags" are both empty Click “Cancel” Delete the question View c1 course Go to the question bank export tab Select “Moodle XML format” as the file format Set the “Export category” to “Default for Miscellaneous” Uncheck “Write category to file” Click “Export questions to file” Rename the downloaded file to “default for misc c1” to make it easier to reference Go to the question bank import tab Set the file format to “Moodle XML format” Under the “General” section set: Import category to “Default for Miscellaneous” Uncheck “Get category from file” Add the “default for misc c1” XML file to the import page Click “Import” View the questions tab, note there will be two questions with the same name, please refer to the date to view the recently imported question. Click Edit icon on the imported question CONFIRM that "Tags" field is empty and "Course: <course 1 name> tags" has c1tag Click “Cancel” Delete the question

      As required by MUA Question Bank project works, we need to support tags when importing and exporting questions.

            lameze Simey Lameze
            lameze Simey Lameze
            Ryan Wyllie Ryan Wyllie
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 2 days, 1 hour, 30 minutes
                1w 2d 1h 30m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.