Create entity definitions for competencies, frameworks and users
for new report source to provide data for report editor.
AMOS BEGIN
CPY [competencyframework,tool_lp],[competencyframework,core_competency]
CPY [proficient,tool_lp],[proficient,core_competency]
CPY [rating,tool_lp],[rating,core_competency]
CPY [taxonomy_competency,core_competency],[competency,core_competency]
AMOS END
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing
All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.
Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
This change removes LEFT JOINS to improve the performance
when run against Moodle sites with very large data sets.
It will also cause some additional contexts to be returned:
1. When a user has modified a user_evidence_competency
without modifying its associated user_evidence record
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
Previously, if a course module had already been graded, course module
completion linked to the course module would not update. This
commit adds the option to enable overriding the grade at the course
module competency level.
This ensures that if enabled and a user completes a module associated
with a competency, that competency will be graded appropriately.
Previously missing were the two new properties added in 36bc7b07:
showactivitydates & showcompletionconditions - this change ensures
all properties are requested before exporting courses linked to
competencies.
Replace it for correct property_exists() when the element
being inspected is a property of object/class.
Amended and squased changes:
- keep mongo unmodified. The information is array, hence correct.
- fix a couple of messaging phpdocs that were incorrect.
Amended take#2:
- As far as mongo resturns BSONDocument that is ArrayObject, aka
implements ArrayAccess, we have decided to explicitly cast results
to array so existing array_key_exists() and other accesses will
continue working the same.
Capability check in a course was using global competency capabilities
moodle/competency:competencyview and moodle/competency:competencymanage
instead of the course equivalents. Users outside the course context
could not manage course competencies.
This commit reviews all continue uses in core happening within a
loop / switch / case hierarchy. This does not cover:
- Changes to libraries. Will be handled in another issue / commit.
- Uses out from loops, will be reviewed by other commit.
The policy followed has been:
- When possible, take rid of the continue.
- When clearly the intention was to jump to next element in loop
change to continue 2
- When it was not clear, keep old behavior switching to break, no
matter how weird the behavior may be.