Merge branch 'MDL-77447-master' of https://github.com/ilyatregubov/moodle

This commit is contained in:
Jun Pataleta
2023-08-02 16:13:19 +08:00
17 changed files with 198 additions and 145 deletions
+18 -34
View File
@@ -2495,51 +2495,35 @@ class grade_structure {
* Sets status icons for the grade.
*
* @param array $element array with grade item info
* @return string status icons container HTML
* @return string|null status icons container HTML
*/
public function set_grade_status_icons(array $element): string {
public function set_grade_status_icons(array $element): ?string {
global $OUTPUT;
$attributes = ['class' => 'text-muted'];
$statusicons = '';
if ($element['object']->is_hidden()) {
$statusicons .= $OUTPUT->pix_icon('i/show', grade_helper::get_lang_string('hidden', 'grades'),
'moodle', $attributes);
}
if ($element['object']->is_locked()) {
$statusicons .= $OUTPUT->pix_icon('i/lock', grade_helper::get_lang_string('locked', 'grades'),
'moodle', $attributes);
}
$context = [
'hidden' => $element['object']->is_hidden(),
'locked' => $element['object']->is_locked(),
];
if ($element['object'] instanceof grade_grade) {
$grade = $element['object'];
if ($grade->is_overridden()) {
$statusicons .= $OUTPUT->pix_icon('i/overriden_grade',
grade_helper::get_lang_string('overridden', 'grades'), 'moodle', $attributes);
}
if ($grade->is_excluded()) {
$statusicons .= $OUTPUT->pix_icon('i/excluded', grade_helper::get_lang_string('excluded', 'grades'),
'moodle', $attributes);
}
$context['overridden'] = $grade->is_overridden();
$context['excluded'] = $grade->is_excluded();
$context['feedback'] = !empty($grade->feedback) && $grade->load_grade_item()->gradetype != GRADE_TYPE_TEXT;
}
$class = 'grade_icons data-collapse_gradeicons';
// Early return if there aren't any statuses that we need to show.
if (!in_array(true, $context)) {
return null;
}
$context['classes'] = 'grade_icons data-collapse_gradeicons';
if (isset($element['type']) && ($element['type'] == 'category')) {
$class = 'category_grade_icons';
$context['classes'] = 'category_grade_icons';
}
if (!empty($grade->feedback) && $grade->load_grade_item()->gradetype != GRADE_TYPE_TEXT) {
$statusicons .= $OUTPUT->pix_icon('i/asterisk', grade_helper::get_lang_string('feedbackprovided', 'grades'),
'moodle', $attributes);
}
if ($statusicons) {
$statusicons = $OUTPUT->container($statusicons, $class);
}
return $statusicons;
return $OUTPUT->render_from_template('core_grades/status_icons', $context);
}
/**
@@ -215,24 +215,21 @@ class grade extends tablelike implements selectable_items, filterable_items {
$grade = $this->fetch_grade_or_default($this->item, $item->id);
$lockicon = '';
$gradestatus = '';
$context = [
'hidden' => $grade->is_hidden(),
'locked' => $grade->is_locked(),
];
$lockedgrade = $lockedgradeitem = 0;
if (!empty($grade->locked)) {
$lockedgrade = 1;
}
if (!empty($grade->grade_item->locked)) {
$lockedgradeitem = 1;
}
// Check both grade and grade item.
if ( $lockedgrade || $lockedgradeitem ) {
$lockicon = $OUTPUT->pix_icon('t/locked', 'grade is locked') . ' ';
if (in_array(true, $context)) {
$context['classes'] = 'gradestatus';
$gradestatus = $OUTPUT->render_from_template('core_grades/status_icons', $context);
}
if (has_capability('moodle/site:viewfullnames', \context_course::instance($this->courseid))) {
$fullname = $lockicon . fullname($item, true);
$fullname = fullname($item, true);
} else {
$fullname = $lockicon . fullname($item);
$fullname = fullname($item);
}
$item->imagealt = $fullname;
@@ -245,7 +242,7 @@ class grade extends tablelike implements selectable_items, filterable_items {
$line = [
html_writer::link($url, $userpic . $fullname),
$this->get_user_action_menu($item),
$formatteddefinition['finalgrade'],
$formatteddefinition['finalgrade'] . $gradestatus,
$this->item_range(),
$formatteddefinition['feedback'],
$formatteddefinition['override'],
@@ -169,18 +169,16 @@ class user extends tablelike implements selectable_items {
global $OUTPUT;
$grade = $this->fetch_grade_or_default($item, $this->item->id);
$lockicon = '';
$gradestatus = '';
$lockeditem = $lockeditemgrade = 0;
if (!empty($grade->locked)) {
$lockeditem = 1;
}
if (!empty($grade->grade_item->locked)) {
$lockeditemgrade = 1;
}
// Check both grade and grade item.
if ($lockeditem || $lockeditemgrade) {
$lockicon = $OUTPUT->pix_icon('t/locked', 'grade is locked', 'moodle', ['class' => 'ml-3']);
$context = [
'hidden' => $grade->is_hidden(),
'locked' => $grade->is_locked(),
];
if (in_array(true, $context)) {
$context['classes'] = 'gradestatus';
$gradestatus = $OUTPUT->render_from_template('core_grades/status_icons', $context);
}
// Create a fake gradetreeitem so we can call get_element_header().
@@ -210,10 +208,10 @@ class user extends tablelike implements selectable_items {
}
$line = [
html_writer::div($itemicon . $itemcontent . $lockicon, "{$type} d-flex align-items-center"),
html_writer::div($itemicon . $itemcontent, "{$type} d-flex align-items-center"),
$this->get_item_action_menu($item),
$this->category($item),
$formatteddefinition['finalgrade'],
$formatteddefinition['finalgrade'] . $gradestatus,
new range($item),
$formatteddefinition['feedback'],
$formatteddefinition['override'],
@@ -17,9 +17,7 @@
namespace gradereport_singleview\report;
use context_course;
use grade_helper;
use grade_report;
use html_writer;
use moodle_url;
use renderer_base;
use stdClass;
+22 -13
View File
@@ -446,7 +446,7 @@ class user extends grade_report {
$gradeobject = $element['object'];
$eid = $gradeobject->id;
$element['userid'] = $this->user->id;
$fullname = $this->gtree->get_element_header($element, true, false, true, true, true);
$fullname = $this->gtree->get_element_header($element, true, false, true, false, true);
$data = [];
$gradeitemdata = [];
$hidden = '';
@@ -603,6 +603,22 @@ class user extends grade_report {
}
if ($this->showgrade) {
$gradestatus = '';
// We only show status icons for a teacher if he views report as himself.
if (isset($this->viewasuser) && !$this->viewasuser) {
$context = [
'hidden' => $gradegrade->is_hidden(),
'locked' => $gradegrade->is_locked(),
'overridden' => $gradegrade->is_overridden(),
'excluded' => $gradegrade->is_excluded()
];
if (in_array(true, $context)) {
$context['classes'] = 'gradestatus';
$gradestatus = $OUTPUT->render_from_template('core_grades/status_icons', $context);
}
}
$gradeitemdata['graderaw'] = null;
$gradeitemdata['gradehiddenbydate'] = false;
$gradeitemdata['gradeneedsupdate'] = $gradegrade->grade_item->needsupdate;
@@ -633,7 +649,7 @@ class user extends grade_report {
userdate(
$gradegrade->get_datesubmitted(),
get_string('strftimedatetimeshort')
)
) . $gradestatus
);
$gradeitemdata['gradehiddenbydate'] = true;
} else if ($gradegrade->is_hidden()) {
@@ -644,7 +660,7 @@ class user extends grade_report {
$gradeitemdata['graderaw'] = $gradeval;
$data['grade']['content'] = grade_format_gradevalue($gradeval,
$gradegrade->grade_item,
true);
true) . $gradestatus;
}
} else {
$gradestatusclass = '';
@@ -671,7 +687,7 @@ class user extends grade_report {
$data['grade']['class'] = "{$class} {$gradestatusclass}";
$data['grade']['content'] = $gradepassicon . grade_format_gradevalue($gradeval,
$gradegrade->grade_item, true);
$gradegrade->grade_item, true) . $gradestatus;
$gradeitemdata['graderaw'] = $gradeval;
}
$data['grade']['headers'] = "$headercat $headerrow grade";
@@ -814,17 +830,10 @@ class user extends grade_report {
);
}
if ($gradegrade->overridden > 0 && ($type == 'categoryitem' || $type == 'courseitem')) {
$data['feedback']['class'] = $classfeedback.' feedbacktext';
$data['feedback']['content'] = get_string('overridden', 'grades').': ' .
format_text($gradegrade->feedback, $gradegrade->feedbackformat,
['context' => $gradegrade->get_context()]);
$gradeitemdata['feedback'] = $gradegrade->feedback;
} else if (empty($gradegrade->feedback) || (!$this->canviewhidden && $gradegrade->is_hidden())) {
$data['feedback']['class'] = $classfeedback.' feedbacktext';
$data['feedback']['class'] = $classfeedback.' feedbacktext';
if (empty($gradegrade->feedback) || (!$this->canviewhidden && $gradegrade->is_hidden())) {
$data['feedback']['content'] = ' ';
} else {
$data['feedback']['class'] = $classfeedback.' feedbacktext';
$data['feedback']['content'] = format_text($gradegrade->feedback, $gradegrade->feedbackformat,
['context' => $gradegrade->get_context()]);
$gradeitemdata['feedback'] = $gradegrade->feedback;
-4
View File
@@ -185,7 +185,3 @@
display: none;
}
}
#fitem_id_submitbutton {
padding-right: 2em;
}
+35
View File
@@ -0,0 +1,35 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_grades/status_icons
Template for the grade status icons.
Example context (json):
{
"classes": "gradestatus",
"hidden": true,
"locked": true,
"overridden": false,
"excluded": false,
"feedback": false
}
}}
<div class="text-muted {{classes}}">
{{#hidden}}{{#pix}}i/show, moodle, {{#str}} hidden, grades {{/str}}{{/pix}}{{/hidden}}
{{#locked}}{{#pix}}i/lock, moodle, {{#str}} locked, grades {{/str}}{{/pix}}{{/locked}}
{{#overridden}}{{#pix}}i/overriden_grade, moodle, {{#str}} overridden, grades {{/str}}{{/pix}}{{/overridden}}
{{#excluded}}{{#pix}}i/excluded, moodle, {{#str}} excluded, grades {{/str}}{{/pix}}{{/excluded}}
{{#feedback}}{{#pix}}i/asterisk, moodle, {{#str}} feedbackprovided, grades {{/str}}{{/pix}}{{/feedback}}
</div>
@@ -45,10 +45,10 @@ Feature: Calculated grade items can be used in the gradebook
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 050 | 75.00 % | - |
| Course total | - | 37.50 | 050 | 75.00 % | - |
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0100 | 75.00 % | - |
| Calc cat total | 100.00 % | 37.50 | 050 | 75.00 % | - |
| Course total | - | 37.50 | 050 | 75.00 % | - |
@javascript
Scenario: Changing max grade for a category item with a calculation that has existing grades will display the same points with the new max grade values immediately.
@@ -75,10 +75,10 @@ Feature: Calculated grade items can be used in the gradebook
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 050 | 75.00 % | - |
| Course total | - | 37.50 | 050 | 75.00 % | - |
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0100 | 75.00 % | - |
| Calc cat total | 100.00 % | 37.50 | 050 | 75.00 % | - |
| Course total | - | 37.50 | 050 | 75.00 % | - |
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Calc cat" of type "category" on "setup" page:
| Maximum grade | 40 |
@@ -88,16 +88,16 @@ Feature: Calculated grade items can be used in the gradebook
And I navigate to "View > User report" in the course gradebook
When I click on "Student 1" in the "user" search widget
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 040 | 93.75 % | - |
| Course total | - | 37.50 | 040 | 93.75 % | - |
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0100 | 75.00 % | - |
| Calc cat total | 100.00 % | 37.50 | 040 | 93.75 % | - |
| Course total | - | 37.50 | 040 | 93.75 % | - |
And I click on "Student 2" in the "user" search widget
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 65.00 | 0100 | 65.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 32.50 | 040 | 81.25 % | - |
| Course total | - | 32.50 | 040 | 81.25 % | - |
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 65.00 | 0100 | 65.00 % | - |
| Calc cat total | 100.00 % | 32.50 | 040 | 81.25 % | - |
| Course total | - | 32.50 | 040 | 81.25 % | - |
And I navigate to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
| Min and max grades used in calculation | Initial min and max grades |
@@ -105,16 +105,16 @@ Feature: Calculated grade items can be used in the gradebook
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 040 | 93.75 % | - |
| Course total | - | 37.50 | 040 | 93.75 % | - |
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0100 | 75.00 % | - |
| Calc cat total | 100.00 % | 37.50 | 040 | 93.75 % | - |
| Course total | - | 37.50 | 040 | 93.75 % | - |
And I click on "Student 2" in the "user" search widget
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 65.00 | 0100 | 65.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 32.50 | 040 | 81.25 % | - |
| Course total | - | 32.50 | 040 | 81.25 % | - |
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 65.00 | 0100 | 65.00 % | - |
| Calc cat total | 100.00 % | 32.50 | 040 | 81.25 % | - |
| Course total | - | 32.50 | 040 | 81.25 % | - |
@javascript
Scenario: Values in calculated grade items are not always out of one hundred
@@ -48,7 +48,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0100 | 37.50 % | - |
| Calc cat total | 100.00 % | 37.50 | 0100 | 37.50 % | - |
| Course total | - | 37.50 | 0100 | 37.50 % | - |
@javascript
@@ -76,7 +76,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0100 | 37.50 % | - |
| Calc cat total | 100.00 % | 37.50 | 0100 | 37.50 % | - |
| Course total | - | 37.50 | 0100 | 37.50 % | - |
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Calc cat" of type "category" on "setup" page:
@@ -89,13 +89,13 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0100 | 37.50 % | - |
| Calc cat total | 100.00 % | 37.50 | 0100 | 37.50 % | - |
| Course total | - | 37.50 | 0100 | 37.50 % | - |
And I click on "Student 2" in the "user" search widget
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 65.00 | 0100 | 65.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 32.50 | 0100 | 32.50 % | - |
| Calc cat total | 100.00 % | 32.50 | 0100 | 32.50 % | - |
| Course total | - | 32.50 | 0100 | 32.50 % | - |
And I navigate to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
@@ -106,13 +106,13 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0100 | 37.50 % | - |
| Calc cat total | 100.00 % | 37.50 | 0100 | 37.50 % | - |
| Course total | - | 37.50 | 0100 | 37.50 % | - |
And I click on "Student 2" in the "user" search widget
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 65.00 | 0100 | 65.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 32.50 | 0100 | 32.50 % | - |
| Calc cat total | 100.00 % | 32.50 | 0100 | 32.50 % | - |
| Course total | - | 32.50 | 0100 | 32.50 % | - |
@javascript
@@ -227,7 +227,7 @@ Feature: We can understand the gradebook user report
| Test assignment four | 33.33 % | 10.00 | 1.11 % |
| Test assignment five | 33.33 % | 70.00 | 7.78 % |
| Test assignment six | 33.33 % | 30.00 | 3.33 % |
| Sub category totalWeighted mean of grades.| 33.33 % | 36.67 | - |
| Sub category total | 33.33 % | 36.67 | - |
| Course total | - | 156.67 | - |
@javascript @skip_chrome_zerosize
+8 -8
View File
@@ -129,10 +129,10 @@ Feature: View gradebook when scales are used
And I navigate to "View > User report" in the course gradebook
And I click on "Student 3" in the "user" search widget
And the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | C | FA | 50.00 % | <contrib3> |
| Sub category (<aggregation>) total<aggregation>. | 3.00 | 15 | 50.00 % | - |
| Course total<aggregation>. | <coursetotal3> | 0100 | <courseperc3> | - |
| Grade item | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | C | FA | 50.00 % | <contrib3> |
| Sub category (<aggregation>) total | 3.00 | 15 | 50.00 % | - |
| Course total | <coursetotal3> | 0100 | <courseperc3> | - |
And I navigate to "Setup > Gradebook setup" in the course gradebook
And the following should exist in the "grade_edit_tree_table" table:
| Name | Max grade |
@@ -144,10 +144,10 @@ Feature: View gradebook when scales are used
And I follow "Grades" in the user menu
And I click on "Course 1" "link" in the "region-main" "region"
And the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | B | FA | 75.00 % | <contrib2> |
| Sub category (<aggregation>) total<aggregation>. | 4.00 | 15 | 75.00 % | - |
| Course total<aggregation>. | <coursetotal2> | 0100 | <courseperc2> | - |
| Grade item | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | B | FA | 75.00 % | <contrib2> |
| Sub category (<aggregation>) total | 4.00 | 15 | 75.00 % | - |
| Course total | <coursetotal2> | 0100 | <courseperc2> | - |
Examples:
| aggregation | coursetotal1 | coursetotal2 | coursetotal3 | coursetotal4 | coursetotal5 |overallavg | courseperc2 | courseperc3 | contrib2 | contrib3 |
@@ -49,10 +49,10 @@ Feature: Control the aggregation of the scales
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
Then the following should exist in the "user-grade" table:
| Grade item | Grade | Percentage | Contribution to course total |
| Grade me | 10.00 | 10.00 % | <gradecontrib> |
| Scale me | B | 75.00 % | <scalecontrib> |
| Course total<totalstr> | <coursetotal> | <coursepc> | - |
| Grade item | Grade | Percentage | Contribution to course total |
| Grade me | 10.00 | 10.00 % | <gradecontrib> |
| Scale me | B | 75.00 % | <scalecontrib> |
| Course total | <coursetotal> | <coursepc> | - |
And I log out
And I log in as "admin"
And I set the following administration settings values:
@@ -63,22 +63,22 @@ Feature: Control the aggregation of the scales
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
And the following should exist in the "user-grade" table:
| Grade item | Grade | Percentage | Contribution to course total |
| Grade me | 10.00 | 10.00 % | <gradecontrib2> |
| Scale me | B | 75.00 % | <scalecontrib2> |
| Course total<totalstr> | <coursetotal2> | <coursepc2> | - |
| Grade item | Grade | Percentage | Contribution to course total |
| Grade me | 10.00 | 10.00 % | <gradecontrib2> |
| Scale me | B | 75.00 % | <scalecontrib2> |
| Course total | <coursetotal2> | <coursepc2> | - |
Examples:
| aggregation | totalstr | coursetotal | coursepc | gradecontrib | scalecontrib | coursetotal2 | coursepc2 | gradecontrib2 | scalecontrib2 |
| Natural | | 10.00 | 10.00 % | 10.00 | 0.00 | 14.00 | 13.33 % | 9.52 % | 3.81 % |
| Mean of grades | Mean of grades. | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
| Weighted mean of grades | Weighted mean of grades. | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
| Simple weighted mean of grades | Simple weighted mean of grades. | 10.00 | 10.00 % | 10.00 | 0.00 | 12.50 | 12.50 % | 9.62 % | 2.88 % |
| Mean of grades (with extra credits) | Mean of grades (with extra credits). | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
| Median of grades | Median of grades. | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
| Lowest grade | Lowest grade. | 10.00 | 10.00 % | 10.00 | 0.00 | 10.00 | 10.00 % | 10.00 % | 0.00 % |
| Highest grade | Highest grade. | 10.00 | 10.00 % | 10.00 | 0.00 | 75.00 | 75.00 % | 0.00 % | 75.00 % |
| Mode of grades | Mode of grades. | 10.00 | 10.00 % | 10.00 | 0.00 | 75.00 | 75.00 % | 0.00 % | 75.00 % |
| aggregation | coursetotal | coursepc | gradecontrib | scalecontrib | coursetotal2 | coursepc2 | gradecontrib2 | scalecontrib2 |
| Natural | 10.00 | 10.00 % | 10.00 | 0.00 | 14.00 | 13.33 % | 9.52 % | 3.81 % |
| Mean of grades | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
| Weighted mean of grades | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
| Simple weighted mean of grades | 10.00 | 10.00 % | 10.00 | 0.00 | 12.50 | 12.50 % | 9.62 % | 2.88 % |
| Mean of grades (with extra credits) | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
| Median of grades | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
| Lowest grade | 10.00 | 10.00 % | 10.00 | 0.00 | 10.00 | 10.00 % | 10.00 % | 0.00 % |
| Highest grade | 10.00 | 10.00 % | 10.00 | 0.00 | 75.00 | 75.00 % | 0.00 % | 75.00 % |
| Mode of grades | 10.00 | 10.00 % | 10.00 | 0.00 | 75.00 | 75.00 % | 0.00 % | 75.00 % |
Scenario: Weights of scales cannot be edited when they are not aggregated
Given I log in as "teacher1"
@@ -103,10 +103,10 @@ Feature: View gradebook when single item scales are used
And I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
And the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Contribution to course total |
| Test assignment one | Ace! | Ace!Ace! | <contrib1> |
| Sub category (<aggregation>) total<aggregation>. | <cattotal1> | 0100 | - |
| Course total<aggregation>. | <coursetotal1> | 0100 | - |
| Grade item | Grade | Range | Contribution to course total |
| Test assignment one | Ace! | Ace!Ace! | <contrib1> |
| Sub category (<aggregation>) total | <cattotal1> | 0100 | - |
| Course total | <coursetotal1> | 0100 | - |
And I navigate to "Setup > Gradebook setup" in the course gradebook
And the following should exist in the "grade_edit_tree_table" table:
| Name | Max grade |
+4 -4
View File
@@ -103,10 +103,10 @@ Feature: We can enter in grades and view reports from the gradebook
And I follow "Grades" in the user menu
And I click on "Course 1" "link" in the "region-main" "region"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage |
| Test assignment name 1 | 41.86 % | 80.00 | 0100 | 80.00 % |
| Test assignment name 2 | 58.14 % | 90.00 | 0100 | 90.00 % |
| Course totalWeighted mean of grades. | - | 85.81 | 0100 | 85.81 % |
| Grade item | Calculated weight | Grade | Range | Percentage |
| Test assignment name 1 | 41.86 % | 80.00 | 0100 | 80.00 % |
| Test assignment name 2 | 58.14 % | 90.00 | 0100 | 90.00 % |
| Course total | - | 85.81 | 0100 | 85.81 % |
And the following should not exist in the "user-grade" table:
| Grade item | Calculated weight | Percentage |
| Test assignment name 1 | 0.72% | 0.72% |
+12
View File
@@ -678,3 +678,15 @@
}
}
}
#fitem_id_submitbutton {
padding-right: 2em;
}
.gradestatus {
padding-top: 10px;
}
.gradestatus .icon {
margin-right: 1rem;
}
+12
View File
@@ -35399,6 +35399,18 @@ p.arrow_button {
font-size: 90%;
}
#fitem_id_submitbutton {
padding-right: 2em;
}
.gradestatus {
padding-top: 10px;
}
.gradestatus .icon {
margin-right: 1rem;
}
.columns-autoflow-1to1to1 {
column-count: 3;
}
+12
View File
@@ -35399,6 +35399,18 @@ p.arrow_button {
font-size: 90%;
}
#fitem_id_submitbutton {
padding-right: 2em;
}
.gradestatus {
padding-top: 10px;
}
.gradestatus .icon {
margin-right: 1rem;
}
.columns-autoflow-1to1to1 {
column-count: 3;
}