58 Commits

Author SHA1 Message Date
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Paul Holden
e0b0908ba9 MDL-74713 admin: format custom profile fields in identify config. 2022-06-14 17:19:39 +01:00
Michael Hawkins
a0f47c8bc4 MDL-74333 badges: Check profile criteria valid when reviewing 2022-05-04 12:57:38 +08:00
Peter Dias
d27e7e1950 MDL-74478 badges: Check completion_fail when awarding badge
Bring the award_criteria_activity checks in line with the observer checks
2022-04-28 12:14:45 +08:00
Michael Hawkins
c2794752ea MDL-74074 badges: Ensure profile criteria exists before completion check 2022-03-08 11:59:25 +00:00
Ruslan Kabalin
3bf770c801 MDL-71051 core_user: fix issues and address review issues 2021-04-28 11:47:26 +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
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
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
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
Paul Holden
ad7d46ed2e MDL-63387 course: use renamed role names, update Behat tests.
Specify that we want both role names (renamed course role plus
original).
2020-09-01 12:05:20 +01:00
Andrew Madden
7599223a1c MDL-66032 badges: Prevent empty awarded badges criteria being created.
When creating or editing the awarded badges criteria, the select element should be
required to prevent empty criteria from being created. In addition, if there are
already badges created with the empty criteria, there should be not be an exception
thrown when assessing whether the criteria has been completed.
2019-07-16 09:31:25 +10:00
Damyon Wiese
8f7fba80d1 MDL-65544 badges: Any all criteria
When testing any vs all aggregation method, we expect a different result
when we have looped all the competencies and they all passed or failed.
2019-05-13 10:50:05 +08:00
Marina Glancy
76f2d89471 MDL-10965 course: search only courses with completion
it is quite often when we need to have an autocomplete element that searches courses that
have completion enabled. This commit adds an option for the 'course' form element, and also
changes two places where we search for courses with completion. This should fix MDL-58989
2019-04-10 12:35:29 +02:00
Damyon Wiese
f44557d045 MDL-63876 badges: Competency deletion
Do not delete a competency if it is a criteria for a badge.
2019-03-29 11:31:15 +08:00
Damyon Wiese
6bdaf20462 MDL-63876 competencies: Skip enabled check
Allow rendering a competency summary if competencies are disabled, but do not include
links to competencies pages.
2019-03-29 11:31:15 +08:00
Damyon Wiese
8aff6f6f14 MDL-63876 badges: Coding style
Add comments to document function params and template example context.
2019-03-29 11:31:15 +08:00
Damyon Wiese
43f1c8e23c MDL-63876 badges: Allow criteria to be optional
Competencies criteria type is only added if competencies are enabled.
2019-03-29 11:31:15 +08:00
Damyon Wiese
da5e19a128 MDL-63876 badges: Do not call tool_lp directly 2019-03-29 11:31:15 +08:00
Damyon Wiese
f94786e0e1 MDL-63876 badges: Add competency criteria
Properly integration badges with competencies provided in Moodle.

Automatically grant the badge when the defined competencies are marked as proficient.
2019-03-29 11:31:15 +08:00
Stephen Bourget
3e42942d73 MDL-63614 badges: Add COMPLETION_FAIL support to badge criteria 2018-12-19 10:16:51 -05:00
Marina Glancy
442f12f81a MDL-62742 core: rename coursecat->core_course_category
Also rename course_in_list -> core_course_list_element
Deprecate class coursecat_sortable_records
2018-08-28 11:36:23 +02:00
Bas Brands
f01734122a MDL-62277 Theme boost: add badge criteria layout 2018-05-10 16:32:41 +02:00
David Monllao
27fef51d48 MDL-55491 badges: Add missing format_string call
Extra version bump + trailing whitespace removal.
2018-04-11 17:55:45 +02:00
Stephen Bourget
75653a3068 MDL-55491 badges: Add cohort as badge criteria 2018-04-09 11:03:30 +02:00
Eugene Venter
abc07b53a7 MDL-55491 badges: Add cohort as badge criteria
commissioned by NZ Customs Service
2018-04-09 10:23:50 +02:00
Stephen Bourget
cfdd8d12dd MDL-61203 badges: Allow profile picture as badge criteria 2018-01-16 10:18:23 -05:00
Andrew Hancox
a63cd3e2ca MDL-50666 core: Add function get_viewable_roles to set role visibility 2017-12-19 13:53:23 +13:00
Stephen Bourget
a7370e0dd0 MDL-59875 Badges: Allow badges to be criteria for other badges 2017-11-28 08:03:02 -05:00
Marina Glancy
484b43f456 MDL-60281 general: create_function is deprecated in PHP7.2 2017-10-16 09:37:19 +08:00
Jake Dallimore
c09541fd28 MDL-59049 badges: allows users to view badges from deleted courses 2017-08-18 09:08:50 +08:00
Simey Lameze
294f7773db MDL-53893 core_badges: Add strictness to manual badge criteria 2016-09-09 08:40:48 +08:00
Rajesh Taneja
3b73ba8fa4
MDL-55749 badges: define global before using it 2016-09-06 10:27:44 +08:00
Stephen Bourget
a0e13871cf MDL-45734 Badges: Add additional events 2016-07-29 21:51:05 -04:00
Marina Glancy
4f2424ca1c MDL-51408 badges: fix criteria for custom profile fields 2015-09-15 11:17:21 +08:00
Dan Poltawski
356fd5bae7 Merge branch 'm29_MDL-49628a' of https://github.com/totara/moodle 2015-06-02 13:54:01 +01:00
Brian Barnes
32bd11cb39 MDL-49628 general: improved accessibility of single selects 2015-04-09 11:12:16 +12:00
Eloy Lafuente (stronk7)
037546ae1f Merge branch 'MDL-48205_master' of https://github.com/totara/openbadges 2015-04-07 14:20:48 +02:00
Yuliya Bozhko
7e7b5afac6 MDL-48205 badges: Get rid of ucfirst() and make modnames translatable
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2015-03-31 16:42:55 +13:00
Marina Glancy
d368ce21ff MDL-46960 badges: optimise interaction with completionlib 2015-03-31 11:06:57 +08:00
Eloy Lafuente (stronk7)
7962f73e51 MDL-49543 badges: minor tweaks
Fix restore to support old criteria not having descriptions.
Plus delete not-needed cast (now $params is always already array).
2015-03-25 01:37:33 +01:00
Yuliya Bozhko
fffeb03fe7 MDL-49543 badges: Add decription format and backup/restore
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2015-03-24 09:22:47 +13:00
Yuliya
0b6ba27a04 MDL-49543 badges: Fix format_text and description layout
Signed-off-by: Yuliya <yuliya.bozhko@gmail.com>
2015-03-23 09:43:12 +13:00
Yuliya Bozhko
3784d3be98 MDL-49543 badges: Add description to the badge criteria
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2015-03-23 08:47:49 +13:00
Yuliya Bozhko
ae17e383ef MDL-48115 badges: Fix strtoupper() output in badges
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-11-12 09:25:58 +13:00
Yuliya Bozhko
d0053d29ed MDL-47190 Ensure badges cannot be awarded without a role
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-11-04 10:16:45 +13:00
Yuliya Bozhko
acfe72293f MDL-42965 badges: Fix empty string comparison for Oracle 2013-12-19 10:26:44 +13:00
Yuliya Bozhko
c8d2f392c5 MDL-42965 badges: Improve badge criteria review performance 2013-12-05 14:47:55 +13:00