407 Commits

Author SHA1 Message Date
Mathew May
b983003e2e MDL-70197 navigation: Remove old navigation elements and migrate behat 2021-11-29 15:47:42 +08:00
Sara Arjona
a0407f6d17 MDL-73128 badges: Fix warning with external badges 2021-11-22 16:31:32 +01:00
Andrew Nicols
750c04dd8f Merge branch 'MDL-72990-master' of https://github.com/rezaies/moodle 2021-11-05 11:50:30 +08:00
Jun Pataleta
825b276b1a Merge branch 'MDL-72668-master' of git://github.com/rezaies/moodle 2021-11-04 12:03:42 +08:00
Shamim Rezaie
c6cd47a82d MDL-72990 badges: Use imagecaption as alternative text for badge image 2021-11-04 14:45:19 +11:00
Shamim Rezaie
86ed2e7e40 MDL-72668 block_badges: Add alt attribute to badge images 2021-11-04 13:54:02 +11:00
Eloy Lafuente (stronk7)
3873af5626 Merge branch 'MDL-72655-master' of https://github.com/andelacruz/moodle 2021-11-03 19:03:22 +01:00
Angelia Dela Cruz
89c4c803e8 MDL-72655 behat: Use assign generators
Replace steps that manually add assignment instances via the UI
and use Behat generators. This improves the speed of Behat test
runs.
2021-11-03 11:34:26 +08:00
Paul Holden
20d41ebae4 MDL-72370 badges: require sesskey to remove related badge. 2021-11-02 18:04:16 +01:00
Paul Holden
374114e0f8 MDL-72857 badges: filter site/course name when showing issued badge. 2021-11-01 10:43:10 +00:00
Peter Dias
cd52b46e89 MDL-52206 quiz: Remove completionpass completion from quiz
AMOS BEGIN
 MOV [completionpass,mod_quiz],[completionpassgrade,core_completion]
 MOV [completionpassdesc,mod_quiz],[completionpassgrade_desc,core_completion]
 MOV [completionpass_help,mod_quiz],[completionpassgrade_help,core_completion]
AMOS END
2021-10-04 19:44:03 +08:00
Eloy Lafuente (stronk7)
8e90d8309c MDL-72714 behat: Make the window larger earlier
The step that causes the problem is:

And I navigate to "Badges > Add a new badge" in current page administration

(because "Add a new badge" is exactly on the edge (bottom) of the window)

So we need to make the window large before it, not after it, or the
"Add a new badge" link won't be ever clicked.
2021-10-01 22:40:10 +02:00
Víctor Déniz
f01d69cb05 Merge branch 'MDL-72714-master' of git://github.com/ilyatregubov/moodle 2021-10-01 13:21:46 +02:00
Ilya Tregubov
fad4743ea8 MDL-72714 behat: Fix Behat failures for chrome 94. 2021-10-01 08:36:50 +02:00
Bas Brands
16c726cde7 MDL-71610 core_behat: use new edit mode step in feature files 2021-09-29 09:25:36 +02:00
Mihail Geshoski
7d821080f0 MDL-72093 navigation: Update behat tests 2021-09-14 12:02:35 +08:00
Mathew May
1f6bcd7eae MDL-69588 accessibility: Address review points 2021-08-23 17:47:24 +08:00
Adrian Greeve
c3871a9174 MDL-70196 navigation: Update to pages to add a URL.
- Part of: MDL-69588
Some pages have added an item to the end of the  navbar without a
link for it. This adds the current page as a url to this navigation
node. Doing this brings it in line with all of the other pages
around Moodle and also helps with the new navigation changes in
theme boost.
2021-08-23 17:46:38 +08:00
Adrian Greeve
7d435fb5f2 MDL-70196 navigation: Update to feature files.
- Part of: MDL-69588
A lot of tests rely on the last element of the breadcrumb being
active. This updates feature files to not rely on this anymore.
2021-08-23 17:46:38 +08:00
Sara Arjona
24fcc7ebea MDL-71937 badges: simplify badges page
Apart from reorganising the information displayed in the badges page,
this information has been moved to a template in order to make it
easier to modify and maintain.
2021-08-10 15:59:06 +02:00
Andrew Nicols
776f4bd80c MDL-72179 behat: Make use of page resolvers 2021-07-26 15:14:28 +08:00
Andrew Nicols
92179b7057 MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
Sara Arjona
c2a1bb5545 MDL-67935 tool_lp: fix random errors with login/logout 2021-05-14 10:11:12 +02:00
Ruslan Kabalin
3bf770c801 MDL-71051 core_user: fix issues and address review issues 2021-04-28 11:47:26 +02:00
Marina Glancy
ef3d6a3d70 MDL-71051 core_user: use user profile generator in all tests 2021-04-28 11:47:21 +02:00
Marina Glancy
5682b9a585 MDL-71051 core_user: always use API when working with profile fields 2021-04-28 11:39:04 +02:00
Bas Brands
f9e1c2587a MDL-28452 core_user: migrate social profile fields
Create a new profile field type, move all existing content of the fields
'icq', 'skype', 'aim', 'yahoo', 'msn' and 'url' in the mdl_user table to
theses new profile fields if needed.

