1 This files describes API changes for code that uses the question API.
5 1) Modules using the question bank MUST now declare their use of it with the xxx_supports()
6 flag FEATURE_USES_QUESTIONS. question_module_uses_questions() should be used to determine
7 if a module uses questions.
9 2) It is sometimes necessary to display bits of question content without having
10 and attempt (question_usage) in progress. Two examples of this are the option
11 in the question bank to display the questiontext, and in the quiz statistics
12 report, where it displays the question text above the report.
14 Previously, this display was done using a special method that only worked for
15 the question text, but which would not work for other parts of the question.
16 That old mechanism has been deprecated, and there is a new method that you
19 To display the question, replace calls to question_rewrite_questiontext_preview_urls
20 with calls to question_rewrite_question_preview_urls. Because the new function
21 is more flexibile, you have to pass more arguments.
23 To perform the necessary permission checks when the file is downloaded, you need
24 to implement the callback [component name]_question_preview_pluginfile.
25 (Previously you implemented [component name]_questiontext_preview_pluginfile.)
26 quiz_statistics_question_preview_pluginfile is an example of what to do.
28 question_send_questiontext_file has been deprecated. It is no longer necessary.
30 To ensure you are no longer using or defining any deprecated functions,
31 search for the regular expression:
32 question_rewrite_questiontext_preview_urls|_questiontext_preview_pluginfile|question_send_questiontext_file