13 Commits

Author SHA1 Message Date
Tomo Tsuyuki
b3e046df7e MDL-72451 core: Stop keep regrading when there is an error
Set needsupdate to finish to avoid regrading each call.
Add error messages for regrading.
Display the error message on the quiz page.

Co-authored-by: Mark Johnson <mark.johnson@catalyst-eu.net>
2022-11-17 08:54:47 +00:00
Eloy Lafuente (stronk7)
83b490a594 MDL-75111 phpunit: Move tests to use correct names and ns (take#4)
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- The following task tests have been moved within the level2 directory:
  - \core\adhoc_task_test => \core\task\adhoc_task_test
  - \core\scheduled_task_test => \core\task\scheduled_task_test
  - \core\calendar_cron_task_test => \core\task\calendar_cron_task_test
  - \core\h5p_get_content_types_task_test => \core\task\h5p_get_content_types_task_test
  - \core\task_database_logger_test => \core\task\database_logger_test
  - \core\task_logging_test => \core\task\logging_test

- The following event tests have been moved within level2 directory:
  - \core\event_context_locked_test => \core\event\context_locked_test
  - \core\event_deprecated_test => \core\event\deprecated_test
  - \core\event_grade_deleted_test => \core\event\grade_deleted_test
  - \core\event_profile_field_test => \core\event\profile_field_test
  - \core\event_unknown_logged_test => \core\event\unknown_logged_test
  - \core\event_user_graded_test => \core\event\user_graded_test
  - \core\event_user_password_updated_test => \core\event\user_password_updated_test

- The following output tests have been moved within level2 directory:
  - \core\mustache_template_finder_test => \core\output\mustache_template_finder_test
  - \core\mustache_template_source_loader_test => \core\output\mustache_template_source_loader_test
  - \core\output_mustache_helper_collection_test => \core\output\mustache_helper_collection_test

- The following tests have been moved to their correct tests directories:
  - lib/tests/time_splittings_test.php => analytics/tests/time_splittings_test.php

- All the classes and tests under lib/filebrowser and lib/filestorage
  belong to core, not to core_files. Some day we should move
  them to their correct subsystem.
- All the classes and tests under lib/grade belong to core, not
  to core_grades. Some day we should move them to their correct
  subsystem.
- The core_grades_external class and its \core\grades_external_test
  unit test should belong to the grades subsystem or, alternatively,
  to \core\external, they both should be moved together.
- The core_grading_external class and its \core\grading_external_test
  unit test should belong to the grading subsystem or, alternatively,
  to \core\external, they both should be moved together.
- The \core\message\message and \core\message\inbound (may be others)
  classes, and their associated tests should go to the core_message
  subsystem.
- The core_user class, and its associated tests should go to the
  core_user subsystem.
- The \core\update namespace is plain wrong (update is not valid API)
  and needs action 1) create it or 2) move elsewhere.
2022-08-26 16:34:20 +02:00
Eloy Lafuente (stronk7)
60fe1f8c9d MDL-68388 core_grades: Tweak unit test assertion to make Oracle happy
Also modify some comments and get rid of some void return types.
2020-05-26 19:00:24 +02:00
Andrew Nicols
17238ab079 MDL-68388 grade: Tidy comments and whitespace 2020-05-26 10:15:52 +08:00
Marcus Boon
f1f5ba36ad MDL-68388 core_grades: Use MUC for grade letters
In the get_grade_letters there is a static variable that is used
to cache grade letters, we should use MUC for this so that it is
reset properly between unit tests.
2020-05-26 09:06:50 +10:00
Peter
0320040469 MDL-66971 core: Update the convenience date grade getter to allow nulls 2019-10-22 10:30:17 +08:00
Andrew Nicols
4bb39eabc7 MDL-66733 grade: Add helper to get correct user date for grade 2019-09-20 09:50:17 +08:00
Eric Merrill
d64e545a36 MDL-64609 gradebook: Prevent infinite loop in regrading 2019-01-22 21:40:12 -05:00
Marina Glancy
442f12f81a MDL-62742 core: rename coursecat->core_course_category
Also rename course_in_list -> core_course_list_element
Deprecate class coursecat_sortable_records
2018-08-28 11:36:23 +02:00
Mark Nelson
8bfe908209 MDL-63002 core: fixed incorrect calls to non-existent delete_record() 2018-07-30 20:59:42 +08:00
Luca Bösch
970dc511e2 MDL-44660 grade: Typos @package core_grade instead of core_grades 2017-12-08 14:21:34 +01:00
Petr Škoda
b8f26f4aa6 MDL-39915 cleanup core_gradelib_testcase 2013-07-27 18:39:33 +02:00
Andrew Davis
69bcca5e9c MDL-36061 core_grade: added some unit tests related to refresh_grades() 2012-11-15 11:14:21 +08:00