'usercreated' and 'usermodified' fields can not be always mapped.
We are filling those fields with 'old' users when working on the same
site, or with current user when working on a different instance.
Custom rules are combined using the AND operator. However, the
'completionpass' and 'completionattemptsexhausted' rules are exceptions
because they are combined together with OR, and form a single new rule
that then will be combined with the rest of the rules using AND.
This commit combines the mentioned rules into a single rule named
'completionpassorattemptsexhausted'.
This includes 2 change to the order date(time) elements are filled,
each one addressing one type of problem, where current order is
problematic and can lead to unexpected dates.
1) Changing date, when current month only has X days and target
month has more than X days. Example, being 1 April, change
the date to 31 May.
This is solved by changing the order of introduction
from current D => M => Y to Y => M => D.
2) Changing date, when target month only has X days and current
month has more that X days. Example, being 31 March, change
the date to 28 Feb.
This is solved by always setting the D to 1, before the
Y => M => D sequence commented @ 1) begins.
Because of the order that dates and datetimes are filled by behat
sometimes there are some intermediate results that are impossible
and then the form (javascript) automatically reacts and fixes the
date, ultimate leading to a different date that the one we wanted
to set with Behat.
This is noticeable when switching between months (with some day
being the last day of the month) and the 2 months have a different
number of days. For example April date => March date (or the opposite).
This test covers all the critical changes (day, month and year),
back and forth. All times are Perth/Australia.
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.
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.