mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-78320 quiz_overview: format group names in overview report.
This commit is contained in:
parent
2e1c6fd43e
commit
b2dd8a3cbd
2 changed files with 28 additions and 5 deletions
|
@ -135,7 +135,9 @@ class quiz_overview_report extends attempts_report {
|
||||||
$quiz, $groupstudentsjoins);
|
$quiz, $groupstudentsjoins);
|
||||||
if ($currentgroup) {
|
if ($currentgroup) {
|
||||||
$a= new stdClass();
|
$a= new stdClass();
|
||||||
$a->groupname = groups_get_group_name($currentgroup);
|
$a->groupname = format_string(groups_get_group_name($currentgroup), true, [
|
||||||
|
'context' => $this->context,
|
||||||
|
]);
|
||||||
$a->coursestudents = get_string('participants');
|
$a->coursestudents = get_string('participants');
|
||||||
$a->countregradeneeded = $regradesneeded;
|
$a->countregradeneeded = $regradesneeded;
|
||||||
$regradealldrydolabel =
|
$regradealldrydolabel =
|
||||||
|
@ -231,7 +233,10 @@ class quiz_overview_report extends attempts_report {
|
||||||
if ($DB->record_exists_sql($sql, $groupstudentsjoins->params)) {
|
if ($DB->record_exists_sql($sql, $groupstudentsjoins->params)) {
|
||||||
$data = quiz_report_grade_bands($bandwidth, $bands, $quiz->id, $groupstudentsjoins);
|
$data = quiz_report_grade_bands($bandwidth, $bands, $quiz->id, $groupstudentsjoins);
|
||||||
$chart = self::get_chart($labels, $data);
|
$chart = self::get_chart($labels, $data);
|
||||||
$graphname = get_string('overviewreportgraphgroup', 'quiz_overview', groups_get_group_name($currentgroup));
|
$groupname = format_string(groups_get_group_name($currentgroup), true, [
|
||||||
|
'context' => $this->context,
|
||||||
|
]);
|
||||||
|
$graphname = get_string('overviewreportgraphgroup', 'quiz_overview', $groupname);
|
||||||
// Numerical range data should display in LTR even for RTL languages.
|
// Numerical range data should display in LTR even for RTL languages.
|
||||||
echo $output->chart($chart, $graphname, ['dir' => 'ltr']);
|
echo $output->chart($chart, $graphname, ['dir' => 'ltr']);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,9 @@ Feature: Basic use of the Grades report
|
||||||
I need to use the Grades report
|
I need to use the Grades report
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the following "custom profile fields" exist:
|
Given the "multilang" filter is "on"
|
||||||
|
And the "multilang" filter applies to "content and headings"
|
||||||
|
And the following "custom profile fields" exist:
|
||||||
| datatype | shortname | name |
|
| datatype | shortname | name |
|
||||||
| text | fruit | Fruit |
|
| text | fruit | Fruit |
|
||||||
And the following "users" exist:
|
And the following "users" exist:
|
||||||
|
@ -23,12 +25,21 @@ Feature: Basic use of the Grades report
|
||||||
| student1 | C1 | student |
|
| student1 | C1 | student |
|
||||||
| student2 | C1 | student |
|
| student2 | C1 | student |
|
||||||
| student3 | C1 | student |
|
| student3 | C1 | student |
|
||||||
|
And the following "groups" exist:
|
||||||
|
| course | idnumber | name |
|
||||||
|
| C1 | G1 | <span class="multilang" lang="en">English</span><span class="multilang" lang="es">Spanish</span> |
|
||||||
|
| C1 | G2 | Group 2 |
|
||||||
|
And the following "group members" exist:
|
||||||
|
| group | user |
|
||||||
|
| G1 | student1 |
|
||||||
|
| G1 | student2 |
|
||||||
|
| G2 | student3 |
|
||||||
And the following "question categories" exist:
|
And the following "question categories" exist:
|
||||||
| contextlevel | reference | name |
|
| contextlevel | reference | name |
|
||||||
| Course | C1 | Test questions |
|
| Course | C1 | Test questions |
|
||||||
And the following "activities" exist:
|
And the following "activities" exist:
|
||||||
| activity | name | intro | course | idnumber |
|
| activity | name | intro | course | idnumber | groupmode |
|
||||||
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
|
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 2 |
|
||||||
And the following "questions" exist:
|
And the following "questions" exist:
|
||||||
| questioncategory | qtype | name | questiontext |
|
| questioncategory | qtype | name | questiontext |
|
||||||
| Test questions | description | Intro | Welcome to this quiz |
|
| Test questions | description | Intro | Welcome to this quiz |
|
||||||
|
@ -48,6 +59,7 @@ Feature: Basic use of the Grades report
|
||||||
| 2 | True |
|
| 2 | True |
|
||||||
| 3 | True |
|
| 3 | True |
|
||||||
|
|
||||||
|
@javascript
|
||||||
Scenario: Using the Grades report
|
Scenario: Using the Grades report
|
||||||
# Basic check of the Grades report
|
# Basic check of the Grades report
|
||||||
When I am on the "Quiz 1" "quiz activity" page logged in as teacher1
|
When I am on the "Quiz 1" "quiz activity" page logged in as teacher1
|
||||||
|
@ -87,6 +99,12 @@ Feature: Basic use of the Grades report
|
||||||
# Check student2's grade
|
# Check student2's grade
|
||||||
And I should see "100.00" in the "S2 Student2" "table_row"
|
And I should see "100.00" in the "S2 Student2" "table_row"
|
||||||
|
|
||||||
|
# Verify groups are displayed correctly.
|
||||||
|
And I set the field "Visible groups" to "English"
|
||||||
|
And "Full regrade for group 'English'" "button" should exist
|
||||||
|
And "Dry run a full regrade for group 'English'" "button" should exist
|
||||||
|
And I should see "Number of students in group 'English' achieving grade ranges"
|
||||||
|
|
||||||
@javascript
|
@javascript
|
||||||
Scenario: View custom user profile fields in the grades report
|
Scenario: View custom user profile fields in the grades report
|
||||||
Given the following config values are set as admin:
|
Given the following config values are set as admin:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue