Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-27916' of git://github.com/timhunt/moodle

  • Loading branch information...
commit 70e35c4d1dfdfc7d447e7674801e07b3dca8aef3 2 parents 1533a25 + 88ef9d0
@samhemelryk samhemelryk authored
View
28 question/behaviour/adaptive/behaviour.php
@@ -49,6 +49,22 @@ public function get_expected_data() {
return parent::get_expected_data();
}
+ public function get_state_string($showcorrectness) {
+ $laststep = $this->qa->get_last_step();
+ if ($laststep->has_behaviour_var('_try')) {
+ $state = question_state::graded_state_for_fraction(
+ $laststep->get_behaviour_var('_rawfraction'));
+ return $state->default_string(true);
+ }
+
+ $state = $this->qa->get_state();
+ if ($state == question_state::$todo) {
+ return get_string('notcomplete', 'qbehaviour_adaptive');
+ } else {
+ return parent::get_state_string($showcorrectness);
+ }
+ }
+
public function get_right_answer_summary() {
return $this->question->get_right_answer_summary();
}
@@ -61,18 +77,6 @@ public function adjust_display_options(question_display_options $options) {
}
}
- public function get_state_string($showcorrectness) {
- $state = $this->qa->get_state();
-
- $laststep = $this->qa->get_last_step();
- if ($laststep->has_behaviour_var('_try')) {
- $state = question_state::graded_state_for_fraction(
- $laststep->get_behaviour_var('_rawfraction'));
- }
-
- return $state->default_string($showcorrectness);
- }
-
public function process_action(question_attempt_pending_step $pendingstep) {
if ($pendingstep->has_behaviour_var('comment')) {
return $this->process_comment($pendingstep);
View
1  question/behaviour/adaptive/lang/en/qbehaviour_adaptive.php
@@ -26,4 +26,5 @@
$string['gradingdetails'] = 'Marks for this submission: {$a->raw}/{$a->max}.';
$string['gradingdetailsadjustment'] = 'With previous penalties this gives <strong>{$a->cur}/{$a->max}</strong>.';
$string['gradingdetailspenalty'] = 'This submission attracted a penalty of {$a}.';
+$string['notcomplete'] = 'Not complete';
$string['pluginname'] = 'Adaptive mode';
View
9 question/behaviour/immediatefeedback/behaviour.php
@@ -59,6 +59,15 @@ public function get_expected_data() {
return parent::get_expected_data();
}
+ public function get_state_string($showcorrectness) {
+ $state = $this->qa->get_state();
+ if ($state == question_state::$todo) {
+ return get_string('notcomplete', 'qbehaviour_immediatefeedback');
+ } else {
+ return parent::get_state_string($showcorrectness);
+ }
+ }
+
public function get_right_answer_summary() {
return $this->question->get_right_answer_summary();
}
View
1  question/behaviour/immediatefeedback/lang/en/qbehaviour_immediatefeedback.php
@@ -23,4 +23,5 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+$string['notcomplete'] = 'Not complete';
$string['pluginname'] = 'Immediate feedback';
Please sign in to comment.
Something went wrong with that request. Please try again.