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

Question Bank - Allow plugins to add columns to question bank view

    XMLWordPrintable

Details

    • MOODLE_27_STABLE
    • MOODLE_28_STABLE
    • MDL-40457-question_bank_plugins_columns
    • Hide

      Attached is a local plugin which uses this API to display the last-modified-date of questions. Install the plugin.

      1. Go to Course admin -> Question bank
      2. Ensure there are some visible questions in the bank.
      3. Verify there is not a column showing the last modified date in the Question Bank display

      4. In config.php, add: $CFG->questionbankcolumns = 'checkbox_column,question_type_column,question_name_column,edit_action_column,preview_action_column,copy_action_column,delete_action_column,creator_name_column,modifier_name_column,local_questionbankmodified_question_bank_column';

      5. Verify there is now a column showing the last modified date in the Question Bank display.

      6. Create or find a quiz
      7. Go to its Edit quiz page
      8. Verify you can see the question bank there and no regressions.
      9. Add to config.php $CFG->quizquestionbankcolumns = 'add_to_quiz_action_column,checkbox_column,question_type_column,question_name_column,edit_action_column,preview_action_column,copy_action_column,local_questionbankmodified_question_bank_column';
      10. Ensure the question bank where you can select questions to add now has the last modified date column.

      Show
      Attached is a local plugin which uses this API to display the last-modified-date of questions. Install the plugin. 1. Go to Course admin -> Question bank 2. Ensure there are some visible questions in the bank. 3. Verify there is not a column showing the last modified date in the Question Bank display 4. In config.php, add: $CFG->questionbankcolumns = 'checkbox_column,question_type_column,question_name_column,edit_action_column,preview_action_column,copy_action_column,delete_action_column,creator_name_column,modifier_name_column,local_questionbankmodified_question_bank_column'; 5. Verify there is now a column showing the last modified date in the Question Bank display. 6. Create or find a quiz 7. Go to its Edit quiz page 8. Verify you can see the question bank there and no regressions. 9. Add to config.php $CFG->quizquestionbankcolumns = 'add_to_quiz_action_column,checkbox_column,question_type_column,question_name_column,edit_action_column,preview_action_column,copy_action_column,local_questionbankmodified_question_bank_column'; 10. Ensure the question bank where you can select questions to add now has the last modified date column.

    Description

      This short patch allows plugins to add columns to be displayed in the question bank view. Along with the existing information like question name, creator, and type, a plugin could add a column to display any tags associated with the question, for example, or any other information about questions.

      This complements MDL-40313, which allows plugins to add filtering criteria.
      So for example a plugin could display the creation date of the question, and allow the user to filter questions by creation date, or by tags.

      Attachments

        1. columns3.patch
          4 kB
          Ray Morris

        Issue Links

          Activity

            People

              raymor Ray Morris
              raymor Ray Morris
              Tim Hunt Tim Hunt
              Dan Poltawski Dan Poltawski
              Adrian Greeve Adrian Greeve
              Safat Shahin, Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Nov/14