594 Commits

Author SHA1 Message Date
Jun Pataleta
27f453d6e9
MDL-78550 grade: Hide empty fillers from the accessibility tree
* And remove the title attribute for the filler as it is unnecessary.
2023-07-28 17:28:58 +08:00
Jun Pataleta
e953e71c54
MDL-78550 grade: Fix HTML validator errors
* Remove invalid "text" attribute in <td> elements
* Use proper id value for grade category checkboxes.
2023-07-28 17:28:56 +08:00
Shamim Rezaie
2d8c924d71 MDL-77375 core_grades: set boundary of the dropdowns in grade setup page 2023-07-02 00:40:15 +10:00
Paul Holden
f46fe1e78e
MDL-77472 grade: correct URL param type for adding tracking params. 2023-03-06 09:49:54 +00:00
Paul Holden
2d2b2e3244 MDL-76500 grade: fix grade form when item cannot be overridden. 2022-12-06 09:20:01 +00:00
Jun Pataleta
3c6fdb1993 Merge branch 'MDL-71062-master' of https://github.com/sharidas/moodle 2022-07-13 11:39:08 +08:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Paul Holden
e9135d6708 MDL-74314 grade: use repeatable form elements for grade letters. 2022-06-17 10:48:26 +01:00
Paul Holden
3596fc1fe6 MDL-72377 grade: fix category form hidden/until fields.
Ensure the saved values for the hidden and hidden until fields are
populated when editing a grade category. Fix behaviour on enabling
the hidden until field.

Re-enable tests commented out in eba1d32c.
2022-06-06 15:31:03 +01:00
Sujith Haridasan
aa1c2e2382 MDL-73848 administration: Fix the breadcrumbs and nav highlights
Create or update the breadcrumbs in the site administration
pages where it is required.
Highlight the corresponding site adminstration tab.
Highlight the primary nav to Site administration when user
is navigating to any of the site administration pages.

Also changed the boostnavbar so that the nodes in the secondary
navigation are not shown in the breadcrumbs when user is in site
administration page.
2022-03-25 17:44:47 +08:00
Eloy Lafuente (stronk7)
3a016e2784 MDL-73824 gradebook: Add support for localised floats where missing
It has been detected, thanks to php80 specially, that there are
various places in core where support for localised floats is
missing. Before php80, some locale-dependent conversions were
performed by PHP, allowing things to work. But with php80 all
those comparisons are now locale-independent. See:

https://wiki.php.net/rfc/locale_independent_float_to_string

That implies that we now need to, always, unformat floats to
be internally the correct (decimal point as separator) in
order to compare it.

While this was visited in the php80 epic (MDL-70745), nothing
was found, all automated tests were passing ok. Problem is that
we run behat tests with en-AU laguage that has the decimal point
separator.

So, in this issue we are fixing all the problems detected by
running those Behat tests using localised (comma) decimal
separator.

Note that there may be other places still causing problems, but
it's really hard to find them programmatically, so we'll have to
wait for real use reports / issues and go fixing them while they
happen.

Back to this commit, this is the list of changes performed (note that
in the next commit, we'll be adding scenarios explicitly using
a localised decimal separator to ensure that they work ok).

