Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
=== 4.5 Onwards ===
2
 
3
This file has been replaced by UPGRADING.md. See MDL-81125 for further information.
4
 
5
===
1 efrain 6
This files describes API changes for question behaviour plugins.
7
 
8
=== 4.0 ===
9
 
10
1) The major question bank changes should not affect behaviour plugins.
11
   The navigation changes may affect Behat tests. If you encounter this,
12
   the best way to fix it is to use the new navigation steps in MDL-74130.
13
 
14
 
15
=== 3.10 ===
16
 
17
1) The slot parameter of method M.core_question_engine.init_submit_button now removed.
18
   The method will get the unique id by using the 'Check' button element.
19
 
20
 
21
=== 3.1 ===
22
 
23
1) The standard behaviours that use a 'Check' button have all been changed so
24
   that they only show the button when the question is active. Your behaviour
25
   may interit this behaviour, because the change was made in the base class,
26
   and this is probably good for consistency. However, if your question behaviour
27
   uses the Check button, your probably want to test it carefully, and you will
28
   probably have to update your unit tests. See MDL-53304 for more details.
29
 
30
 
31
=== 2.9 ===
32
 
33
1) There are new methods question_behaviour::can_finish_during_attempt and
34
   question_behaviour_type::can_finish_during_attempt. These methods both return
35
   false by default. You should override it if, with your behaviour, questions may
36
   finish just through the student interacting with them (e.g. by clicking the
37
   Check button within the question).
38
 
39
   The behaviour type method answers the the question for this behaviour in
40
   general, without reference to a specific question. The method on the
41
   behaviour class answers the question for a specific attempt at a specific
42
   question.
43
 
44
 
45
=== 2.7 ===
46
 
47
1) question_behaviour_type has a new method allows_multiple_submitted_responses
48
      which defaults to false but should return true if this question behaviour
49
      accepts multiple submissions of responses within one attempt eg. multiple
50
      tries for the interactive or adaptive question behaviours.
51
   question_behaviour has a new method step_has_a_submitted_response($step). For
52
      question behaviours where it is not only the final response that is
53
      submitted by the student, you need to override this method to return true
54
      for other steps where a student has submitted a response. See
55
      question_behaviour_with_multiple_tries::step_has_a_submitted_response($step)
56
      for example. This method only needs to be overriden if you are returning
57
      true from allows_multiple_response_submissions.
58
 
59
 
60
=== 2.6 ===
61
 
62
1) Legacy required_question_definition_type no longer supported. (See 2.2 point 2) below.)
63
 
64
2) Behaviours now have to define an extra class
65
class qbehaviour_mybehaviour_type extends question_behaviour_type {
66
   This class returns information about the type of behaviour, as opposed to
67
   the qbehaviour_mybehaviour class which controls a particular
68
   question_attempt. That is like the difference between the qtype_mytype and
69
   the qtype_mytype_question classes.
70
 
71
   Practically, what this means is that any of the methods that used to be
72
   static methods of qbehaviour_mybehaviour class are now normal instance
73
   methods of the qbehaviour_mybehaviour_type class. Specifically.
74
    2.5 / qbehaviour_mybehaviour -> 2.6 / qbehaviour_mybehaviour_type
75
    IS_ARCHETYPAL                -> is_archetypal()
76
    adjust_random_guess_score()  -> adjust_random_guess_score()
77
    get_unused_display_options() -> get_unused_display_options()
78
 
79
3) The static method is_manual_grade_in_range has moved from the
80
   question_behaviour class to the question_engine class.
81
 
82
4) Behaviours can now control how the marks information is displayed in the
83
   grey info area to the left of the question. There is a new method
84
   mark_summary that you can override, although the default implementation is
85
   fine in most cases. it uses the marked_out_of_max and mark_out_of_max methods
86
   as appropriate, so you may just wish to override those.
87
 
88
 
89
=== 2.3 ===
90
 
91
1) This plugin type now supports cron in the standard way. If required, Create a
92
   lib.php file containing
93
function qbehaviour_mypluginname_cron() {};
94
 
95
 
96
=== 2.2 ===
97
 
98
1) The old
99
    public static function get_required_behaviours()
100
   method is no more. Instead use the ->dependencies facility in version.php. E.g.
101
$plugin->dependencies = array(
102
    'qbehaviour_immediatefeedback' => 2011102700,
103
    'qbehaviour_deferredcbm'       => 2011102700
104
);
105
 
106
2) The old required_question_definition_type method has been replaced by a new
107
   is_compatible_question method. You should change your behaviour to override
108
   the new method, not the old one. This change has been implemented in a
109
   backwards-compatible way, so behaviours will not break.