Commit graph

78025 commits

Author SHA1 Message Date
Damyon Wiese
f896aa5126 MDL-52198 cbe: Add phpdocs for user filtering function. 2016-04-18 10:58:44 +08:00
Damyon Wiese
6880579736 MDL-52198 cbe: Move user summary to an exporter 2016-04-18 10:58:44 +08:00
Frederic Massart
80583e0dff MDL-52198 cbe: Add a user selector
For now this is only in tool_lp - for core we would wrap this with an mform element.
2016-04-18 10:58:44 +08:00
Frederic Massart
a495d1a18b MDL-51858 backup: Support admin tools in course and module backups 2016-04-18 10:58:44 +08:00
Frederic Massart
9f1e6c132d MDL-51968 tool_lp: Ensure that user exists when creating a plan 2016-04-18 10:58:44 +08:00
Issam Taboubi
14199b8561 MDL-51682 tool_lp: Fix persistent sortorder handling to prevent holes 2016-04-18 10:58:43 +08:00
Frederic Massart
49ae39f747 MDL-51963 tool_lp: Reinforce scaleid validation to prevent changes 2016-04-18 10:58:43 +08:00
Frederic Massart
bf62b21d0d MDL-51963 tool_lp: Really add the scaleid field on competency
Still without any intention to use it, we add the scale field in
the database just so we can already write the right validation for
the scale ID which is pretty important as our code will start relying
on it. E.g. we only support scaleid null, or greater than 0. Adding
the validation method clearly documents what our expectations are.
2016-04-18 10:58:43 +08:00
Frederic Massart
498cf28ce1 MDL-51963 tool_lp: Pretend that there is a scale ID on competency
The reason why we are doing that is to leave the door open for
competency scales later on. Which means that we can write code
that will rely on the competency to provide its scale even though
the default behaviour will be to use the framework one.
2016-04-18 10:58:43 +08:00
Damyon Wiese
c80630da1c MDL-51041 cbe: More refactoring of exporters
* Unit tests for base exporter
* Use the course_summary_exporter for list_courses_using_competency
* Rename competency_with_linked_courses_exporter to competency_summary_exporter
* Split properties_definition in 2 (added read_properties_definition)
* Improve phpdocs
* Make some methods final
* Throw an error when other_properties overlap with properties
2016-04-18 10:58:43 +08:00
Damyon Wiese
d04ea1665e MDL-51041 cbe: Refactor to allow non-persistent exporters 2016-04-18 10:58:43 +08:00
Damyon Wiese
cc8348db07 MDL-51041 cbe: Add linked course information to the template competencies page. 2016-04-18 10:58:43 +08:00
Issam Taboubi
5b22462788 MDL-51953 tool_lp: Missing four services definitions 2016-04-18 10:58:43 +08:00
Issam Taboubi
d805cc3745 MDL-52104 tool_lp: Improve UI for the change of states in plan 2016-04-18 10:58:43 +08:00
Frederic Massart
f85ea576f0 MDL-52220 tool_lp: Adjust permission checks related to plans/templates 2016-04-18 10:58:43 +08:00
Frederic Massart
c7999f6df2 MDL-52220 tool_lp: Updating a template updates its plans 2016-04-18 10:58:43 +08:00
Frederic Massart
6d2c2e8674 MDL-52220 tool_lp: API method to unlink a plan from a template 2016-04-18 10:58:43 +08:00
Frederic Massart
4de877eba0 MDL-52220 tool_lp: Prevent updates on a plan based on a template 2016-04-18 10:58:43 +08:00
Frederic Massart
2388d46de7 MDL-52220 tool_lp: Create plan from template API 2016-04-18 10:58:43 +08:00
Frederic Massart
926913feba MDL-52197 tool_lp: Page listing cohorts linked to a template 2016-04-18 10:58:43 +08:00
Frederic Massart
bee480a4e7 MDL-52196 tool_lp: API to create a template/cohort relation 2016-04-18 10:58:42 +08:00
Frederic Massart
474090c80e MDL-52196 tool_lp: New persistent for template/cohort relationship 2016-04-18 10:58:42 +08:00
Frederic Massart
7d02292be5 MDL-51647 tool_lp: Adding index on plan status and duedate 2016-04-18 10:58:42 +08:00
Frederic Massart
68911f0e7f MDL-51647 tool_lp: Plans due date MUST include the time of the day
Just like templates. That is very important when multiple users
can edit the same plan and are in different timezones.
2016-04-18 10:58:42 +08:00
Frederic Massart
15882eca69 MDL-51647 tool_lp: Missing scale when exporting user_competency_plan 2016-04-18 10:58:42 +08:00
Frederic Massart
5bfab685ea MDL-51647 tool_lp: New task to close plans which are due 2016-04-18 10:58:42 +08:00
Jean-Philippe Gaudreau
5f9fa9f39a MDL-51647 tool_lp: Fix exporter error when plan completed 2016-04-18 10:58:42 +08:00
Frederic Massart
41682e53e3 MDL-52119 tool_lp: Invalid parameters for list_plan_competencies 2016-04-18 10:58:42 +08:00
Frederic Massart
47855def51 MDL-52195 tool_lp: Normalise the navigation in templates 2016-04-18 10:58:42 +08:00
Frederic Massart
f0b2e58190 MDL-52195 tool_lp: New page that lists the plans of a template 2016-04-18 10:58:42 +08:00
Frederic Massart
578e61c18a MDL-52119 tool_lp: Solidify the exporters to avoid developer mistakes 2016-04-18 10:58:42 +08:00
Damyon Wiese
8ec5f810f4 MDL-52119 cbe: Use generated structures for persistent classes 2016-04-18 10:58:42 +08:00
Frederic Massart
a6ec05b675 MDL-51868 tool_lp: Create evidence persistent 2016-04-18 10:58:42 +08:00
Damyon Wiese
0267097956 MDL-52064 cbe: Fixes for unit tests.
There were some real failures that the unit tests caught.
2016-04-18 10:58:42 +08:00
Damyon Wiese
5db5c22c15 MDL-52064 cbe: Exporters are generic exporters - not for output
Making the persistent_exporter implement templatable, implies that the
exporters are designed for output - but they are not - they are designed
for any data returned through an external function. So lets not make them templatable,
and make the default function name "export".
2016-04-18 10:58:41 +08:00
Damyon Wiese
a214d35ec2 MDL-52064: Improve persistent exporter
- Use to_record instead of custom getters
- Remove custom formatting for taxonomies
- Fix bugs in exporter (PARAM_FORMAT was wrong)
- use $comp->get_context() instead of $comp->get_framework()->get_context()
2016-04-18 10:58:41 +08:00
Damyon Wiese
86938d0613 MDL-52064 cbe: Clean many common errors in external functions
Fixes include format_text/format_string
New persistent_exporter class to export persistent objects for use in external apis.
Always validate_context
Always use validated params - not raw params
Do not use "xxformatted" properties.
2016-04-18 10:58:41 +08:00
Damyon Wiese
7a3953dd52 MDL-52030 cbe: Fix drag and drop for manage competencies page
Previously I was attaching the drag / drop handlers to the list items,
which were nested which caused many wierd behaviours. Now I attach them only
to the span in the lists which are never nested.
2016-04-18 10:58:41 +08:00
Frederic Massart
1e18bc48ee MDL-51029 tool_lp: Competency list is indexed by ID 2016-04-18 10:58:41 +08:00
Damyon Wiese
e1bbe57459 MDL-51038 cbe: Change the return value from the competency picker
If multi-select is not enabled, return a single competencyId, not an
array of competencyIds.
2016-04-18 10:58:41 +08:00
Damyon Wiese
04dc9983d8 MDL-51038 cbe: Fixes for multi-selection of the competency tree
* Added missing jsdocs
* Disable multi-select for the main competencies tree (only allow it in the popups).
* Disallow selecting the top node in the competencies picker
* When multi-select is disabled, the selectionchanged event now only passes the one node, not a list with one item.
* Removed the flash when loading the picker (by hiding the tree while it's being rendered)
2016-04-18 10:58:41 +08:00
Damyon Wiese
ac588bf3de MDL-51038 competencies: Make the competencies tree handle multi-select
In the places where it makes sense, add shift/control click support to the
competencies tree (and the keyboard equivalent).
2016-04-18 10:58:41 +08:00
Frederic Massart
fdaf46adbb MDL-51029 tool_lp: Before validate was not always called
When the validation already happened we did not call before_validate().
It must always be called as before_validate() can be used as if it was
a before_all() callback.
2016-04-18 10:58:41 +08:00
Frederic Massart
1896274ff5 MDL-51029 tool_lp: Implement competency rules 2016-04-18 10:58:41 +08:00
Jean-Philippe Gaudreau
192569ed17 MDL-51805 tool_lp: Freeze learning plan when it is marked as completed
This includes:
* Copy user competencies to user_competency_plan when updating plan
  with status complete.
* User competencies in user_competency_plan are deleted when the plan
  is set back to draft or active.
* the api::list_plan_competencies method is now returning
  user_competency_plan objects if plan status is complete.
* external functions and renderer have been adapted to the new api
  methods.
* Remove fields status and reviewerid from user_competency_plan
2016-04-18 10:58:41 +08:00
Damyon Wiese
6bf250f84e MDL-51961 cbe: UX improvements to manage competencies
1. The competencies tree should open with all nodes initially collapsed
    (unless there is less than 20 results, in which case they should all be expanded)
2. When the tree is refreshed, all previously selected nodes should be remembered
    and the tree expanded to that point.
3. While the tree is reloading - there should be a "spinner"
2016-04-18 10:58:41 +08:00
Damyon Wiese
91f3ad48d9 MDL-51957 cbe: Minor changes for competencies tree.
Minor JSDoc changes, and error handler changes.
2016-04-18 10:58:41 +08:00
Damyon Wiese
24f0680ca6 MDL-51957 competencies: Improvements to event handling
Add custom .on methods instead of expecting code outside the module
to know which node to bind to to listen for events.

Also keep the selectionChanged handler private to the competencyactions module.

Finally - fix the broken move competency action.
2016-04-18 10:58:41 +08:00
Damyon Wiese
85dbaf91ba MDL-51957 cbe: Use a jquery 'change' event instead of passing callbacks 2016-04-18 10:58:40 +08:00
Damyon Wiese
60bf8bb0aa MDL-51957 cbe: Cleanup data_for_manage_competencies_page webservice
Declare the correct return type and remove the commented code from the renderable.
2016-04-18 10:58:40 +08:00