mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00
Merge branch 'MDL-32188' of git://github.com/timhunt/moodle
Conflicts: lib/db/upgrade.php
This commit is contained in:
commit
cbf34f34cc
74 changed files with 1680 additions and 298 deletions
|
@ -745,6 +745,26 @@ class quiz_attempt {
|
|||
array_intersect(array_keys($teachersgroups), array_keys($studentsgroups));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get extra summary information about this attempt.
|
||||
*
|
||||
* Some behaviours may be able to provide interesting summary information
|
||||
* about the attempt as a whole, and this method provides access to that data.
|
||||
* To see how this works, try setting a quiz to one of the CBM behaviours,
|
||||
* and then look at the extra information displayed at the top of the quiz
|
||||
* review page once you have sumitted an attempt.
|
||||
*
|
||||
* In the return value, the array keys are identifiers of the form
|
||||
* qbehaviour_behaviourname_meaningfullkey. For qbehaviour_deferredcbm_highsummary.
|
||||
* The values are arrays with two items, title and content. Each of these
|
||||
* will be either a string, or a renderable.
|
||||
*
|
||||
* @return array as described above.
|
||||
*/
|
||||
public function get_additional_summary_data(question_display_options $options) {
|
||||
return $this->quba->get_summary_information($options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the overall feedback corresponding to a particular mark.
|
||||
* @param $grade a particular grade.
|
||||
|
|
|
@ -55,7 +55,7 @@ echo $OUTPUT->heading(format_string($attemptobj->get_question_name($slot)));
|
|||
|
||||
// Process any data that was submitted.
|
||||
if (data_submitted() && confirm_sesskey()) {
|
||||
if (optional_param('submit', false, PARAM_BOOL) && question_behaviour::is_manual_grade_in_range($attemptobj->get_uniqueid(), $slot)) {
|
||||
if (optional_param('submit', false, PARAM_BOOL) && question_engine::is_manual_grade_in_range($attemptobj->get_uniqueid(), $slot)) {
|
||||
$transaction = $DB->start_delegated_transaction();
|
||||
$attemptobj->process_submitted_actions(time());
|
||||
$transaction->allow_commit();
|
||||
|
|
|
@ -527,7 +527,7 @@ To arrange the questions over a number of pages, click the Repaginate button and
|
|||
$string['orderingquiz'] = 'Order and paging';
|
||||
$string['orderingquizx'] = 'Order and paging: {$a}';
|
||||
$string['outcomesadvanced'] = 'Outcomes are advanced settings';
|
||||
$string['outof'] = '{$a->grade} out of a maximum of {$a->maxgrade}';
|
||||
$string['outof'] = '{$a->grade} out of {$a->maxgrade}';
|
||||
$string['outofpercent'] = '{$a->grade} out of a maximum of {$a->maxgrade} ({$a->percent}%)';
|
||||
$string['outofshort'] = '{$a->grade}/{$a->maxgrade}';
|
||||
$string['overallfeedback'] = 'Overall feedback';
|
||||
|
|
|
@ -461,7 +461,7 @@ class quiz_grading_report extends quiz_default_report {
|
|||
|
||||
foreach ($qubaids as $qubaid) {
|
||||
foreach ($slots as $slot) {
|
||||
if (!question_behaviour::is_manual_grade_in_range($qubaid, $slot)) {
|
||||
if (!question_engine::is_manual_grade_in_range($qubaid, $slot)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -228,6 +228,9 @@ if ($options->marks >= question_display_options::MARK_AND_MAX && quiz_has_grades
|
|||
}
|
||||
}
|
||||
|
||||
// Any additional summary data from the behaviour.
|
||||
$summarydata = array_merge($summarydata, $attemptobj->get_additional_summary_data($options));
|
||||
|
||||
// Feedback if there is any, and the user is allowed to see it now.
|
||||
$feedback = $attemptobj->get_overall_feedback($grade);
|
||||
if ($options->overallfeedback && $feedback) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue