57 Commits

Author SHA1 Message Date
Jake Dallimore
4476164613
MDL-79384 mod_lti: fix tool configuration details modal 2023-09-19 09:41:19 +08:00
Jake Dallimore
630066c4f5
MDL-78916 mod_lti: update add/edit instance form to new design
This form layout applies when adding or editing any instance which is
based on a preconfigured tool (course or site). That is now the only
supported way of configuring a mod_lti instance.
2023-09-15 10:47:10 +08:00
Jun Pataleta
1c892fb6d9
Merge branch 'MDL-78324-master-7' of https://github.com/andrewnicols/moodle 2023-09-11 16:29:56 +08:00
Ilya Tregubov
ba32de5281
MDL-78909 mod_lti: Show category restriction only for site tools 2023-09-11 10:14:58 +08:00
Ilya Tregubov
f9b1bac756
MDL-78909 mod_lti: Support coursevisibility override for courses 2023-09-11 10:14:58 +08:00
Andrew Nicols
48bc688ccd
MDL-78324 core: Convert modals to use new static methods
This commit takes all modals which were not using the legacy
ModalFactory.create triggers and migrates them to the new Modal.create
method.
2023-09-09 00:04:11 +08:00
Andrew Nicols
af7719682d
MDL-79064 core: Update all get_strings as uses 2023-08-29 10:57:54 +08:00
Jackson D'souza
480114fc96 MDL-69489 mod_lti: Make LTI only available to specific course categories
* Add new table for LTI types course categories
* Update LTI add / update form to restrict tool availablily in selected course categories
* Bumped version
2023-08-22 12:53:07 +01:00
Jake Dallimore
3a1db3cc47
MDL-78576 mod_lti: improve course tool deletion with contextual messages
Present different deletion messages depending on whether the tool has
usages or not.
2023-08-16 23:51:31 +08:00
Jake Dallimore
51cc455525
MDL-78575 mod_lti: Add deletion support to course tools page 2023-07-17 09:22:18 +08:00
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Jake Dallimore
7e6f706717 MDL-77140 mod_lti: fix content item return for new TinyMCE versions 2023-02-10 10:11:34 +08:00
Claude Vervoort
12e207de9d MDL-69275 mod_lti: submission review (gradebook launch) 2022-10-26 15:03:41 -04:00
Jake Dallimore
a611b8d296 MDL-74906 mod_lti: fix form selector in multi-item content item post
Use #region-main-box and not .mform in the selector, otherwise it may
return the wrong mform, such as global search, if enabled. This is the
same way the form is selected in showMultipleSummaryAndHideForm().
2022-06-09 16:52:36 +08:00
Andrew Nicols
e1b9d5f3cd MDL-73915 js: Drop support for IE and android
Moodle announced that support for IE would be dropped back in August
2020 with Moodle 3.9 but not active steps were taken at that time. That
decision was made in MDLSITE-6109 and this particular step was meant to
be taken in Moodle 3.10.

This is the first step taken to actively drop support for IE.

This commit also bumps the browser support pattern from 0.25% to 0.3%.
The percentage here includes any browser where at least this percentage
of users worldwide may be using a browser. In this case it causes
support for Android 4.3-4.4 to be dropped, which relate to Android
KitKat (released 2013).

This combination of changes means that all of the supported browsers in
our compatibility list support modern features including async,
for...of, classes, native Promises, and more which has a huge impact on
the ease of debugging code, and drastically reduces the minified file
size because a number of native Polyfills included by Babel are no
longer included.
2022-02-23 08:55:20 +08:00
Andrew Nicols
0a4047ab31 MDL-73915 js: Switch amd minification to terser
Unfortunately the babel minify-mangle plugin seems to be abandoned and
in certain circumstances can be very buggy. The only safe options are to
disable it, or to switch to a different minification library.

Not minifying our javascript is not ideal, so this commit updates the
javascript tasks to use a rollup, combined with babel, and terser.

