100561 Commits

Author SHA1 Message Date
Sara Arjona
c974a59f41 MDL-71119 core_badges: Initialise scopes param in backpack-connect.php
The scopes parameter should be passed when creating the OAuth2 badges
client. As it is an optional parameter, when it's empty, it will
be initilised with the supported scopes for the backpack issuer.

It will happen, for instance, when a call is done to oauth2callback.php
because, as defined in RFC6749, OAuth2 authorization response only
supports code and state.
2021-04-14 09:18:35 +02:00
Eloy Lafuente (stronk7)
511a87f5fc weekly release 4.0dev 2021-04-13 10:26:25 +02:00
Eloy Lafuente (stronk7)
99541a198e Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-04-13 10:26:20 +02:00
Adrian Greeve
83b71194cd Merge branch 'MDL-71161-master-4' of git://github.com/junpataleta/moodle 2021-04-13 11:42:30 +08:00
Adrian Greeve
4cc1d6c56e Merge branch 'MDL-70821-master-5' of git://github.com/junpataleta/moodle 2021-04-13 10:59:02 +08:00
Eloy Lafuente (stronk7)
6e39487123 Merge branch 'mdl_71172' of https://github.com/AnupamaSarjoshi/moodle 2021-04-13 00:46:55 +02:00
Michael Hawkins
09a59a75c6 MDL-71161 mod_workshop: Display activity completion information 2021-04-13 01:21:12 +08:00
Michael Hawkins
907ce56d20 MDL-71161 mod_wiki: Display activity completion information 2021-04-13 01:21:12 +08:00
Michael Hawkins
f37c83da8d MDL-71161 mod_url: Display activity completion information 2021-04-13 01:21:12 +08:00
Simey Lameze
59249a54c9 MDL-71161 mod_survey: show survey activity info 2021-04-13 01:21:12 +08:00
Michael Hawkins
920646237d MDL-71161 mod_scorm: Display activity completion information 2021-04-13 01:21:12 +08:00
Michael Hawkins
1a596574ba MDL-71161 mod_resource: Display activity completion information 2021-04-13 01:21:12 +08:00
Michael Hawkins
a219b812b4 MDL-71161 mod_quiz: Display activity completion information 2021-04-13 01:21:12 +08:00
Michael Hawkins
c8a6d12608 MDL-71161 mod_page: Display activity completion information 2021-04-13 01:21:12 +08:00
Michael Hawkins
e3fb51e3c8 MDL-71161 mod_lti: Display activity completion information 2021-04-13 01:21:12 +08:00
Michael Hawkins
8395543c40 MDL-71161 mod_lesson: Display activity completion information 2021-04-13 01:21:12 +08:00
Jun Pataleta
23cb701a75 MDL-71161 mod_imscp: Display activity information output component 2021-04-13 01:21:12 +08:00
Jun Pataleta
16a9e8ada7 MDL-71161 mod_h5pactivity: Display activity information output component 2021-04-13 01:21:12 +08:00
Simey Lameze
1e459102e4 MDL-71161 mod_glossary: show glossary activity info 2021-04-13 01:21:12 +08:00
Simey Lameze
3e228db3bf MDL-71161 mod_forum: show forum activity info 2021-04-13 01:21:11 +08:00
Jun Pataleta
10ed7500fb MDL-71161 mod_folder: Display activity information output component 2021-04-13 01:21:11 +08:00
Simey Lameze
52b9a0c920 MDL-71161 mod_feedback: show feedback activity info 2021-04-13 01:21:11 +08:00
Simey Lameze
a45eca85bb MDL-71161 mod_data: show database activity info 2021-04-13 01:21:11 +08:00
Jun Pataleta
0ba0dfe3a9 MDL-71161 mod_chat: Display activity information output component 2021-04-13 01:21:11 +08:00
Jun Pataleta
6b46ce4c48 MDL-71161 mod_book: Display activity information output component 2021-04-13 01:21:11 +08:00
Simey Lameze
8d38fc7eab MDL-71161 mod_assign: show assign activity info 2021-04-13 01:21:11 +08:00
Jun Pataleta
bb5ed7d4af MDL-70821 core_completion: Fix completion settings Behat tests 2021-04-13 00:57:46 +08:00
Jun Pataleta
f5d9ac9626 MDL-70821 course: Render activity information only when necessary
Render the activity information output component in the course homepage
only if either completion details or activity dates are to be displayed.
This can help reduce the number of files being included when loading the
course homepage (e.g. the activity information template for each
activity in the course homepage).
2021-04-13 00:51:48 +08:00
Eloy Lafuente (stronk7)
003a47bd02 Merge branch 'MDL-71064' of git://github.com/paulholden/moodle 2021-04-12 17:32:24 +02:00
Sara Arjona
4a45b3f8ef Merge branch 'MDL-68716' of git://github.com/paulholden/moodle 2021-04-12 17:24:33 +02:00
Sara Arjona
a521c2d985 Merge branch 'MDL-71264' of https://github.com/stronk7/moodle 2021-04-12 16:40:04 +02:00
Sara Arjona
c11b6cfbea Merge branch 'MDL-70595-master' of git://github.com/mickhawkins/moodle 2021-04-12 16:01:29 +02:00
Sara Arjona
334f7760d9 Merge branch 'MDL-71107-master' of git://github.com/aanabit/moodle 2021-04-12 12:41:03 +02:00
Anupama Sarjoshi
c4fa89d55a MDL-71172 quiz: Improve quiz Behat tests 2021-04-12 11:31:44 +01:00
Jake Dallimore
0bbdf3b910 Merge branch 'MDL-71251-master' of git://github.com/jleyva/moodle 2021-04-12 14:48:28 +08:00
Adrian Greeve
d24df2a201 Merge branch 'MDL-70821-master-5' of git://github.com/junpataleta/moodle 2021-04-12 14:45:59 +08:00
Jun Pataleta
a5e6df51a7 MDL-70821 course: Activity information fixes
* Make sure the activity is visible to the user (cm_info::uservisible)
before showing the activity completion information.
* Add to-do status for overridden automatic completion
2021-04-12 11:41:37 +08:00
Jun Pataleta
15a9b2c51c MDL-70821 course: Check activity dates on course homepage
* Check the activity dates on the course homepage depending on
  the value of the showactivitydates course setting
