[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/quiz/report/ -> upgrade.txt (source)

   1  This files describes API changes for quiz report plugins.
   2  
   3  Overview of this plugin type at http://docs.moodle.org/dev/Quiz_reports
   4  === 2.6 ===
   5  
   6  * Improving the display page and heading levels to have a proper nesting.
   7  We are reducing the amount of white spaces for the top report by making
   8  'separate group' options and attempts to be displayed inline.
   9  In grading report, we are changing 'no questions' from using heading to
  10  notification message. (MDL-41615)
  11  
  12  === 2.3 ===
  13  
  14  * Support for the old way of doing cron in a separate cron.php file has been removed.
  15  Instead, you need a lib.php file inside the plugin with a cron function
  16  called quiz_myreportname_cron(). The statistics report is an example of how
  17  it should be done.
  18  
  19  * There was a big refactor of the quiz reports, in issues MDL-32300, MDL-32322 and MDL-3030.
  20  It is difficult to explain the changes. Probably the best way to understand what
  21  happened is to look at
  22      git log mod/quiz/report/overview
  23      git log mod/quiz/report/responses
  24  and so on. Here are some notes on a few of the changes:
  25  
  26  The class quiz_attempt_report was renamed to quiz_attempts_report (with an extra s).
  27  
  28  Some globally defined constants with the prefix QUIZ_REPORT_ATTEMPTS_ moved into
  29  the quiz_attempts_report class. Specifically
  30  
  31  quiz_attempts_report::ALL_WITH         replaces QUIZ_REPORT_ATTEMPTS_ALL
  32  quiz_attempts_report::ENROLLED_ALL     replaces QUIZ_REPORT_ATTEMPTS_ALL_STUDENTS
  33  quiz_attempts_report::ENROLLED_WITH    replaces QUIZ_REPORT_ATTEMPTS_STUDENTS_WITH
  34  quiz_attempts_report::ENROLLED_WITHOUT replaces QUIZ_REPORT_ATTEMPTS_STUDENTS_WITH_NO
  35  
  36  Your if you have a table class, it needs to be renamed like
  37  quiz_report_myreportname_table -> quiz_myreportname_table. That is, all the
  38  class names in your plugin should start with the frankenstyle plugin name
  39  quiz_myreportname.
  40  
  41  
  42  === 2.2 ===
  43  
  44  * Plugins should be converted to implement cron in the standard way. In lib.php,
  45  define a
  46  function quiz_myreportname_cron() {};
  47  This replaces the old way of having a separate cron.php file. Also, the cron
  48  frequency should be defined in version.php, not in the quiz_reports table.
  49  
  50  
  51  === earlier versions ===
  52  
  53  * ... API changes were not documented properly. Sorry. (There weren't many!)


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1