100482 Commits

Author SHA1 Message Date
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
Sara Arjona
18aafd0ed4 weekly release 4.0dev 2021-04-06 15:29:06 +02:00
Sara Arjona
28d90a0be6 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-04-06 15:29:02 +02:00
Eloy Lafuente (stronk7)
0384e9d254 Merge branch 'MDL-71215-master' of https://github.com/sammarshallou/moodle 2021-04-06 15:13:16 +02:00
sam marshall
af3c05ca44 MDL-71215 Acceptance test: Missing Behat for webservice service_users 2021-04-06 11:52:56 +01:00
Adrian Greeve
9a58a5f7e6 Merge branch 'MDL-70817-master' of git://github.com/abgreeve/moodle 2021-04-06 16:35:17 +08:00
Adrian Greeve
03e0523e22 MDL-70817 lib: Update the install xml file to use the correct length.
The showactivitydates field had the wrong length of 4. This changes
it to 1.
2021-04-06 15:42:27 +08:00
Adrian Greeve
b816b9566d Merge branch 'MDL-70817-master-8' of git://github.com/junpataleta/moodle 2021-04-06 13:00:53 +08:00
AMOS bot
2f61120648 Automatically generated installer lang files 2021-04-06 00:08:07 +00:00
Eloy Lafuente (stronk7)
13e89a1e87 Merge branch 'MDL-71215-master' of https://github.com/sammarshallou/moodle 2021-04-04 15:49:59 +02:00
AMOS bot
9e64a9ac2b Automatically generated installer lang files 2021-04-04 00:08:05 +00:00
Jun Pataleta
9a6958ae4c MDL-70817 admin: Remove heading for showcompletionconditions
It should be under the "Completion tracking" subheading just like in
the course form.
2021-04-02 21:53:20 +08:00
Simey Lameze
ec270a3fef MDL-70781 completion: behat coverage for new setting
Part of MDL-70817
2021-04-02 21:53:20 +08:00
Simey Lameze
a4f7c1d91f MDL-70781 course: setting for displaying completion conditions
Part of MDL-70817
2021-04-02 21:53:20 +08:00
Simey Lameze
c0d0679c8a MDL-70782 course: behat coverage for new setting
Part of MDL-70817
2021-04-02 21:53:20 +08:00
Simey Lameze
680018c95d MDL-70782 course: add setting to show activity dates
Part of MDL-70817
2021-04-02 21:53:20 +08:00
Jun Pataleta
98f44ac00d MDL-70817 mod_choice: Behat tests for the activity completion info 2021-04-02 21:53:20 +08:00
Jun Pataleta
469f035a4c MDL-70817 mod_choice: Show choice activity info 2021-04-02 21:53:20 +08:00
Jun Pataleta
dd32d65f3a MDL-70817 core_course: Create an activity information output component
The activity information output component displays information about
an activity module that can contain:
1. Activity dates
2. Completion information
   a. A manual completion button; or
   b. A list of automatic completion conditions and their statuses.

This patch also includes a new JS module called
core_course/manual_completion_toggle for toggling the
completion state of activities that support manual completion.
2021-04-02 21:53:20 +08:00
Jun Pataleta
3c5b29e75d MDL-70817 core_course: Add manual completion toggle to repository
Add the functionality of toggling the completion state of an
activity with manual completion to the core_course/repository
JS module.
2021-04-02 21:53:20 +08:00
Jun Pataleta
3a960c15a4 MDL-70817 core_course: Convert core_course/repository to ES6 2021-04-02 21:53:20 +08:00
Jun Pataleta
6fc9b23d3d MDL-70817 core: Allow the manual completion update WS function for AJAX
Allow the core_completion_update_activity_completion_status_manually
web service function to be called from AJAX as well. This is needed
by the new manual completion toggle button in the
core_course/completion_manual template.
2021-04-02 21:53:20 +08:00
Jun Pataleta
24bf4f58f5 MDL-70817 core_completion: Unit tests for cm_completion_details 2021-04-02 21:53:20 +08:00
Jun Pataleta
c81441f5c9 MDL-70817 core_completion: Course module completion details
* Class cm_completion_details builds the custom completion details
for an activity module.
2021-04-02 21:53:20 +08:00
AMOS bot
42169f0db7 Automatically generated installer lang files 2021-04-02 00:07:49 +00:00
AMOS bot
7a9904c6bc Automatically generated installer lang files 2021-04-01 00:07:51 +00:00
Jun Pataleta
9d35715453 Merge branch 'MDL-70895' of https://github.com/mkassaei/moodle 2021-03-31 21:26:39 +08:00
sam marshall
611e2569aa MDL-71215 core_user: User fields - remaining deprecated functions
This change removes references in code and comments to a few
deprecated functions that were accidentally missed in the larger
change.

The code changes only affect service_users.php. I made it support
custom user profile fields in this query, because it was easy
enough, rather than adding another TODO to fix later.
2021-03-31 11:12:16 +01:00
Mahmoud Kassaei
01403b2f0d MDL-70895 Questions: Default options when creating a question 2021-03-31 09:26:54 +01:00
Adrian Greeve
facec59334 Merge branch 'MDL-37655' of https://github.com/stronk7/moodle 2021-03-31 15:46:51 +08:00
Eloy Lafuente (stronk7)
870a8de3fb MDL-37655 phpunit: Avoid having multiple testcase classes in 1 file
Note that there wasn't any case of multiple testcase classes in
1 file. All the cases reported in the issue were false positives
caused but other "mock/fixture" files being named _test.

So all this issue does is:

1) rename any _test suffixed class in test files, because we are
   going to start renaming a lot of test classes to _test.

2) ensure that the 2 test case classes modified in this issue,
   are already observing the filename = classname rule that will
   be implemented soon (and verigy it works).
2021-03-30 19:17:54 +02:00
Víctor Déniz
f0eb6a5729 weekly release 4.0dev 2021-03-30 15:37:25 +01:00
Víctor Déniz
a2ad40d02d Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-03-30 15:37:18 +01:00
Eloy Lafuente (stronk7)
67b2e62fe7 Merge branch 'MDL-70963-master' of git://github.com/sarjona/moodle 2021-03-29 12:39:32 +02:00
Sara Arjona
51ec496f75 MDL-70963 core_badges: Use expected JSON format for OBv2.1
This patch adds some changes to guarantee that OpenBadges 2.1 (OBv2.1)
will return always the same JSON format that OBv2.0 (because the only
difference between both versions it's the BadgeConnect API).
2021-03-29 10:02:58 +02:00
Andrew Nicols
91bd6289e2 Merge branch 'MDL-70962' of git://github.com/paulholden/moodle 2021-03-29 11:58:05 +08:00
Andrew Nicols
963e1f835f Merge branch 'MDL-71004' of https://github.com/stronk7/moodle 2021-03-29 11:53:43 +08:00
AMOS bot
91f30ac7cb Automatically generated installer lang files 2021-03-29 00:07:49 +00:00
Eloy Lafuente (stronk7)
14f82f4eb5 Merge branch 'MDL-68496-master' of git://github.com/andrewnicols/moodle 2021-03-28 23:48:14 +02:00