20 Commits

Author SHA1 Message Date
Dan Poltawski
50c277a5d8 MDL-57139 js: built 2017-06-01 14:54:40 +01:00
Dan Poltawski
1fea12b0eb MDL-57139 mod_lti: ensure promise best practices 2017-06-01 10:27:59 +01:00
Cameron Ball
9a22c99ea9
MDL-57207 mod_lti: Remove redundant popover() call
Since MDL-56748 popovers are properly delegated. Making manual calls
to .popover redundant.
2016-11-30 17:45:41 +08:00
John Okely
3a5e14a5d0 MDL-55841 mod_lti: Improve interface usability & consistency
* Always say "Tool URL"
* Add help strings to cartridge interface
2016-10-27 17:13:22 +08:00
Dan Poltawski
e4edbce35d MDL-55835 js: fix lint issues
Some caused by eslint checks being better, some just not detected
because we don't show warnings well (MDL-54930).
2016-10-07 10:03:43 +01:00
Jun Pataleta
6c43d831f0 MDL-49609 mod_lti: Fixes for problems found in testing
* Load contentitem_return doc before processing
* Also use new AMD modal instead of the YUI one.
* Remove conversion of text columns in union queries
  - Since the value column in lti_types_config was changed to a
    text type, there is no need to use $DB->sql_compare_text()
    for the lti_types columns involved in the union queries in
    lti_get_type_config().
2016-09-29 11:13:50 +08:00
Jun Pataleta
c1fae2b928 MDL-49609 mod_lti: Refactor content-item and make it work using JS
* Rebase and resolve conflicts from initial patch.
* Reorganise contentitem and contentitem_return pages.
* Add capability checks for contentitem and contentitem_return pages.
* Move the building of Content-Item selection request to a local
  lib function.
* Move contentitem_return processing logic to a local lib function.
* Fix type settings update. Content-item checkbox does not get
  checked/unchecked on load.
* Fix  tool settings update. Disabled content-item checkbox gets unchecked when
  tool settings form is submitted.
* Add "Select content" button on load which launches the content item
  selection dialogue.
* Move hardcoded HTML and JS to mustache templates and AMD modules.
* Use standard YUI dialog for displaying the Content-Item selection page.
* Added processing for the following Content-Item properties:
  - text
  - icon
* On ContentItem selection, fill out form with the configuration data retrieved,
  instead of automatically saving the tool and redirecting to the course page.
* Removed section- and sectionreturn-related code since we're not automatically
  adding the tool on ContentItem selection.
* On mod_lti_mod_form, enable configuration fields if they support ContentItem
  selection.
* New form-field module for setting fields using JS
* Change types_config table's 'value' column from char(255) to text
2016-09-23 16:29:19 +08:00
Dan Poltawski
9b62a3eb71 MDL-55048 js: rebuilt files with new version of uglifyjs 2016-07-11 15:53:10 +01:00
Dan Poltawski
6e304922fb MDL-54944 js: built files after changes 2016-07-07 12:11:07 +01:00
Dan Poltawski
5602dc1735 MDL-54944 js: ensure functions are consistent in return val
Mostly we are being incosnistent when giving an early-exit shortcut.

Detected by http://eslint.org/docs/rules/consistent-return
2016-07-07 12:11:07 +01:00
Dan Poltawski
c905cd233d MDL-54944 js: fix quoting of object properities coding style
Detected by http://eslint.org/docs/rules/quote-props
2016-07-07 12:11:05 +01:00
Dan Poltawski
c96f55e6f9 MDL-54939 amd: fix lint issues
Mostly correcting jsdoc, some other line wrapping rules and empty
functions.
2016-06-17 09:03:18 +01:00
Dan Poltawski
35be582696 MDL-54939 amd: Fix lint issues fixable with eslint --fix 2016-06-16 19:33:00 +01:00
Jun Pataleta
93f3988cf7 MDL-54712 mod_lti: Remove markup from LTI admin notification messages 2016-06-10 15:10:45 +08:00
John Okely
e1e1aad183 MDL-53988 mod_lti: Remove popup for duplicate url
If creating a proxy fails, we will show an error using the
notification API. So we can remove the notification.exception call.
But modify the docs for ToolProxy.create so that future developers
will know they need to handle failures themselves.
2016-05-20 12:06:03 +08:00
Dan Poltawski
71dadd6d26 MDL-53988 lti: build js 2016-05-19 10:57:47 +01:00
John Okely
0450f5e081 MDL-53988 mod_lti: Improve error handling and user interface
Only show one, more helpful error instead of two non-helpful errors.
Don't show the 'no configured tools' message if there is a proxy there.
Return to the Tool configure page when editing a proxy if you came
from it.
2016-05-19 17:10:00 +08:00
John Okely
811d9ff941 MDL-53988 mod_lti: Fix followup up issues
Fix function naming
Fix param types
Fix error popping up twice with incorrect URL
Add confirm dialog when you delete a tool
Show orphaned tool proxies in list
Fix interface jumping up and down
Change to use notification stack
Change capabilities in db/services.php
Add loading animation after registering tool
Show loading animation until tools are rendered
2016-05-19 11:18:21 +08:00
John Okely
af9d3a923d MDL-52154 mod_lti: Add tests and lang strings and finalise API 2016-04-27 13:15:33 +08:00
Ryan Wyllie
cc193e0d1d MDL-52154 mod_lti: Improve admin interface
Created a new admin page for managing LTI tool types within
Moodle. The new page streamlines adding a new tool and allows
the admin to add a tool using either a cartridge or a registration
URL.
2016-04-26 15:13:44 +08:00