Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Moodle 2.0 question bank improvements: Difference between revisions

From MoodleDocs
No edit summary
Line 14: Line 14:


New table question_outcomes with columns id, questionid and outcomeid.
New table question_outcomes with columns id, questionid and outcomeid.
New column in the question table, allquestiontext. This is a concatenation of the questiontext, generalfeedback, and any question type specific text fields, with tags stripped. Used for full-text searching. Then change all the places where the question table is queried, to not return this column by default.


===Question bank display changes===
===Question bank display changes===
Line 24: Line 26:


In order to give a home to the tagging and outcomes interfaces, there will be a question/view.php?id={questionid} page. I don't think it makes sense to combine this with question/preview.php.
In order to give a home to the tagging and outcomes interfaces, there will be a question/view.php?id={questionid} page. I don't think it makes sense to combine this with question/preview.php.
question/view.php will show a read-only view of the question. (What a teacher would see if a student started a quiz attempt then closed their browser without answering this question, and then a teacher when in to review the attempt.)
Then there will be a section for tagging questions.
Then (if appropriate) there will be a section of the page for linking this question to outcomes.
Then, once MDL-14206 is finished, a list of all questions where this question is used, and which the current user has reports access too, linking to the question statistics report for that quiz.


===Ways if filtering the question bank===
===Ways if filtering the question bank===


====Sorting====


Currently, you can sort the question bank by type, name, or age, using a non-standard interface - a drop-down menu of choices.
Instead, make the question bank sortable by any column, using the standard click the column heading mechanism.
====Searching====
At the moment you can search by
* question category, optionally including sub-categories
* including hidden questions (deleted questions that were kept because they are still in use)
Add searching by the following conditions:
* question type
* tags
* outcomes
* creator
* full text search of the question
To facilitate this, we will make a new question_bank_filter base class, with sub-classes for each filter type. These will encapsulate generating where clauses, providing a description of the condition for display to users, and generating interface for the advanced search form.


===Question bank advanced search interface===
===Question bank advanced search interface===
A form for setting the search options. With JavaScript on, this will appear as a pop-up form like the repository file-picker, although when it is submitted, it will have to reload the whole page.


==See also==
==See also==

Revision as of 06:50, 5 September 2008

Moodle 2.0


Moodle 1.9 introduced the tagging and outcomes infrastructure. In Moodle 2.0 we should support tagging questions, and relating questions to outcomes.

With this added metadata, we should thing provides enhanced facilities for searching in the question bank.

In addition, we need to find a way to display all of this extra information. It will not all fit when viewing the question bank on the quiz editing page, so we need to start separating the question bank display that is used to add questions to a quiz, and the stand-alone question bank interface.

Design

In what follows, any UI relating to outcomes will only appear if $CFG->enableoutcomes is true.

Database changes

New table question_outcomes with columns id, questionid and outcomeid.

New column in the question table, allquestiontext. This is a concatenation of the questiontext, generalfeedback, and any question type specific text fields, with tags stripped. Used for full-text searching. Then change all the places where the question table is queried, to not return this column by default.

Question bank display changes

New $compact parameter to question_showbank. The intention is that this will be true when called from mod/quiz/edit.php, and false from question/edit.php.

When $compact is false, there will be new columns "Creator", "Created", "Modified", "Tags" and "Outcomes" in the question bank view.

A new question view page

In order to give a home to the tagging and outcomes interfaces, there will be a question/view.php?id={questionid} page. I don't think it makes sense to combine this with question/preview.php.

question/view.php will show a read-only view of the question. (What a teacher would see if a student started a quiz attempt then closed their browser without answering this question, and then a teacher when in to review the attempt.)

Then there will be a section for tagging questions.

Then (if appropriate) there will be a section of the page for linking this question to outcomes.

Then, once MDL-14206 is finished, a list of all questions where this question is used, and which the current user has reports access too, linking to the question statistics report for that quiz.

Ways if filtering the question bank

Sorting

Currently, you can sort the question bank by type, name, or age, using a non-standard interface - a drop-down menu of choices.

Instead, make the question bank sortable by any column, using the standard click the column heading mechanism.

Searching

At the moment you can search by

  • question category, optionally including sub-categories
  • including hidden questions (deleted questions that were kept because they are still in use)

Add searching by the following conditions:

  • question type
  • tags
  • outcomes
  • creator
  • full text search of the question

To facilitate this, we will make a new question_bank_filter base class, with sub-classes for each filter type. These will encapsulate generating where clauses, providing a description of the condition for display to users, and generating interface for the advanced search form.

Question bank advanced search interface

A form for setting the search options. With JavaScript on, this will appear as a pop-up form like the repository file-picker, although when it is submitted, it will have to reload the whole page.

See also