Commit graph

641 commits

Author SHA1 Message Date
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
Damyon Wiese
fff88ad17d MDL-51957: Super pimp the performance of the aria tree. 2016-04-18 10:58:40 +08:00
Frederic Massart
8ff9ae8d6f MDL-50328 tool_lp: Unit test failure and little clean-up of plans page 2016-04-18 10:58:40 +08:00
Issam Taboubi
554b369b60 MDL-50328 tool_lp: Allow competencies to be assigned to a user plan 2016-04-18 10:58:40 +08:00
Frederic Massart
2ec1b70bcd MDL-51866 tool_lp: Framework scale cannot be changed once it is used 2016-04-18 10:58:40 +08:00
Issam Taboubi
4ad3ac34f4 MDL-51987 tool_lp: Create persistent plan_competencies 2016-04-18 10:58:40 +08:00
Frederic Massart
7f386a2e62 MDL-51034 tool_lp: Tests for list_plan_competencies 2016-04-18 10:58:40 +08:00
Frederic Massart
1d8f0a6f50 MDL-51034 tool_lp: List competencies in a user's plan 2016-04-18 10:58:40 +08:00
Issam Taboubi
58405003f8 MDL-51646 tool_lp: Implement plan status 2016-04-18 10:58:40 +08:00
Serge Gauthier
8a9030c18e MDL-51862 tool_lp: Create a persistent model user_competency_plan 2016-04-18 10:58:39 +08:00
Frederic Massart
5159d6794b MDL-51965 tool_lp: Revisit capabilities to read/manage plans
Templates can no longer be linked to the plan via the plan editing
page because we will need to handle plan linking/unlinking directly.
2016-04-18 10:58:37 +08:00
Serge Gauthier
6d57a987bf MDL-51644 tool_lp: Create persistent model for user_competency 2016-04-18 10:58:37 +08:00
Jean-Philippe Gaudreau
67e0b72fb2 MDL-51870 tool_lp: Use new ajax definition of external functions 2016-04-18 10:58:37 +08:00
Damyon Wiese
dccdd4da87 MDL-51958 cbe: Increase the limit for the number of levels in a tree 2016-04-18 10:58:37 +08:00
Damyon Wiese
7605c5f40f MDL-51959 cbe: Validate the depth of the path of a competency 2016-04-18 10:58:37 +08:00
Serge Gauthier
53084abb75 MDL-51645 tool_lp: Rename the plan capabilities 2016-04-18 10:58:36 +08:00
Frederic Massart
3a4c71dc22 MDL-51856 tool_lp: Fixing PHPUnit notices and plan errors 2016-04-18 10:58:36 +08:00
Serge Gauthier
e9831af3c2 MDL-51233 tool_lp: Remove unused ID number from learning plan templates
Conflicts:
	admin/tool/lp/version.php
2016-04-18 10:58:36 +08:00
Frederic Massart
e52513ee2b MDL-51602 tool_lp: Use parent ID rather than node when building tree 2016-04-18 10:58:36 +08:00
Issam Taboubi
c61db7bb6a MDL-51602 tool_lp: Add ability to duplicate a competency framework 2016-04-18 10:58:36 +08:00
Frederic Massart
03c6665894 MDL-51791 tool_lp: Improving persistent validation
- Validation methods must be protected
- An ID cannot be set when calling create()
2016-04-18 10:58:36 +08:00
Frederic Massart
bf61cd0cf3 MDL-51442 tool_lp: Validate the frameworks' scale ID 2016-04-18 10:58:36 +08:00
Serge Gauthier
31582c1638 MDL-51442 tool_lp: Framework scales configuration must be mandatory 2016-04-18 10:58:36 +08:00
Frederic Massart
8cb101a7d2 MDL-51638 tool_lp: Display the taxonomy terms where relevant 2016-04-18 10:58:36 +08:00
Frederic Massart
0c65d52c7f MDL-51504 tool_lp: Validate the templates' due date 2016-04-18 10:58:36 +08:00
Frederic Massart
a54d5b042a MDL-51026 tool_lp: Taxonomy terms can be defined on a framework 2016-04-18 10:58:36 +08:00
Frederic Massart
2327fe75f2 MDL-51598 tool_lp: Frameworks page displays correct competency count 2016-04-18 10:58:36 +08:00
Frederic Massart
14d9abc261 MDL-50482 tool_lp: Use list_competencies as static and bump version 2016-04-18 10:58:36 +08:00
Issam Taboubi
76c107eac1 MDL-50482 tool_lp: Add ability to duplicate a learning plan template 2016-04-18 10:58:36 +08:00
Frederic Massart
46fdd1d8ef MDL-50253 tool_lp: Port course competencies to new persistent model 2016-04-18 10:58:36 +08:00
Frederic Massart
72c9be0d8f MDL-50253 tool_lp: Implement a new competency picker 2016-04-18 10:58:35 +08:00
Frederic Massart
c70519692a MDL-50253 tool_lp: Clean up of tests for related competencies 2016-04-18 10:58:35 +08:00
Frederic Massart
72a1e0dede MDL-50253 tool_lp: Introduction of data generators to learning plans 2016-04-18 10:58:35 +08:00
Frederic Massart
aec5363ec1 MDL-50253 tool_lp: Clean up implementation of related competencies 2016-04-18 10:58:35 +08:00
David Monllao
68e961125e MDL-50253 tool_lp: Unit tests for related competencies
Conflicts:
	admin/tool/lp/tests/externallib_test.php
2016-04-18 10:58:35 +08:00
David Monllao
5a356fdb41 MDL-50253 tool_lp: New template for related competencies 2016-04-18 10:58:35 +08:00
David Monllao
72da1ab64b MDL-50253 tool_lp: Refactoring JS modules to reuse in related competencies
New competencyselector module used by competencies.js and competencyactions.js,
handles the competencies selection.

Conflicts:
	admin/tool/lp/amd/src/competencies.js
2016-04-18 10:58:35 +08:00