A. Changes to various grade forms to ensure that, on their validation
  floats are unformatted properly. Also, changed the corresponding
  form element from current text/PARAM_RAW to proper float ones that
  take care of the conversion in a number of places (but when disabled,
  that's the reason we still have to unformat in validation.
  This includes the following forms:
    - edit_category_form
    - edit_item_form
  (this is the original problem reported that cause all the research
  to be performed against full behat runs)

B. Changes to edit_letter_form, so it uses a proper PARAM_LOCALISEDFLOAT
  (note this is the type of change that surely should be used for all
  the rest of /grade/edit/tree form, including those in the previous
  point).

C. Changes to the grade_item behat generator, so it's able to work with
  localised floats, un-formatting them when needed.
  At lib/behat/classes/behat_core_generator.php

D. Fix problem passing localised floats to scales, not displaying
  properly. At grade/report/singleview/classes/local/ui/finalgrade.php

E. Change the behat text matcher in order to allow comparison of
  localised floats when they are the current ones. Before this change
  the matches was using soft/lazy comparison, so '50' and '50.0000'
  match. Now, when the comma (for example) is used (and only then),
  '50' and '50,000' will also match. This comparison is in use in a
  bunch of tests and makes sense to make it localisation-aware.
  At grade/report/singleview/classes/local/ui/finalgrade.php

F. Fix a couple of number_format() uses in lesson, because they are
  not localised-aware. Switched to format_float(). At mod/lesson/locallib.php

G. Change the quiz_contains_the_following_questions() step to accept
  localised maxmark expectations. At mod/quiz/tests/behat/behat_mod_quiz.php

H. Change the quiz generator so it accepts localised gradepass.
  At mod/quiz/tests/generator/lib.php

I. Change the edit question form to show proper localised penalties,
  previously it was always showing point-decimal ones. Of course,
  leaving the values of the select element unmodified (internal floats).
  Related, also change a couple of tests to, instead of try to match the
  value (always internal floats), match the description (now localised),
  so we can test them with different separators. At:
    - question/type/ddimageortext/tests/behat/backup_and_restore.feature
    - question/type/ddmarker/tests/behat/backup_and_restore.feature
    - question/type/edit_question_form.php
2022-03-04 10:22:49 +01:00
Mihail Geshoski
724578a008 MDL-73645 grades: Update breadcrumb nodes 2022-03-02 13:00:25 +08:00
Bas Brands
7c76e1c349 MDL-72466 core_output: dropdown menu alignment 2022-01-27 17:24:20 +01:00
Mihail Geshoski
eb0b022bb7 MDL-72873 core_grades: Add tertiary navigation in grade scales 2021-12-16 00:10:13 +08:00
Mihail Geshoski
c94ba3eea5 MDL-72873 core_grades: Add tertiary navigation in course grade settings 2021-12-16 00:10:13 +08:00
Mihail Geshoski
afbc8b2586 MDL-72873 core_grades: Add tertiary navigation in grade outcomes 2021-12-16 00:10:13 +08:00
Mihail Geshoski
08e90eeef4 MDL-72873 core_grades: Add tertiary navigation in grade letters 2021-12-16 00:10:13 +08:00
Mihail Geshoski
cdc4aeae3e MDL-72873 core_grades: Add tertiary navigation in gradebook setup 2021-12-16 00:10:13 +08:00
Luca Bösch
aa9a591ecd MDL-70433 grades: prevent double escaping in titles 2021-08-27 10:56:20 +02:00
Mark Nelson
0e68c5817f MDL-49202 core_grades: perform same action on categories in form
When you click on 'Edit' then 'Hide' on a grade item like a course category
that contains many grade items, the course and the grade items are set to
hidden. However, if you use the 'hidden' option on the 'Edit settings'
page it only hides that item and none of the items (assignment etc)
under that course category. We want them to be consistent.
2021-08-19 14:44:34 +08:00
Mark Nelson
25bce5c526 MDL-49202 core_grades: perform same action on items in form
When you click on 'Edit' then 'Hide' on a grade item like an
assignment it also hides the grades. However, If you use the
'hidden' option on the 'Edit settings' page it just hides that
item and doesn't hide grades as well. We want them to be
consistent.
2021-08-17 20:12:27 +08:00
Andrew Nicols
530322e2ce MDL-69918 core: Update uses of legacy form change checker 2021-08-10 23:54:01 +08:00
Eloy Lafuente (stronk7)
cfba0366db Merge branch 'MDL-70893-master' of git://github.com/marinaglancy/moodle 2021-03-18 00:23:26 +01:00
Mark Nelson
1b7236cbd5 MDL-70125 core_grade: do not change overridden status during regrading 2021-02-22 17:23:51 +08:00
Marina Glancy
0eada7a5f9 MDL-70893 various: optional function arguments must be in the end 2021-02-15 16:53:37 +01:00
Adrian Greeve
33831f6e21 Merge branch 'master-MDL-68284' of https://github.com/yao9394/moodle 2020-10-20 08:48:05 +08:00
Luca Bösch
411432c434 MDL-65448 gradebook: Restyle moving. 2020-10-16 14:50:21 +02:00
Sagar Ghimire
a0ffd0de5f MDL-68284 gradebook: Prevent exposing hidden quiz grade item 2020-10-16 15:08:08 +11:00
Peter Burnett
309f54bf81 MDL-67306 webservices: Added webservice for Grade category creation 2020-09-03 00:20:44 +02:00
Bas Brands
4394f9e358 MDL-67735 theme_boost: remove bs2 and bs4alpha compatibility css 2020-08-17 08:16:42 +00:00
Matt Davidson
887679e510 MDL-68163 gradebook: add grade item duplication 2020-06-02 09:28:29 -04: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
Jun Pataleta
0763480b33 MDL-68783 core_grades: Fix outcome page's add/remove button styles
* Applied proper styles of btn-secondary.
* Added some vertical spacing between the buttons by enclosing them in
divs with 'm-y-1' class instead of just a br tag.
2020-05-20 13:12:58 +08:00
Jun Pataleta
e4e9e56882 MDL-65948 core_grade: Use category names as master checkbox labels
Use the name of the grade categories as label to distinguish master
checkboxes from regular ones.
2019-12-30 14:13:35 +08:00
Jun Pataleta
2f848616c7 MDL-65948 core_grade: Use new core/checkbox-toggleall 2019-12-30 14:13:35 +08:00
Tobias Reischmann
6555342863
MDL-64891 gradebook: Disable grade display type dependent on grade type
If the grade types text or none are selected for an item or a category,
none of the 'grade display type' options  will change the displayed
grade within the reports. Thus, we can disable the settings for grade
display type as well as the one for decimal places in this case.
2019-02-18 17:17:25 +01:00
Luca Bösch
cfac07f283 MDL-64577 grade: style "Add ID numbers" button. 2019-02-01 07:10:18 +01:00
Luca Bösch
d388e8ecc2 MDL-64280 core_outcome: Add/remove outcome buttons style. 2018-12-10 17:55:35 +01:00
Adrian Greeve
9fcfecbf15 MDL-64005 gradebook: Fix to remove debugging message.
The progress bar is being used when there are a large amount
of grades being recalculated. This was throwing a debugging message
about NO_OUTPUT_BUFFERING being unset.
2018-11-14 10:39:57 +08:00
Eloy Lafuente (stronk7)
609c73be26 Merge branch 'MDL-29895' of https://github.com/enovation/moodle 2018-10-10 00:29:16 +02:00
Luca Bösch
1876162315 MDL-63435 gradebook: let activity icons re-appear. 2018-09-27 18:12:08 +02:00
Charles YVANES
458453cee0 MDL-29895 core: removed require_login() when not needed 2018-09-10 11:22:50 +02:00
Jake Dallimore
7e93539cf6 MDL-36255 core_grade: fix to ensure correct context used for filters
Some grade object (outcomes,scales) can be created at site or course
context, so this patch just makes sure we use the respective context
when applying format_string to the name in the get_name() function.
2018-08-22 17:55:50 +08:00
Luca Bösch
8ad225b431 MDL-36255 grades: allow multilang filters in grades 2018-08-20 08:29:36 +02:00
Adrian Perez
ac33483290 MDL-63002 core_grade: fixed deletion of overriden letters 2018-07-30 20:47:21 +08:00
Luca Bösch
df24fb7172 MDL-44859 grade: Inverse the order of the add category and item buttons 2018-06-14 17:33:41 +02:00
Stephen Bourget
b4993d29f7 MDL-45837 Grades: Minor fixes to grade_letter events 2018-02-14 17:31:57 +01:00
Stephen Bourget
31647f0cc9 MDL-45837 Grades: Add events for grade letters 2018-02-09 11:41:38 +08:00