mirror of
https://github.com/moodle/moodle.git
synced 2025-02-24 20:13:14 +01:00
MDL-81909 mod_assign: Additional doc and styling fixes
This commit is contained in:
parent
46cbbe1d6a
commit
7662c15e56
@ -18,7 +18,7 @@
|
||||
* Unit tests for (some of) mod/assign/locallib.php.
|
||||
*
|
||||
* @package mod_assign
|
||||
* @category phpunit
|
||||
* @category test
|
||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
@ -147,9 +147,9 @@ final class locallib_test extends \advanced_testcase {
|
||||
/**
|
||||
* Data provider for test_get_assign_perpage
|
||||
*
|
||||
* @return array Provider data
|
||||
* @return array[] Provider data
|
||||
*/
|
||||
public static function get_assign_perpage_provider() {
|
||||
public static function get_assign_perpage_provider(): array {
|
||||
return [
|
||||
[
|
||||
'maxperpage' => -1,
|
||||
@ -942,9 +942,9 @@ final class locallib_test extends \advanced_testcase {
|
||||
/**
|
||||
* Dataprovider for the test_new_submission_empty testcase
|
||||
*
|
||||
* @return array of testcases
|
||||
* @return array[] An array of testcases
|
||||
*/
|
||||
public static function new_submission_empty_testcases() {
|
||||
public static function new_submission_empty_testcases(): array {
|
||||
return [
|
||||
'With file and onlinetext' => [
|
||||
[
|
||||
@ -2472,7 +2472,11 @@ final class locallib_test extends \advanced_testcase {
|
||||
// No feedback should be available because the grade is hidden.
|
||||
$this->setUser($student);
|
||||
$output = $assign->view_student_summary($student, true);
|
||||
$this->assertDoesNotMatchRegularExpression('/Feedback/', $output, 'Do not show feedback if the grade is hidden in the gradebook');
|
||||
$this->assertDoesNotMatchRegularExpression(
|
||||
'/Feedback/',
|
||||
$output,
|
||||
'Do not show feedback if the grade is hidden in the gradebook'
|
||||
);
|
||||
|
||||
// Show the feedback again - it should still be visible even in a frozen context.
|
||||
$this->setUser($teacher);
|
||||
@ -3192,7 +3196,12 @@ final class locallib_test extends \advanced_testcase {
|
||||
$this->assertEquals($isenabled, (bool) $plugin->is_enabled('enabled'));
|
||||
}
|
||||
|
||||
public static function submission_plugin_settings_provider() {
|
||||
/**
|
||||
* Data provider for test_submission_comment_plugin_settings.
|
||||
*
|
||||
* @return array[]
|
||||
*/
|
||||
public static function submission_plugin_settings_provider(): array {
|
||||
return [
|
||||
'CFG->usecomments true, empty config => Enabled by default' => [
|
||||
true,
|
||||
@ -3327,7 +3336,12 @@ Anchor link 2:<a title=\"bananas\" href=\"../logo-240x60.gif\">Link text</a>
|
||||
$this->assertEquals($isenabled, (bool) $plugin->is_enabled('enabled'));
|
||||
}
|
||||
|
||||
public static function feedback_plugin_settings_provider() {
|
||||
/**
|
||||
* Data provider for test_feedback_plugin_settings.
|
||||
*
|
||||
* @return array[]
|
||||
*/
|
||||
public static function feedback_plugin_settings_provider(): array {
|
||||
return [
|
||||
'No configuration => disabled' => [
|
||||
[],
|
||||
@ -4072,7 +4086,7 @@ Anchor link 2:<a title=\"bananas\" href=\"../logo-240x60.gif\">Link text</a>
|
||||
* Data provider for test_fix_null_grades
|
||||
* @return array[] Test data for test_fix_null_grades. Each element should contain grade, expectedcount and gradebookvalue
|
||||
*/
|
||||
public static function fix_null_grades_provider() {
|
||||
public static function fix_null_grades_provider(): array {
|
||||
return [
|
||||
'Negative less than one is errant' => [
|
||||
'grade' => -0.64,
|
||||
@ -4261,8 +4275,10 @@ Anchor link 2:<a title=\"bananas\" href=\"../logo-240x60.gif\">Link text</a>
|
||||
|
||||
/**
|
||||
* The test_assign_get_instance data provider.
|
||||
*
|
||||
* @return array[]
|
||||
*/
|
||||
public static function assign_get_instance_provider() {
|
||||
public static function assign_get_instance_provider(): array {
|
||||
$timenow = time();
|
||||
|
||||
// The get_default_instance() method shouldn't calculate any properties per-user. It should just return the record data.
|
||||
@ -4346,8 +4362,10 @@ Anchor link 2:<a title=\"bananas\" href=\"../logo-240x60.gif\">Link text</a>
|
||||
|
||||
/**
|
||||
* The test_assign_get_default_instance data provider.
|
||||
*
|
||||
* @return array[]
|
||||
*/
|
||||
public static function assign_get_default_instance_provider() {
|
||||
public static function assign_get_default_instance_provider(): array {
|
||||
$timenow = time();
|
||||
|
||||
// The get_default_instance() method shouldn't calculate any properties per-user. It should just return the record data.
|
||||
|
Loading…
x
Reference in New Issue
Block a user