Integrates a submissions page link into the assignment's secondary
navigation, eliminates the redundant 'View all submissions' button
from the assignment's homepage and updates the existing behat tests.
The comboboxsearch component now has uses beyond the grade subcomponent
and includes alternative step definitions in behat_general.php. This
change deprecates the redundant behat step definitions related to this
component in behat_grade.php and replaces current usages with the
alternative definitions.
This fixes various (not all) wrong @covers annotations that
are reported as warnings by PHPUnit when it's run with
code-coverage enabled.
When possible, the preferred solution is to change to
@covers at class level, that is the recommended way.
If multiple classes are involved, then a mix of @coversDefaultClass
and @covers at method level are used (always trying to use the
minimum needed patch).
This is the first of a series of issues created as sub-tasks
of MDL-82142.
All setUp(), tearDown(), setUpBeforeClass() and tearDownAfterClass()
must, always, call to parent, to ensure that everything is properly
set and cleaned.
While in a lot of situations this is not needed (parents may not
have anything to run), with PHPUnit >= 10 this can become more
important because we are going to move the reset code from current
placement @ runBare() to setUp()/tearDown().
Note that all the changes performed in this commit have been detected
and fixed by moodle-cs (ParentSetUpTearDownSniffTest).
While this change is not 100% required now, it's good habit
and we are checking for it since Moodle 4.4.
All the changes in this commit have been applied automatically
using the moodle.PHPUnit.TestReturnType sniff and are, exclusively
adding the ": void" return types when missing.
Prior to this change, when importing grades from .csv (or another
method) and you choose to map the grades to a 'New grade item', you get
the following error message:
```
"Mapping collision detected - two fields maps to the same grade item
new."
```
A workaround existed that required users to import one column at a time,
which was cumbersome.
This change fixes importing multiple new grade items and adds a behat
test.
Co-authored-by: hehe009 <max_kan@hotmail.com>
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing
All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.
Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
Introduces a new admin setting to configure the default export method
used for redirecting the user via /grade/export/index.php
Signed-off-by: Gregor Eichelberger <gregor.eichelberger@tuwien.ac.at>
Various re-factors over recent releases appear to have led to quite a
drift between actual functionality and what these scenarios assert for
imagined functionality. Page elements and content are referenced that
don't exist in multiple places.
get_gradable_users now has extra param to retrieve only active
users. Grade reports hase their own grade_report::get_gradable_users
since they decided whether to inlcude active users from report preferences
This is a hack since average is not correct for summary report
when we have suspended users. But since we don't want to change
display to user - it is set to match 4.1 behavior.
On grader report we include hidden grades in averages calculations.
On user report we don't include hidden grades. So to allow using of
calculate_averages it needs to be refactored for this case.
We also have to add group id param to calculate_average since for
grader report we calculate both overall average and group average
* Feature: We can use a minimum grade different than zero
- Use correct minimum input values.
- Use data generators for faster test execution.
* Scenario: Disable category overriding
- Use the field name to ensure that the correct field is being tested.
Avoids validating form data which is carried over from the
simple dynamic form to the advanced form page when creating
or editing grade items, categories and outcomes in the
Gradebook setup.