AMOS BEGIN
MOV [aimid,core],[aimid,courseimage,profilefield_social]
MOV [yahooid,core],[yahooid,profilefield_social]
MOV [skypeid,core],[skypeid,profilefield_social]
MOV [icqnumber,core],[icqnumber,profilefield_social]
MOV [msnid,core],[msnid,profilefield_social]
MOV [webpage,core],[webpage,profilefield_social]
AMOS END
2021-04-21 11:22:25 +02:00
Jake Dallimore
1ed346c3cc Merge branch 'MDL-71119-master' of git://github.com/sarjona/moodle 2021-04-15 08:31:47 +08:00
Sara Arjona
24ff49f681 MDL-71119 core_badges: Add more information to errors
Some errors raised when calling external services were ignored.
Displaying this information helps to debug and find the real reasons
why some action, like connecting to an external backpack, can't be
done.
2021-04-14 10:52:47 +02:00
Sara Arjona
c1649591a2 MDL-71119 core_badges: Use basicauth and remove urlencode
Basic authorization header is required to get token. Besides, client
id and secret shouldn't call urlencode.
2021-04-14 09:18:36 +02:00
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
Sara Arjona
e281a5ef69 MDL-71315 core_badges: Fix warning when rendering badges 2021-04-14 09:06:06 +02: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
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
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
Marty Gilbert
d8085396de
MDL-69102 badge: Fixes broken WHERE clause
When buildilng the 'WHERE' clause, the SQL generated
a query that selected any user who was a member of the
**last** group, not all of the groups.

I believe the query has to be re-worked so that it only
returns users who are in ALL of the groups. This can
be done by a GROUP BY and HAVING.
2021-04-10 12:26:22 -04:00
Víctor Déniz
25b8cb9783 Merge branch 'MDL-71116-master' of git://github.com/sarjona/moodle 2021-04-08 01:01:15 +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
sam marshall
5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
Sara Arjona
50e9e5b2bd MDL-69792 core_badges: deprecated backpack.js and BADGE_BACKPACKURL
Final deprecation for constant BADGE_BACKPACKURL (it has been removed)
and badges/backpack.js file (it has been removed too).
Besides, some methods have started the deprecation process too:
 - badges_check_backpack_accessibility
 - badges_setup_backpack_js()
 - badges_local_backpack_js()

Apart from that, string 'addbackpack' has been deprecated here
because it's not used anywhere.
2021-03-19 15:13:03 +01:00
Sara Arjona
2c8de780d5 MDL-71116 core_badges: Backpack URLs with more than 50 chars
Backpack URLs (web and API) can have up to 255. However, the form
for creating/editing them, doesn't allow URLs with more than 50
characters. This patch align limitation to DB value (255).
2021-03-19 15:08:12 +01:00
Jun Pataleta
8eab098f26 Merge branch 'MDL-70911-master' of git://github.com/sarjona/moodle 2021-03-11 17:41:46 +08:00
Sara Arjona
0a0729f48e MDL-70911 core_badges: Add navigation menu in classic
Manage backpacks page wasn't displaying the navigation and administration
menus when using classic theme (it's unrelated to changes done here).
This patch fixes this unexpected behaviour (raised thanks to behat tests).
2021-03-11 09:00:35 +01:00
Eloy Lafuente (stronk7)
90db228323 Merge branch 'MDL-70726-master' of https://github.com/NashTechOpenUniversity/moodle 2021-03-11 00:11:15 +01:00
Jun Pataleta
5a7c629f7c Merge branch 'MDL-45242-master' of https://github.com/sammarshallou/moodle 2021-03-10 23:39:30 +08:00
sam marshall
987e55452f MDL-45242 Course: Enrol feature supports custom profile fields 2021-03-10 10:57:11 +00:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Jun Pataleta
644f32784d Merge branch 'MDL-70911-master' of git://github.com/sarjona/moodle 2021-03-10 16:15:43 +08:00