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

Question bank - question filtering API for flexibility, plugins

XMLWordPrintable

    • MOODLE_25_STABLE
    • MOODLE_27_STABLE
    • Hide

      To test standard functions:
      Under Course > Question Bank,add or use a question bank with some subcategories
      Ensure at least one question is deleted (hidden)
      Toggle the controls "Also show questions from sub-categories" and "Show question text in the question list"
      Ensure that each control operates as labeled

      To test plugin API:
      Install the searchbytags plugin linked to this issue
      Add some tags to some questions
      Search for questions by tags using the new UI element on the Question Bank form
      Ensure that questions which match the searched tags are shown

      Select a quiz, choose Edit Quiz, and repeat the tests with that view of the question bank.

      Show
      To test standard functions: Under Course > Question Bank,add or use a question bank with some subcategories Ensure at least one question is deleted (hidden) Toggle the controls "Also show questions from sub-categories" and "Show question text in the question list" Ensure that each control operates as labeled To test plugin API: Install the searchbytags plugin linked to this issue Add some tags to some questions Search for questions by tags using the new UI element on the Question Bank form Ensure that questions which match the searched tags are shown Select a quiz, choose Edit Quiz, and repeat the tests with that view of the question bank.

      This API adjustment makes it possible for code to search/filter questions in the question bank by any criteria. It introduces a new "question_bank_search_condition" class.

      Example usage includes plugins or future code finding questions based on tags, a text search, or finding questions of a certain type. Ie, show all true/false questions in a category, all questions tagged "PHP", or all questions which mention "SimpleTest".

      For illustration, the category filter and the "show old questions" filter have been converted to question_bank_search_condition subclasses. A test subclass to find questions based on tags also exists using this API.

            raymor Ray Morris
            raymor Ray Morris
            Tim Hunt Tim Hunt
            Dan Poltawski Dan Poltawski
            Mark Nelson Mark Nelson
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

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