Commit graph

727 commits

Author SHA1 Message Date
Andrew Nicols
149d80e819 MDL-66109 behat: Fix Example usage in feature files
The gherkin-lint package now understands the use of "Examples" and
requries that their indentation be correct and consistent.

This change sets the indentatation for these to:

    "Examples": 4,
    "example": 6,

This is in-line with the examples given in the offical Cucumber/Gherkin
documentation at
https://cucumber.io/docs/gherkin/reference/#scenario-outline whereby the
Examples and individual rows of the Examples table are children of the
Scenario outline.

This is contrary to the default for Gherkin-lint which places them as
top-level nodes with an indentatio of 0, and 2 respectively.
2020-05-11 10:55:58 +08:00
David Mudrák
8599eb5ebb MDL-68434 lang: Use the updated terminology in the tests 2020-04-29 17:40:58 +02:00
Mihail Geshoski
0da3443539 MDL-67587 course: Add unit tests 2020-04-09 09:17:53 +08:00
Mihail Geshoski
ccffe30d5b MDL-67587 course: Add behat tests 2020-04-09 09:17:53 +08:00
Adrian Greeve
9b57e08e8b Merge branch 'MDL-67924' of https://github.com/Chocolate-lightning/moodle 2020-03-19 09:41:30 +08:00
Jake Dallimore
af0d644bea MDL-68056 core_course: remove feature test for non-js activity creation
We rely on JS now, so we don't need to keep this feature.
2020-03-16 08:36:38 +08:00
Mathew May
ddd387ef68 MDL-67924 core: Now show the editing button everywhere 2020-03-13 08:50:14 +08:00
Andrew Nicols
8fd1dfc795 Merge branch 'MDL-68030-master' of https://github.com/Chocolate-lightning/moodle 2020-03-12 12:42:17 +08:00
Mathew May
c515848ce0 MDL-68030 core_course: Update behat 2020-03-12 11:51:45 +08:00
Eloy Lafuente (stronk7)
0b698cb00b Merge branch 'MDL-67752-master-userstats' of git://github.com/mudrd8mz/moodle 2020-03-12 00:23:30 +01:00
Andrew Nicols
ff1a10333d Merge branch 'MDL-67263-master' of git://github.com/mihailges/moodle 2020-03-05 13:22:40 +08:00
Mihail Geshoski
ae0e9801bd MDL-67263 course: Add behat tests 2020-03-05 11:57:14 +08:00
Sara Arjona
b71604b058 Merge branch 'MDL-68055-master' of https://github.com/snake/moodle 2020-03-04 08:16:47 +01:00
Jake Dallimore
d86274c64b MDL-68055 core_course: export content item description as markdown 2020-03-04 11:44:26 +08:00
David Mudrák
c268c1bd3f MDL-67752 course: Improve the average_number_of_participants function
The patch adds two new optional parameters that control the function
behaviour. With default values, the function is backwards compatible and
it simply uses the number of enrolment records. The new parameters allow
to include only active enrolments and/or only recently active users.
2020-02-27 13:14:39 +01:00
Mathew May
6e1a4477d8 MDL-67584 core_course: Activity chooser favouriting frontend 2020-02-27 12:13:35 +08:00
Mathew May
e04b4be619 MDL-67586 core_course: Recommended modules frontend 2020-02-25 14:07:40 +08:00
Eloy Lafuente (stronk7)
30206d545e MDL-67262 core_course: fix behat looking for non-existing page 2020-02-24 23:15:28 +01:00
Adrian Greeve
ebdbe8736e MDL-67262 core_course: Unit and behat tests for recommendations. 2020-02-24 11:00:44 +08:00
Adrian Greeve
a7b2378d72 MDL-67585 core_course: Added legacyitem to exporter.
Legacy items have no id and so can not be favourited nor
recommended. We needed a way to easily determine whether to show
these features in the templates.
2020-02-20 11:42:24 +08:00
Adrian Greeve
54561c885e MDL-67585 core_course: Removing functions introduced this release.
For the initial rewrite of the activity chooser we had some
temporary functions to make everything work. These have been replaced
with different functions and so these functions are now being removed.
2020-02-20 11:42:23 +08:00
Jake Dallimore
85b4eec5b7 MDL-67585 core_course: new web service to return course content items 2020-02-20 11:42:23 +08:00
Jake Dallimore
a826857844 MDL-67585 core_course: added web services for content item favourites
Two new services:
add_content_item_to_user_favourites
remove_content_item_from_user_favourites
2020-02-20 11:42:23 +08:00
Jake Dallimore
f09e9b887e MDL-67585 core_course: add favouriting to the content item service class 2020-02-20 11:42:22 +08:00
Jake Dallimore
57dfcf951d MDL-67585 core_course: add hook get_all_content_items
Returns all content items which are provided by the plugin, irrespective
of whether or not a user can see an item in a particular course. This is
used to generate a global list of content items, allowing for admin
level features to be added.
2020-02-20 11:42:22 +08:00
Jake Dallimore
dd494a41a4 MDL-67585 core_course: add content_item_service class
The service object encapsulates access control logic and allows
consumers to query content items in different contexts/scopes.
2020-02-20 09:28:57 +08:00
Jake Dallimore
8210186372 MDL-67585 core_course: add user param to course_allowed_module
We want to be able to call this for a user, not rely on a global.
2020-02-20 09:28:57 +08:00
Jake Dallimore
eec2d09f84 MDL-67585 core_course: add exporter for course content items
An exporter will allow let us add calculated fields like 'favourited'
to the data being transferred.
2020-02-20 09:28:57 +08:00
Jake Dallimore
7c7ae1bd6f MDL-67585 core_course: add caching_content_item_repository class
A repository object which caches results for a user and course. This
allows this repository to be called many time in a single request - a
pattern we expect when objects of this type replace the existing
get_module_metadata() method.
2020-02-20 09:28:57 +08:00
Jake Dallimore
e843336ee6 MDL-67585 core_course: add content_item_readonly_repository class
Add a read-only repository, which returns the list of content items
which can be added to a course. This class does not handle access
control nor user-related data pertaining to to core content_items.
This will be handled in a future commit in any calling code using
the repositories.
2020-02-20 09:28:57 +08:00
Jake Dallimore
94420851a5 MDL-67585 core_course: add support for custom titles to content_item
Plugins have always been able to return either a string or a lang string
when implementing the hook, 'get_shortcuts'. Since content_items will
be the replacement for that stdClass implementation, we need a way
for plugins to continue to have this flexibility. This just provides
a small contract and some classes that plugins can use in future.
2020-02-20 09:28:57 +08:00
Jake Dallimore
dd8048e350 MDL-67585 core_course: add the content_item class
Objects of this class represent items able to be added to a course,
including modules and submodules.
2020-02-20 09:28:57 +08:00
Mathew May
c58c23d6c6 MDL-67321 core_course: Add support for tabbing activities in the chooser 2020-02-19 13:28:54 +08:00
Peter
37cf89b34a MDL-67264 core_course: Activity chooser behat
Update the selectors to use a button
Add new tests to cover new functionality
Add new new step definitions to minimise usage of xpaths