* Plus use the new Behat steps for checking activity dates
2021-04-12 11:41:37 +08:00
Jun Pataleta
5dee6f45d8 MDL-70821 course: New Behat steps for activity dates
* activity_date_in_activity_should_contain_text()
  - Checks the presence of the given text in the activity's date info.
* activity_dates_information_in_activity_should_exist()
  - Checks the presence of activity dates information in the activity
    information output component.
* activity_dates_information_in_activity_should_not_exist()
  - Checks the absence of activity dates information in the activity
    information output component.
2021-04-12 11:41:37 +08:00
Jun Pataleta
1c15796a75 MDL-70821 behat: Use new activity completion steps for Behat tests
Replace usages of completion Behat steps that check for the completion
checkboxes with the new activity completion Behat steps.
2021-04-12 11:41:37 +08:00
Jun Pataleta
300b72f81a MDL-70821 completion: New Behat steps for activity completion
* activity_completion_condition_displayed_as()
  - Shows the status of an automatic completion condition for a given
    activity
* activity_should_have_the_completion_condition()
  - Checks that the activity displays the given completion condition
* manual_completion_button_displayed_as()
  - Shows the status of the manual completion button for a given
    activity
* the_manual_completion_button_for_activity_should_be_disabled()
  - Checks that the manual completion button for the given activity is
    disabled.
* there_should_be_no_completion_for_activity()
  - Checks that the activity does not show completion information
* toggle_the_manual_completion_state()
  - Toggles the manual completion button's state for a given activity
* overridden_manual_completion_button_displayed_as()
  - Checks the manual completion state of an activity.
* overridden_activity_completion_condition_displayed_as()
  - Checks if the activity with specified name is maked as complete.
2021-04-12 11:41:37 +08:00
Jun Pataleta
147a3a3661 MDL-70821 course: activity_information template changes
* Add activity name for completion conditions labels. This would give
  better information to screen reader users the activity that the list
  of automatic completion conditions belong to. This would be useful
  especially when the completion conditions are displayed on the course
  homepage.
* Add data-region attributes to activity dates and completion
  information divs.
* Reorganise activity dates and completion information divs so they
  are only rendered when they have data to show.
2021-04-12 11:41:37 +08:00
Jun Pataleta
32b76b34d8 MDL-70821 course: Remove old manual completion toggling
Remove the old ways of toggling manual completion via completion.js
and the ajax part of togglecompletion.php.
2021-04-12 11:41:37 +08:00
Jun Pataleta
e933044409 MDL-70821 course: Deprecate course_section_cm_completion()
Deprecate \core_course_renderer::course_section_cm_completion(). It is
not being used anymore and is being replaced by
\core_renderer::activity_information().
2021-04-12 11:41:37 +08:00
Jun Pataleta
13f88df351 MDL-70821 course: Cover availability conditions for manual completion
When an activity has manual completion tracking, pressing the manual
completion checkbox reloads the page after toggling the completion
state when the activity is linked to availability conditions.
The "Mark as done" button needs to mimic this behaviour as well.

The approach being taken here is to add a core_course/view JS module
for the course homepage which listens for the manualCompletionToggled
event and reloads the page when the activity module has availability
conditions tied to it.

Perhaps for future development, instead of reloading the page, the
container of the restricted course sections/activities can reloaded via
AJAX as well.
2021-04-12 11:41:37 +08:00
Jun Pataleta
642059155c MDL-70821 course: Create manualCompletionToggled event
Add a new "manualCompletionToggled" course event and dispatch this
when the manual completion state for an activity is toggled.
2021-04-12 11:41:37 +08:00
Jun Pataleta
7d8cc2c610 MDL-70821 course: Remove unused completion info from cm_format
With the activity information output component dealing with the
completion information of the activity, there's no need to pass
completion info to the cm_format renderable.
2021-04-12 11:41:34 +08:00
Jun Pataleta
abc5d76175 MDL-70821 course: Render activity information output component in course
Use the activity information output component to render activity
completion details and activity dates for activities on the course
homepage.

Includes fixup from Shamim Rezaie <shamim@moodle.com>
2021-04-12 11:40:54 +08:00
Eloy Lafuente (stronk7)
7467584517 Merge branch 'MDL-69102-master' of https://github.com/martygilbert/moodle 2021-04-11 23:52:41 +02:00
Eloy Lafuente (stronk7)
377d6dc12a
MDL-69102 phpunit: Add test to cover ALL cohort criteria
That way we can check that the expectations are
working ok for every database. Previously only the
ANY case was being tested.

Also, convert them to course badges and check, via
review_all_criteria() that the SQL structures returned
by award_criteria_cohort->get_completed_criteria_sql()
doesn't fail and return the expected counters.
2021-04-10 12:31:22 -04:00