mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
Merge branch 'MDL-71941-master' of https://github.com/lucaboesch/moodle
This commit is contained in:
commit
44f1937c57
@ -196,7 +196,7 @@ class grade extends tablelike implements selectable_items, filterable_items {
|
||||
return [
|
||||
get_string('fullnameuser', 'core'),
|
||||
'', // For filter icon.
|
||||
get_string('grade', 'grades'),
|
||||
get_string('gradenoun'),
|
||||
get_string('range', 'grades'),
|
||||
get_string('feedback', 'grades'),
|
||||
get_string('override', 'gradereport_singleview'),
|
||||
|
@ -151,7 +151,7 @@ class user extends tablelike implements selectable_items {
|
||||
get_string('assessmentname', 'gradereport_singleview'),
|
||||
'', // For filter icon.
|
||||
get_string('gradecategory', 'grades'),
|
||||
get_string('grade', 'grades'),
|
||||
get_string('gradenoun'),
|
||||
get_string('range', 'grades'),
|
||||
get_string('feedback', 'grades'),
|
||||
get_string('override', 'gradereport_singleview'),
|
||||
|
@ -384,7 +384,7 @@ class user extends grade_report {
|
||||
|
||||
if ($this->showgrade) {
|
||||
$this->tablecolumns[] = 'grade';
|
||||
$this->tableheaders[] = get_string('grade', 'grades');
|
||||
$this->tableheaders[] = get_string('gradenoun');
|
||||
}
|
||||
|
||||
if ($this->showrange) {
|
||||
|
@ -110,3 +110,4 @@ passwordsenttext,core
|
||||
passwordrecovery,core
|
||||
passwordconfirmchange,core
|
||||
passwordnohelp,core
|
||||
grade,core_grades
|
||||
|
@ -257,7 +257,6 @@ $string['forstudents'] = 'For students';
|
||||
$string['full'] = 'Full';
|
||||
$string['fullmode'] = 'Show grades and totals';
|
||||
$string['generalsettings'] = 'General settings';
|
||||
$string['grade'] = 'Grade';
|
||||
$string['grade_help'] = 'The grade to award the student for their work.';
|
||||
$string['gradeadministration'] = 'Grade administration';
|
||||
$string['gradealreadyupdated'] = '{$a} grades have not been imported because the grades in the import file are older than in the grader report. To proceed with the grade import anyway, use the force import option.';
|
||||
@ -921,3 +920,6 @@ $string['showcalculations'] = 'Show calculations';
|
||||
$string['showcalculations_help'] = 'If enabled, when editing, a calculator icon is shown for each grade item and category with a visual indicator that a grade item is calculated.';
|
||||
$string['studentsperpage'] = 'Students per page';
|
||||
$string['studentsperpage_help'] = 'This setting determines the number of students displayed per page in the grader report.';
|
||||
|
||||
// Deprecated since Moodle 4.4.
|
||||
$string['grade'] = 'Grade';
|
||||
|
@ -1 +1,2 @@
|
||||
completiontimespent,mod_lesson
|
||||
grade,mod_lesson
|
||||
|
@ -247,7 +247,6 @@ $string['fractionsnomax'] = 'One of the answers should be 100%, so that it is<br
|
||||
$string['full'] = 'Expanded';
|
||||
$string['general'] = 'General';
|
||||
$string['gotoendoflesson'] = 'Go to the end of the lesson';
|
||||
$string['grade'] = 'Grade';
|
||||
$string['gradebetterthan'] = 'Grade better than (%)';
|
||||
$string['gradebetterthanerror'] = 'Earn a grade better than {$a} percent';
|
||||
$string['graded'] = 'Graded';
|
||||
@ -614,3 +613,6 @@ $string['youshouldview'] = 'You should answer at least: {$a}';
|
||||
|
||||
// Deprecated since 4.3.
|
||||
$string['completiontimespent'] = 'Student must do this activity at least for';
|
||||
|
||||
// Deprecated since Moodle 4.4.
|
||||
$string['grade'] = 'Grade';
|
||||
|
@ -314,7 +314,7 @@ if ($action === 'delete') {
|
||||
$table->data[] = array(get_string("timetaken", "lesson").":", format_time($userstats->timetotake));
|
||||
$table->data[] = array(get_string("completed", "lesson").":", userdate($userstats->completed));
|
||||
$table->data[] = array(get_string('rawgrade', 'lesson').':', $userstats->gradeinfo->earned.'/'.$userstats->gradeinfo->total);
|
||||
$table->data[] = array(get_string("grade", "lesson").":", $userstats->grade."%");
|
||||
$table->data[] = array(get_string("gradenoun").":", $userstats->grade."%");
|
||||
}
|
||||
echo html_writer::table($table);
|
||||
|
||||
|
@ -282,7 +282,7 @@ abstract class attempts_report extends report_base {
|
||||
protected function add_grade_columns($quiz, $usercanseegrades, &$columns, &$headers, $includefeedback = true) {
|
||||
if ($usercanseegrades) {
|
||||
$columns[] = 'sumgrades';
|
||||
$headers[] = get_string('grade', 'quiz') . '/' .
|
||||
$headers[] = get_string('gradenoun') . '/' .
|
||||
quiz_format_grade($quiz, $quiz->grade);
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ if (has_capability('mod/quiz:viewreports', $coursecontext)) {
|
||||
|
||||
} else if (has_any_capability(['mod/quiz:reviewmyattempts', 'mod/quiz:attempt'],
|
||||
$coursecontext)) {
|
||||
array_push($headings, get_string('grade', 'quiz'));
|
||||
array_push($headings, get_string('gradenoun'));
|
||||
array_push($align, 'left');
|
||||
if ($showfeedback) {
|
||||
array_push($headings, get_string('feedback', 'quiz'));
|
||||
|
@ -5,3 +5,4 @@ completiondetail:passgrade,mod_quiz
|
||||
gradetopassnotset,mod_quiz
|
||||
basicideasofquiz,mod_quiz
|
||||
completionminattemptsgroup,mod_quiz
|
||||
grade,mod_quiz
|
||||
|
@ -429,7 +429,6 @@ $string['graceperiod_help'] = 'If what to do when the time expires is set to \'T
|
||||
$string['graceperiodmin'] = 'Last submission grace period';
|
||||
$string['graceperiodmin_desc'] = 'There is a potential problem right at the end of the quiz. On the one hand, we want to let students continue working right up until the last second - with the help of the timer that automatically submits the quiz when time runs out. On the other hand, the server may then be overloaded, and take some time to get to process the responses. Therefore, we will accept responses for up to this long after time expires, so they are not penalised for the server being slow. However, the student could cheat and get this many seconds to answer the quiz. You have to make a trade-off based on how much you trust the performance of your server during quizzes.';
|
||||
$string['graceperiodtoosmall'] = 'The grace period must be more than {$a}.';
|
||||
$string['grade'] = 'Grade';
|
||||
$string['gradeall'] = 'Grade all';
|
||||
$string['gradeaverage'] = 'Average grade';
|
||||
$string['gradeboundary'] = 'Grade boundary';
|
||||
@ -1089,3 +1088,6 @@ $string['basicideasofquiz'] = 'The basic ideas of quiz-making';
|
||||
|
||||
// Deprecated since Moodle 4.3.
|
||||
$string['completionminattemptsgroup'] = 'Require attempts';
|
||||
|
||||
// Deprecated since Moodle 4.4.
|
||||
$string['grade'] = 'Grade';
|
||||
|
@ -5,3 +5,4 @@ bystudentlastname,quiz_grading
|
||||
gradingattemptwithidnumber,quiz_grading
|
||||
orderattempts,quiz_grading
|
||||
randomly,quiz_grading
|
||||
grade,quiz_grading
|
||||
|
@ -34,7 +34,6 @@ $string['changeoptions'] = 'Change options';
|
||||
$string['essayonly'] = 'The following questions need to be graded manually';
|
||||
$string['invalidquestionid'] = 'Gradable question with ID {$a} not found';
|
||||
$string['invalidattemptid'] = 'No such attempt ID exists';
|
||||
$string['grade'] = 'grade';
|
||||
$string['gradeall'] = 'grade all';
|
||||
$string['gradeattemptsall'] = 'All ({$a})';
|
||||
$string['gradeattemptsautograded'] = 'Those that have been graded automatically ({$a})';
|
||||
@ -86,3 +85,4 @@ $string['bystudentlastname'] = 'By student last name';
|
||||
$string['gradingattemptwithidnumber'] = 'Attempt number {$a->attempt} for {$a->fullname} ({$a->idnumber})';
|
||||
$string['orderattempts'] = 'Order attempts';
|
||||
$string['randomly'] = 'Randomly';
|
||||
$string['grade'] = 'grade';
|
||||
|
@ -99,17 +99,18 @@ class quiz_grading_renderer extends plugin_renderer_base {
|
||||
*
|
||||
* @param stdClass $counts
|
||||
* @param string $type Type of grade.
|
||||
* @param string $gradestring Lang string.
|
||||
* @param string $string Lang string.
|
||||
* @param string $component Lang string component.
|
||||
* @param moodle_url $gradequestionurl Url to grade question.
|
||||
* @return string The HTML for the question grade link.
|
||||
* @throws coding_exception
|
||||
*/
|
||||
public function render_grade_link($counts, $type, $gradestring, $gradequestionurl) {
|
||||
public function render_grade_link($counts, $type, $string, $component, $gradequestionurl) {
|
||||
$output = '';
|
||||
if ($counts->$type > 0) {
|
||||
$output .= ' ' . html_writer::link(
|
||||
$gradequestionurl,
|
||||
get_string($gradestring, 'quiz_grading'),
|
||||
get_string($string, $component),
|
||||
['class' => 'gradetheselink']);
|
||||
}
|
||||
return $output;
|
||||
|
@ -320,14 +320,15 @@ class quiz_grading_report extends report_base {
|
||||
*
|
||||
* @param stdClass $counts counts of different types of attempt for this slot.
|
||||
* @param string $type the type of count to format.
|
||||
* @param string $gradestring get_string identifier for the grading link text, if required.
|
||||
* @param string $string get_string identifier for the grading link text, if required.
|
||||
* @param string $component get_string component identifier for the grading link text, if required.
|
||||
* @return string HTML.
|
||||
*/
|
||||
protected function format_count_for_table($counts, $type, $gradestring) {
|
||||
protected function format_count_for_table($counts, $type, $string, $component) {
|
||||
$result = $counts->$type;
|
||||
if ($counts->$type > 0) {
|
||||
$gradeurl = $this->grade_question_url($counts->slot, $counts->questionid, $type);
|
||||
$result .= $this->renderer->render_grade_link($counts, $type, $gradestring, $gradeurl);
|
||||
$result .= $this->renderer->render_grade_link($counts, $type, $string, $component, $gradeurl);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
@ -388,15 +389,15 @@ class quiz_grading_report extends report_base {
|
||||
|
||||
$row[] = format_string($counts->name);
|
||||
|
||||
$row[] = $this->format_count_for_table($counts, 'needsgrading', 'grade');
|
||||
$row[] = $this->format_count_for_table($counts, 'needsgrading', 'gradeverb', 'moodle');
|
||||
|
||||
$row[] = $this->format_count_for_table($counts, 'manuallygraded', 'updategrade');
|
||||
$row[] = $this->format_count_for_table($counts, 'manuallygraded', 'updategrade', 'quiz_grading');
|
||||
|
||||
if ($includeauto) {
|
||||
$row[] = $this->format_count_for_table($counts, 'autograded', 'updategrade');
|
||||
$row[] = $this->format_count_for_table($counts, 'autograded', 'updategrade', 'quiz_grading');
|
||||
}
|
||||
|
||||
$row[] = $this->format_count_for_table($counts, 'all', 'gradeall');
|
||||
$row[] = $this->format_count_for_table($counts, 'all', 'gradeall', 'quiz_grading');
|
||||
|
||||
$data[] = $row;
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ Feature: Basic use of the Manual grading report
|
||||
And "Essay Q1" row "To grade" column of "questionstograde" table should contain "3"
|
||||
And "Essay Q1" row "Already graded" column of "questionstograde" table should contain "0"
|
||||
# Go to the grading page.
|
||||
And I click on "grade" "link" in the "Essay Q1" "table_row"
|
||||
And I click on "Grade" "link" in the "Essay Q1" "table_row"
|
||||
And I should see "Grading attempts 1 to 3 of 3"
|
||||
And I set the following fields to these values:
|
||||
| Questions per page | 1 |
|
||||
|
@ -2,6 +2,16 @@ This files describes API changes for quiz report plugins.
|
||||
|
||||
Overview of this plugin type at http://docs.moodle.org/dev/Quiz_reports
|
||||
|
||||
=== 4.4 ===
|
||||
|
||||
* The function quiz_grading_report::format_count_for_table now requires a string identifier and
|
||||
a component identifier so that it is possible to address strings outside of
|
||||
quiz/report/grading/lang/en/quiz_grading.php.
|
||||
|
||||
* The function quiz_grading_renderer::render_grade_link now requires a string identifier and
|
||||
a component identifier so that it is possible to address strings outside of
|
||||
quiz/report/grading/lang/en/quiz_grading.php.
|
||||
|
||||
=== 4.2 ===
|
||||
|
||||
* There was an ill-advised, never documented, API change in quiz_report_get_significant_questions
|
||||
|
@ -198,7 +198,7 @@ if ($options->marks >= question_display_options::MARK_AND_MAX && quiz_has_grades
|
||||
|
||||
} else if (is_null($grade)) {
|
||||
$summarydata['grade'] = [
|
||||
'title' => get_string('grade', 'quiz'),
|
||||
'title' => get_string('gradenoun'),
|
||||
'content' => quiz_format_grade($quiz, $grade),
|
||||
];
|
||||
|
||||
@ -229,7 +229,7 @@ if ($options->marks >= question_display_options::MARK_AND_MAX && quiz_has_grades
|
||||
$formattedgrade = get_string('outof', 'quiz', $a);
|
||||
}
|
||||
$summarydata['grade'] = [
|
||||
'title' => get_string('grade', 'quiz'),
|
||||
'title' => get_string('gradenoun'),
|
||||
'content' => $formattedgrade,
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user