[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/question/engine/ -> upgrade.txt (source)

   1  This files describes API changes for the core question engine.
   2  
   3  === 3.1, 3.0.3, 2.9.5 ===
   4  
   5  1) The field question_display_options::$extrainfocontent is now displayed in the
   6     outcomes (yellow) div by default. It used to be in the info div. If you have
   7     overriden the question renderer, you may need to make a corresponding change.
   8  
   9  
  10  === 3.0, 2.9.2, 2.8.8 ===
  11  
  12  1) The extra internal PARAM constant question_attempt::PARAM_MARK should no
  13     longer be used. (It should not have been used outside the core of the
  14     question system). See MDL-51090 if you want more explanation.
  15  
  16  
  17  === 2.9 ===
  18  
  19  1) Some new methods on the question_usage class (and corresponding methods on
  20     question_attempt, question_attempt_step, question_usage_observer, ... requried
  21     to implement them, but almost certainly you should only be calling the
  22     question_usage methods from your code.
  23  
  24     * question_usage::add_question_in_place_of_other($slot, $question, $maxmark = null)
  25  
  26       This creates a new questoin_attempt in place of an existing one, moving the
  27       existing question_attempt to the end of the usage, in a new slot number.
  28       The new slot number is returned. The goal is to replace the old attempt, but
  29       not lose the old data.
  30  
  31     * question_usage::set_question_max_mark($slot, $maxmark)
  32  
  33       Sets the max mark for one question in this usage. Previously, you could
  34       only change this using the bulk operation question_usage::set_max_mark_in_attempts;
  35  
  36     * question_usage::set_question_attempt_metadata($slot, $name, $value);
  37       question_usage::get_question_attempt_metadata($slot, $name);
  38  
  39       You can now record metadata, that is, values stored by name, against
  40       question_attempts. The question engine ignores this data (other than storing
  41       and loading it) but you may find it useful in your code.
  42  
  43     To see examples of where these are used, look at the chagnes from MDL-40992.
  44  
  45  2) New fields in question_display_options, ->extrainfocontent and ->extrahistorycontent.
  46     These default to blank, but can be used to inject extra content into those parts
  47     of the question display. If you have overridden the methods in
  48     core_question_renderer that use these fields, you may need to update your renderer.
  49  
  50  
  51  === 2.6 ===
  52  
  53  1) The method question_behaviour::is_manual_grade_in_range and move and become
  54     question_engine::is_manual_grade_in_range.
  55  
  56  2) The arguments to core_question_renderer::mark_summary changed from
  57     ($qa, $options) to ($qa, $behaviouroutput, $options). If you have overridden
  58     that method you will need to update your code.
  59  
  60  3) Heading level for number(), add_part_heading() and respond_history()
  61     has been lowered by one level. These changes are part of improving the page
  62     accessibility and making heading to have proper nesting. (MDL-41615)
  63  
  64  === Earlier changes ===
  65  
  66  * Were not documented in this way. Sorry.


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