Babel still converts code from ES/UMD/AMD to AMD modules with the
relevant browser support, whilst terser minifies the code.

The rollup bundler handles tracking and creation of sourcemaps, and
supports better parallelisation of the tasks.

Since the upgrade to Node LTS/Gallium requires an upgrade to @babel/core
and eslint, which change the built files anyway, this seems like the
ideal time to make this change.
2022-02-23 08:55:09 +08:00
Andrew Nicols
aa7f7957ea MDL-73915 js: Upgrade babel and eslint 2022-02-23 08:53:54 +08:00
Ilya Tregubov
47c9289420 MDL-69092 mod_lti: Fix typo. 2021-11-19 09:50:36 +02:00
Andrew Madden
36f3aee38e MDL-69092 mod_lti: Add js_pending to help behat tests 2021-11-19 09:50:35 +02:00
Andrew Madden
f435f313e0 MDL-69092 mod_lti: Add pagination to toolconfigure.php.
* Add local function to access subsets of proxies and types direct from DB.
* Add local function to access count of proxies and types direct from DB.
* Add new external function to get both proxies and types with pagination.
* Add new external function to get count of proxies and types.
* Implement pagination using page factory in JS.
* Added unit tests to cover new external functions.
* Add mod_lti behat generators and tests.
* Show first and last button in paging bar.
* Created helper class to assist with new functions.
2021-11-17 22:44:56 +11:00
Andrew Nicols
4f422785c6 MDL-71113 javascript: Improve basic JS Documentation 2021-06-18 09:38:05 +08:00
Andrew Nicols
92179b7057 MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
Andrew Nicols
70dcc60862 MDL-71113 js: Bare minimum fixes to build jsdoc 2021-06-18 09:38:04 +08:00
Claude Vervoort
ca80d53b38 MDL-70500 lti: dyn reg can be used to update tools 2021-04-20 17:12:28 -04:00
Ilya Tregubov
eaf40e050e MDL-69680 lib: Replace deprecated jQuery functions 2021-03-04 12:48:26 +08:00
Claude Vervoort
3071777ddb MDL-70361 mod_lti: deeplinking multiple preserve resourceid and tag 2020-11-30 14:41:13 -05:00
Claude Vervoort
84e90d5db4 MDL-67301 mod_lti: dynamic registration 2020-10-24 09:27:55 -04:00
Claude Vervoort
957da4b564 MDL-67473 mod_lti: deeplinking multiple support
AMOS BEGIN
 CPY [contentitem_help,mod_lti],[contentitem_deeplinking_help,mod_lti]
AMOS END
2020-09-30 08:03:59 -04:00
Claude Vervoort
e5423ddb93 MDL-65306 mod_lti: fix deeplinking support for tag and resourceid 2020-04-24 15:30:26 -04:00
Ryan Wyllie
195ea4480b MDL-62497 javascript: build AMD modules with new transpiler 2019-07-19 14:12:49 +08:00
Mihail Geshoski
a6c735031a MDL-65751 lib: Replace deprecated jQuery functions 2019-07-17 09:59:44 +08:00
Damyon Wiese
e14f112bd0 MDL-55592 lti: Forget the key and secret
When the "Enter your consumer key and shared secret" form is displayed,
it should not contain the same values it had the last time it was opened.
2019-05-29 13:59:22 +08:00
Stephen Vickers
27cbb5965e MDL-62599 mod_lti: Add platform support for LTI 1.3 2019-05-06 13:33:42 +08:00
Andrew Nicols
1b6e378edb MDL-61651 mod_lti: Add missing callback doc 2018-04-24 09:21:51 +08:00
Claude Vervoort
da04fb70fa MDL-61651 mod_lti: cisr lineitem support 2018-04-20 11:22:11 +08:00
David Knuplesch
cc3c33f8ba MDL-60549 lti: support for moving embedded lti into separate tab 2018-01-10 12:08:44 +01:00
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