Co-authored-by: Mathew May <mathewm@hotmail.co.nz>
Co-authored-by: Mihail Geshoski <mihail@moodle.com>
Co-authored-by: Peter <peterrolanddias@gmail.com>
2020-02-13 09:15:40 +08:00
Mathew May
05b27f2118 MDL-67264 core_course: Activity chooser new feature
Roll in the base for the new activity chooser
It renders all modules into a modal
Gives the user to add from either the base or help screens
All checked by accessability tools with great coverage
Adds minimal overhead to the course edit setup time

Co-authored-by: Mathew May <mathewm@hotmail.co.nz>
Co-authored-by: Mihail Geshoski <mihail@moodle.com>
2020-02-12 12:35:03 +08:00
Marina Glancy
3b0168ce7f MDL-66936 mod_url: revert MDL-65024 adding fullurl to modinfo
This reverts commit cc56e409c3, reversing
changes made to 01cdf16c0e.
2019-12-03 12:24:25 +01:00
Andrew Nicols
c035141971 MDL-67116 course: Fix completion disabled for gradable items
The default value is an empty string (""), which in PHP evaluates to 0 when
cast to a string in our DML layer.

The fix is to forcibly make it null which is not cast to string in DML
for optional strings.
2019-11-13 12:49:59 +08:00
cescobedo
5d69038bb6 MDL-66683 core: Revert MDL-66181 because created regressions
This reverts commit ed080a580f.
This issue reverts the behaviour modified in MDL-66181, as that change
negatively impacted course-creation workflows. As this appears to be
the intended functionality, the Security team has agreed to revert
this change.
2019-11-07 17:29:30 +01:00
Andrew Nicols
e943e7d56f Merge branch 'MDL-66381-master' of git://github.com/Chocolate-lightning/moodle_forum-project 2019-11-05 11:58:56 +08:00
Mathew May
9d752481fc MDL-66381 core_course: Modify get_enrolled_users_by_cmid
We need to also provide a user's picture along with the current information
2019-11-01 11:46:37 +08:00
Andrew Nicols
cd0a9144b4 Merge branch 'MDL-66398-master' of git://github.com/aanabit/moodle 2019-11-01 10:39:08 +08:00
Amaia Anabitarte
acae15c710 MDL-66398 filter_displayh5p: Enabled by default. Fixing Unit tests 2019-10-30 12:14:27 +01:00
Andrew Nicols
dc86a0f1c6 MDL-66079 mod_forum: Add field to support whole forum grading
Part of MDL-66074
2019-10-30 10:23:40 +08:00
Andrew Nicols
fcc88fddba MDL-66079 core_grades: Add support for multiple grade items in an activity
Part of MDL-66074
2019-10-30 10:23:40 +08:00
Mathew May
06e50afd5e MDL-66077 course: Add WS to get list of users in a cmid
Part of MDL-66074
2019-10-28 13:55:12 +08:00
David Monllaó
b4bb8688a5 MDL-66970 analytics: Extra testing for active enrolments
I sneaked in an unrelated change to enrol-partly-active-ends-afterwards
test case as the endtime and enrolment timestart values were swapped.
The case when the enrolment start is after the analysis end is already
tested in enrol-after-end test case.
2019-10-22 05:13:26 +08:00
Adrian Greeve
6d98de3fc1 Merge branch 'MDL-66740-master' of git://github.com/marinaglancy/moodle 2019-10-18 11:06:55 +08:00
Jun Pataleta
95946a3294 Merge branch 'MDL-66806_master' of git://github.com/dmonllao/moodle 2019-10-18 09:36:51 +08:00
Marina Glancy
959e4f0e97 MDL-66740 core_course: change defaults for course request settings 2019-10-14 12:22:16 +02:00
Marina Glancy
3e15abe500 MDL-66740 core_course: Add context to capabilities to request course 2019-10-14 11:38:13 +02:00