Commit graph

23989 commits

Author SHA1 Message Date
Bas Brands
40357a1976 MDl-74031 mod_assign: limited pagewidth for view action 2022-03-17 10:23:32 +01:00
Huong Nguyen
bfe14e2312 MDL-72991 Course: Partial course cache rebuild with cache versioning 2022-03-17 15:34:26 +07:00
Dongsheng Cai
f97b86e841 MDL-72991 Course: Partial course cache rebuild
When updating/deleting a section/module, the system now only
invalidate of the element (section/module), not the whole course cache
Also, the system now only recalculate the cache for element (section/module)
if necessary, not the whole course cache

Move module/section purging to course_modinfo:
  + course_modinfo::purge_course_section_cache_by_id was created to purge section by id
  + course_modinfo::purge_course_section_cache_by_number was created to purge section by number
  + course_modinfo::purge_course_module_cache was created to purge module
2022-03-17 15:34:01 +07:00
Sara Arjona
95e3d07435 Merge branch 'MDL-74127-master' of https://github.com/peterRd/moodle 2022-03-17 09:14:58 +01:00
Víctor Déniz
3f1e26b54e Merge branch 'MDL-73489-master' of https://github.com/HuongNV13/moodle 2022-03-16 15:12:30 +00:00
Eloy Lafuente (stronk7)
984669aeb2 Merge branch 'MDL-73193' of https://github.com/call-learning/moodle 2022-03-15 23:07:47 +01:00
Laurent David
1587ab4c27 MDL-73193 mod_bigbluebuttonbn: Fix random failures in behat tests
* On selenium chrome this fixes random failure of the "I can delete a recording"
test due to race condition between the popup being closed and the script waiting
for it to be displayed
2022-03-15 19:22:46 +01:00
Sara Arjona
302d147331 Merge branch 'MDL-74180-master' of https://github.com/mihailges/moodle 2022-03-15 17:42:38 +01:00
Simey Lameze
4fe474fad4 MDL-74088 assign: backup and restore support for time limit fields 2022-03-15 17:39:04 +08:00
Jun Pataleta
b8248d3b92 MDL-74030 mod_lesson: Access lesson report via page administration step
* So it will consistently pass between Boost and Classic runs.
2022-03-15 17:08:15 +08:00
Huong Nguyen
2e3c9f10c4 MDL-73489 Quiz: Fix question was added in the wrong place 2022-03-15 12:22:18 +07:00
Huong Nguyen
76360c254e MDL-73489 Quiz: Fix incorrect XPath for custom Behat step 2022-03-15 12:19:30 +07:00
Paul Holden
61e5f6da55 MDL-74194 mod_bigbluebuttonbn: access checks for inplace editables. 2022-03-15 09:57:55 +06:00
Paul Holden
ef1be5935f MDL-74193 mod_assign: specify itemid in external attachment filearea. 2022-03-14 22:54:54 +00:00
Víctor Déniz
e95d99ebf1 Merge branch 'MDL-74030' of https://github.com/roland04/moodle 2022-03-14 21:39:40 +00:00
Sara Arjona
5195ac05f1 Merge branch 'MDL-74179-master' of https://github.com/cescobedo/moodle 2022-03-14 18:48:44 +01:00
Sara Arjona
066b9ac6ed Merge branch 'MDL-74162-master' of https://github.com/mihailges/moodle 2022-03-14 16:41:47 +01:00
cescobedo
22cf291fd9 MDL-74179 mod_chat: Fix warnings header when accessing as a guest
Initialize  before showing the no guest message
when user is accesing as a guest.
2022-03-14 10:56:55 +01:00
Mihail Geshoski
b34b626588 MDL-74180 database: Add behat test 2022-03-14 17:10:55 +08:00
Jun Pataleta
def7df4825 Merge branch 'master_MDL-72890_quiz-regrade' of https://github.com/catalyst/moodle-MDL-70329 2022-03-14 14:19:56 +08:00
Peter Dias
07e8f72f72 MDL-74127 lesson: Show remaining attempts on all types of jumps
- Show remaining attempts on all types of jumps
- Highlight the lesson tab when viewing the continue page.
2022-03-14 12:55:26 +08:00
Mihail Geshoski
3bb3cdf369 MDL-74180 database: Perform checks before showing the 'add entry' option 2022-03-14 10:59:02 +08:00
Sara Arjona
debbce8745 MDL-73760 quiz: Fix behat failures with classic
Author: Luca Bosch
2022-03-11 07:40:02 +01:00
Mihail Geshoski
f6104220d6 MDL-74162 glossary: Fix the returned data type by create_add_button() 2022-03-11 00:03:52 +08:00
Mikel Martín
d2acd08934 MDL-74030 navigation: Add reports link
Add report builder 'Reports' link to the user menu

AMOS BEGIN
 CPY [reports,moodle],[reports,core_reportbuilder]
