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

Create new plugin type - Qbank

XMLWordPrintable

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • master_MDL-71516-qbank
    • Hide

      Preparation: Install the code branch form this tracker and run the upgrade.

      Qbank plugin type

      1. Login into the Moodle site as an administrator
      2. Navigate to:  Site administration > Plugins > Plugins overview
      3. Confirm:
        • That the “Question bank plugins” plugin section appears
        • See screenshot: Question bank plugin types.png
      4. Navigate to: Site administration > Plugins
      5. Confirm:
        • That the “Question bank plugins” plugin section appears
        • See screenshot: Question bank plugin menu.png
      6. Navigate to:  Site administration > Plugins > Question bank plugins > Manage question bank plugins
      7. Confirm
        • That the: Manage question banks page appears
        • See screenshot: Question bank installed plugins.png

      Some test plugins are added in the attachments.

      Quiz and Question bank operation

      As this patch provides the scaffolding for new qban_* plugins the existing quiz and question bank functionality should remain unchanged.

      Testing should involve running through all testing scenarios relating to adding questions to a quiz, but at a minimum:

      1. Create a new quiz activity in a Moodle course with default settings
      2. Edit the quiz to add questions
      3. Add a new question of any type to the quiz
      4. Choose the default course question bank for the question
      5. Fill out the required details for the question.
      6. Confirm the question is added to the quiz
      7. Create a second quiz activity in the course
      8. Edit the quiz to add questions
      9. Add a question from a question bank
      10. Choose the question that was created for the first quiz
      11. Confirm the question is added to the quiz

       Additional test for url:

      • Make sure you Moodle url has subdirectories - i.e. 'http://testmoodle/m/integration_master' but not 'http://testmoodle'
      • Navigate to any Quiz activity page
      • Click on setting icon
      • Go to Question bank->Questions
      • Inspect the page in browser developer tools
      • Ensure that action attribute in form element has correct url like

      <form method="get" action="http://localhost/m/integration_master/question/edit.php?cmid=68&amp;cat=4%2C43&amp;recurse=1&amp;showhidden=0&amp;qbshowtext=0" id="displayoptions"
      

      but not

      <form method="get" action="http://localhost/m/integration_master/m/integration_master/question/edit.php?cmid=65&category=4%2C43&qbshowtext=0&recurse=0&showhidden=0&showhidden=1" id="displayoptions"
      

       

      Show
      Preparation: Install the code branch form this tracker and run the upgrade. Qbank plugin type Login into the Moodle site as an administrator Navigate to:  Site administration > Plugins > Plugins overview Confirm: That the “Question bank plugins” plugin section appears See screenshot: Question bank plugin types.png Navigate to: Site administration > Plugins Confirm: That the “Question bank plugins” plugin section appears See screenshot: Question bank plugin menu.png Navigate to:  Site administration > Plugins > Question bank plugins > Manage question bank plugins Confirm That the: Manage question banks page appears See screenshot: Question bank installed plugins.png Some test plugins are added in the attachments. Quiz and Question bank operation As this patch provides the scaffolding for new qban_* plugins the existing quiz and question bank functionality should remain unchanged. Testing should involve running through all testing scenarios relating to adding questions to a quiz, but at a minimum: Create a new quiz activity in a Moodle course with default settings Edit the quiz to add questions Add a new question of any type to the quiz Choose the default course question bank for the question Fill out the required details for the question. Confirm the question is added to the quiz Create a second quiz activity in the course Edit the quiz to add questions Add a question from a question bank Choose the question that was created for the first quiz Confirm the question is added to the quiz   Additional test for url: Make sure you Moodle url has subdirectories - i.e. 'http://testmoodle/m/integration_master' but not 'http://testmoodle' Navigate to any Quiz activity page Click on setting icon Go to Question bank->Questions Inspect the page in browser developer tools Ensure that action attribute in form element has correct url like <form method= "get" action= "http://localhost/m/integration_master/question/edit.php?cmid=68&amp;cat=4%2C43&amp;recurse=1&amp;showhidden=0&amp;qbshowtext=0" id= "displayoptions" but not <form method= "get" action= "http://localhost/m/integration_master/m/integration_master/question/edit.php?cmid=65&category=4%2C43&qbshowtext=0&recurse=0&showhidden=0&showhidden=1" id= "displayoptions"  

      Currently all Question bank features are "hard coded" in Moodle core and are not very extensible.

      This issue will introduce a new "Question bank" plugin type, with the `qbank_` prefix. It will also refactor core code to allow provide a straightforward interface to create plugins that provide question bank functionality. This means contributors can make their own qbank_* plugins to introduce new question bank functionality.

      NOTE: Existing question bank features will not be replaced by this tracker, and will still continue to function.  Each individual qbank_* plugin tracker issue will both introduce an existing core feature as a plugin and replace the current core functionality. This is so core Moodle wont be "broken" be the refactoring.

       

      Functionality qbank_* can plugins implement with this change:

      • Ability to define “action” items for questions. E.g. import/export, copy, delete, tag
      • Ability to define their own column/s to the question overview table. E.g. view author, last modified time.
      • Ability to add their own tabs to the question bank view
      • Ability define a navigation node if required
      • Ability to override or create new nodes and implement your own from the plugin or create a new one

        1. deletequestion.zip
          9 kB
        2. exporttoxml.zip
          9 kB
        3. importquestions.zip
          10 kB
        4. MDL-71516_Test Passed.png
          MDL-71516_Test Passed.png
          102 kB
        5. MDL-71516_Test Passed-1.png
          MDL-71516_Test Passed-1.png
          102 kB
        6. MDL-71516-test-1.png
          MDL-71516-test-1.png
          36 kB
        7. MDL-71516-test-2.png
          MDL-71516-test-2.png
          34 kB
        8. MDL-71516-test-3.png
          MDL-71516-test-3.png
          71 kB
        9. MDL-71516-test-4-step6.png
          MDL-71516-test-4-step6.png
          38 kB
        10. MDL-71516-test-5-step11.png
          MDL-71516-test-5-step11.png
          27 kB
        11. MDL-71516-test-6-url.png
          MDL-71516-test-6-url.png
          18 kB
        12. Question bank installed plugins.png
          Question bank installed plugins.png
          33 kB
        13. Question bank plugin menu.png
          Question bank plugin menu.png
          32 kB
        14. Question bank plugin types.png
          Question bank plugin types.png
          10 kB
        15. Selection_052.png
          Selection_052.png
          68 kB
        16. viewquestionname.zip
          9 kB

            safatshahin Safat Shahin
            safatshahin Safat Shahin
            Tim Hunt Tim Hunt
            Ilya Tregubov Ilya Tregubov
            Michael Hawkins Michael Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 5 hours, 50 minutes
                2d 5h 50m

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