AMOS END
2022-03-10 15:46:44 +01:00
Sara Arjona
a42f38fe28 Merge branch 'MDL-73760' of https://github.com/mkassaei/moodle 2022-03-10 13:17:25 +01:00
Sara Arjona
a27c19b73a Merge branch 'MDL-74142-master' of https://github.com/aanabit/moodle 2022-03-10 11:58:21 +01:00
Ilya Tregubov
cb8778c2f1 Merge branch 'MDL-73073-master_assign_timing_web_services' of https://github.com/andrewmadden/moodle 2022-03-10 15:01:06 +06:00
Andrew Madden
4ae22703c6 MDL-73073 mod_assign: Add new time limit fields to external functions
* Add activity, activityformat, timelimit and submissionattachments to mod_assign_get_assignments
* Add timestarted to mod_assign_get_submissions and mod_assign_get_submission_status
* Add assignmentdata to mod_assign_get_submission_status
* Move mod_assign external helper methods to an external_api child class to be used with modern external classes
* Add start_submission external function
* Create mod_assign child class of externallib_advanced_testcase for shared helper functions
* Add extra logic to get_assignments on whether to provide intro
attachments.
2022-03-10 18:31:37 +11:00
Eloy Lafuente (stronk7)
558f852ff8 Merge branch 'MDL-74007' of https://github.com/timhunt/moodle 2022-03-09 20:59:57 +01:00
Sara Arjona
87da5630ae Merge branch 'MDL-74104-master' of https://github.com/ferranrecio/moodle 2022-03-09 18:23:12 +01:00
Sara Arjona
c67453cff2 Merge branch 'MDL-73586' of https://github.com/stronk7/moodle 2022-03-09 16:26:13 +01:00
Sara Arjona
d1eb8aef66 Merge branch 'MDL-71807' of https://github.com/stronk7/moodle 2022-03-09 16:22:02 +01:00
Jun Pataleta
99f0eacda6 Merge branch 'MDL-74085-master' of https://github.com/sharidas/moodle 2022-03-09 22:45:59 +08:00
Sujith Haridasan
d67e15a2c4 MDL-74085 data: Add entry button should follow max allowed entries
When max entries is set in the database activity, the students
should not see the 'Add entry' button if they have reached the
maximum allowed entries.
2022-03-09 18:14:24 +05:30
Sara Arjona
869b0fb1bb Merge branch 'MDL-73779_dynreg_sup_msgs' of https://github.com/cengage/moodle 2022-03-09 13:11:12 +01:00
Ferran Recio
37893f9878 MDL-74104 mod_folder: fix recent activity with forcedownload links
The folder module has a setting to force the download links. However,
the recent activity block ignored this setting until now.
2022-03-09 13:05:55 +01:00
Amaia Anabitarte
6c1adeec74 MDL-74142 mod_assign: Show time limit information to teachers 2022-03-09 11:08:14 +01:00
Sara Arjona
68a5612ec2 Merge branch 'MDL-73846-master' of https://github.com/golenkovm/moodle 2022-03-08 16:34:40 +01:00
Eloy Lafuente (stronk7)
cb95e0b707 MDL-73586 mod_wiki: Removed php init param for php80 and up
For PHP 8 and up, the 'mbstring.func_overload' doesn't exist
anymore, so skip any check/condition based on it.

The patch has been done that way, so it's easier to remove
the whole block of code once PHP 8.0 becomes our min supported
PHP version.

The change is self-coveres (changes the external and its own tests).
2022-03-08 14:56:49 +01:00
Eloy Lafuente (stronk7)
a5c91474ee MDL-71807 cleanup: Replace deprecated codingStandardsIgnore annotations
The PHP_CodeSniffer @codingStandardsIgnore annotations are deprecated
and, since version 3.x, the new // phpcs:ignore comments should be used
instead.

This commits just reviews all the uses in core, replacing them for
the better new candidate, or removing when no longer needed.
2022-03-08 10:48:53 +01:00
Mikhail Golenkov
ae80480ebe MDL-73846 assignfeedback_editpdf: Add limit for convert_submissions task 2022-03-08 12:36:13 +11:00
Mahmoud Kassaei
1bf0fa4719 MDL-73760 Quiz: Manual grading report does not handle separate groups
when the user is not in any group
2022-03-05 13:24:33 +00:00
Shamim Rezaie
a9d8207da9 Merge branch 'MDL-73824' of https://github.com/stronk7/moodle 2022-03-05 00:39:29 +11:00
Eloy Lafuente (stronk7)
93b59411f1 Merge branch 'MDL-73954' of https://github.com/timhunt/moodle 2022-03-04 14:20:27 +01:00
Marc-Alexandre Ghaly
3e09319e7a MDL-72890 core_question : Question regrade for question versions
This commit implements a question regrade for the selected
version in the quiz for a slot.

Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Tim Hunt <tim.hunt@open.ac.uk>
2022-03-04 23:06:50 +11:00
Tim Hunt
4f99e92a81 MDL-73954 quiz: fix decimal places for the percentage on review page 2022-03-04 11:58:16 +00:00
Tim Hunt
61f11f848d MDL-74007 quiz: questions should start as 'Always latest' version
Thanks to Safat Shahin <safatshahin@catalyst-au.net> for help with
the Behat scenarios.
2022-03-04 10:59:13 +00:00
Eloy Lafuente (stronk7)
43b4e6b339 MDL-73824 test: Cover all the changed code with special decsep tests
Various tests have been added to cover the points fixed in the previous
commit, using a localised decimal separator (#). Using the same
numbering, here there are the details:

A. grade/report/singleview/tests/behat/singleview.feature
   grade/tests/behat/grade_category_validation.feature

B. grade/tests/behat/grade_override_letter.feature

C. (done within various scenarios)

D. grade/report/singleview/tests/behat/singleview.feature

E. admin/tool/behat/tests/behat_form_text_test.php

F. grade/tests/behat/grade_to_pass.feature
   mod/lesson/tests/behat/lesson_informations_at_end.feature

G. quiz/tests/behat/preview.feature

H. mod/quiz/tests/behat/info_page.feature

I. question/type/ddimageortext/tests/behat/edit.feature
2022-03-04 10:22:49 +01: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