52 Commits

Author SHA1 Message Date
Jake Dallimore
42c24a3223
MDL-78576 mod_lti: fail launch early when preconfigured tool not found
In the case where the instance is associated with a preconfigured tool
and where that tool type has since been removed, throw an exception
early.
2023-08-16 23:51:31 +08:00
Claude Vervoort
12e207de9d MDL-69275 mod_lti: submission review (gradebook launch) 2022-10-26 15:03:41 -04:00
Claude Vervoort
d48873536b MDL-69275 mod_lti: do not skip new win code lti 1.3 2022-10-14 12:35:30 -04:00
Daniil Fajnberg
11dbde1294 MDL-73498 mod_lti: iframe allowed domain fixed 2022-06-20 15:53:45 +02:00
Peter Dias
65ae3c1660 MDL-72413 lti: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Adrian Greeve
7520614e26 MDL-71912 course modules: Toggle heading depending on navigation.
If the secondary navigation is on then the activity header does
not need to be displayed twice.
2021-11-09 11:24:08 +08:00
Michael Hawkins
e3fb51e3c8 MDL-71161 mod_lti: Display activity completion information 2021-04-13 01:21:12 +08:00
Justin Hunt
107a0c9874 MDL-66810 mod_lti: Reinstate deprecated default permissions on iframe
microphone, webcam, camera, midi, encrypted-media, geolocation
2020-08-27 09:43:26 +08:00
Claude Vervoort
4801550180 MDL-68800 mod_lti: fix domain matching launches for 1.3 2020-05-26 16:35:16 -04:00
Stephen Vickers
8a8221f587 MDL-62599 mod_lti: Changes from integration review 2019-05-06 13:33:42 +08:00
Stephen Vickers
27cbb5965e MDL-62599 mod_lti: Add platform support for LTI 1.3 2019-05-06 13:33:42 +08:00
Alexander Bias
ee73ec3d3c MDL-60219 lti: Replace pagelayout frametop with incourse 2017-11-29 09:54:42 +01:00
Connor Sheremeta
d50c3db5c7 MDL-54540 lti: Add allowfullscreen attribute to LTI IFrames 2017-08-29 13:31:18 -06:00
Mark Nelson
6d29cccf04 MDL-59668 mod_lti: use 'forceview' param to keep nav flow consistent
Part of MDL-59313.
2017-08-03 15:35:31 +08:00
Mark Nelson
c54af7fdc0 MDL-59668 mod_lti: trigger completion event in view.php
This was done so that the navigation links are rendered
correctly with accurate completion info.

Part of MDL-59313.
2017-08-03 12:43:09 +08:00
gabrielrosset
d030347bce MDL-33960 mod_lti: fix page scroll 2016-11-15 14:40:21 +01:00
Adrian Greeve
ccc9777aee MDL-47113 mod_lti: Use of html_writer rather than hard coded HTML. 2016-06-20 14:49:04 +08:00
Ben Kelada
b346737e75 MDL-47113 lti: Add link to open in new window, when popup blocked 2016-06-20 14:39:39 +08:00
David Monllao
6dbb46ec0f MDL-46710 mod_lti: Removing duplicated generated events
Event generation and completion should be generated only once.
2015-10-01 11:55:38 +08:00
Tim Lock
86b314c7b0 MDL-46710 mod_lti: fix logging and completion tracking in new windows 2015-09-25 06:27:18 +09:30
spvickers
64ca282207 MDL-49187 mod_lti: Fix tool config lookup
Changed code to look for a tool ID before then matching on the URL.
2015-03-03 18:49:58 -07:00
spvickers
e3f69b58a2 MDL-45843 mod_lti: introduced support to LTI 2.0
This commit introduces support to the LTI module for LTI 2.0.
As well as the initial commit the following changes were made
and then squashed into the single commit for integration:

* Fixed bug in services
  Fixed bug which limited characters allowed in values of template
  variables (e.g. vendor ID) in service endpoints.
  Changed language file to refer to tool registrations rather than
  tool proxies.

* Refactored service classes
  Moved classes relating to services into areas where Moodle will
  autoload them

* Ran code through code checker
  Removed all errors reported by the Code checker module
  excluding third-party OAuth.php file.

* UI improvements
  Mainly when adding an external tool to a course - fields which
  should not be changed for a selected tool are either hidden or
  disabled. Admin settings page now shows the Tool Registration
  name against a tool rather than the launch URL, and the
  registration URL replaces the GUID on the tool registrations
  page.

* Updated tool proxy registration
  Added check of tool proxy to ensure only offered capabilities
  and services are included.  Also check tool proxy when processing
  a service request.

* Code review changes
  Some fixes based on code review by Mark Nielsen and addition of
  some PHPDocs comments.

* Updates from code/PHPdocs checks
  Removed use of eval and corrected invalid PHPdocs for new
  functions/classes

* Corrected namespace error and incorrect string terminator

* Updates based on forum feedback
  Added dependencies and backup, restore and uninstall methods for
  ltiservice subplugins.
  Changed most uses of is_null to empty

* Updated custom parameters test
  Updated test_split_custom_parameters to include new function
  parameters.
  Corrected PHPdoc entry for lti_split_custom_parameters
  Fixed incorrect line separators in ltiservice.php

* Added require_capability to registrationreturn.php

* SQL and EOL updates
  Moved PHP variable in SQL into a named parameter
  Improved checks for end-of-line characters to include CR and LF
  on their own or together

* Check for semicolon separators
  Semicolon separators in custom parameters are changed to EOL
  characters when upgrading to the 2014100100 version.

* Remove unused file
  basiclti.js file not being used so removed.

* Adjust line lengths
  Split long lines in upgrade.php

* Added savepoint to upgrade.php
  savepoint omitted from earlier update to upgrade.php

* Updated namespaces and upgrade
  Service and resource classes moved into .../local/...
  Upgrade SQL moved into a function and unit test created

* Updated lti_tool_proxies table
  Added indices and foreign keys to lti_tool_proxies table

* Fixed formatting and documentation issues

* ltiservice class moved into local

* Replaced lti_scale_used comments
  Put back commented out code for lti_scale_used

* Removed redundant sesskey code

* Fixed namespace and path check
  Updated ltiservice namespace for move into local
  Added check for existence of $_SERVER['PATH_INFO']

* Updated upgrade code
  Added indices and keys to lti_tool_settings table when upgrading
  Fixed errors in upgradelib_test.php (thanks to jleyva)
  Update SQL to use Moodle functions

* Use of empty with class method
  PHP 5.4 does not like the use of empty with a class method so saved the
  value to a variable first.  PHP 5.5 seems to accept the use of a method
  with empty.

* Removed redundant indices
  Removed creation of indices for foreign keys on lti_tool_settings table
  from install.xml and upgrade.php

* Fixes based on feedback
  Minor changes and corrections based on review in JIRA

* Fixed bug in toolproxy service
  Corrected bug which failed to respond properly to an invalid request
  Also updated upgrade.txt file

* Improved admin navigation
  Added the manage tool registrations page as a separate entry on the
  admin menu (within a folder named LTI).  Made this entry the current
  position for the related pages.

* Updated PHPdocs with class names
  Added class names with namespaces to PHPdocs to replace generic
  references to "object"

* Changed object to iframe
  Use of object tag in register.php changed to use an iframe tag in line
  with the similar update made to view.php.

* Improved registration process
  A message is now displayed if the registration page has not been loaded
  in the iframe within 20 seconds.  If a user is returned to Moodle
  without a tool proxy being sent, the registration is moved back from
  pending to configured.

* Fixes for integration
  Removed comment - the template is the default path unless overridden, so
  get_path and get_template should both be defined.
  Added comment and intval to fix the issue with obtaining an error
  reason.
2014-10-16 09:33:33 +13:00
Andrew Schmadel
a73b1ba23f MDL-46844 Embed LTI External Tools with an IFrame
Clears up weird browser issues that occur when embedding content with an
`<object>` tag.
2014-09-10 09:17:07 -04:00
Adam Olley
8ce862ed83 MDL-46457 mod_lti: Render lti description through standard format_module_intro 2014-07-29 10:38:43 +09:30
Mark Nielsen
8fa50fdd34 MDL-44902: Several additions to External Tool (LTI)
* LTI service related changes:
** Fixing exceptions in OAuth library.
** Added new launch option, Existing window: replaces entire page with the LTI object.
** The LTI tool ID used to perform the launch is now sent with the LTI launch parameters.  This is sent back to Moodle on subsequent requests.
** Added $CFG->mod_lti_forcessl to force SSL on all LTI launches.
** Added new LTI launch parameter: tool_consumer_instance_name.  Default value is site full name, but can be customized with $CFG->mod_lti_institution_name.
** The LTI grade service endpoints now set the affected user to the session.  This was required for event listeners.
** Fix the grade deletion service.  Was deleting the grade item instead of just the grade.
** Send error response when LTI instance does not accept grades and grades are being sent.
** Added a method for writing incoming LTI requests to disk for debugging.  Disabled by default.
* Changes for ltisource plugins:
** Can now to plug into backup/restore.
** Can now have settings.php files.
** Can now hook into the LTI launch and edit parameters.
* Several grade changes:
** Added standard_grading_coursemodule_elements to LTI instance edit form.  This means LTI instances can be configured with a grade.
** No longer assumes that grade is out of 100.
** Replaced modl/lti:grade capability with mod/lti:view.
* JS on mod/lti/view.php for resizing the content object has been converted to YUI3.
* Fixed misspellings in language file.
* Added hooks for log post and view actions.
* Bug fix for lti_get_url_thumbprint() when the URL is missing a schema.
2014-05-01 11:56:05 -07:00
Marina Glancy
fbc4b77841 MDL-44321 events: cleaning up course_module_viewed event 2014-02-28 16:36:09 +08:00
Sam Hemelryk
2b17ec3d62 MDL-41178 mod_lti: unified @package use 2014-02-16 11:52:18 +13:00
Mark Nelson
3fdd73e83d MDL-40918 mod_lti: replaced 'view' and 'view all' add_to_log calls with events 2013-12-31 15:47:49 -08:00
rwijaya
80fd00729b MDL-41797 external tools module: fix heading levels.
AMOS BEGIN
CPY [submissions, core_grades], [submissions, mod_lti]
AMOS END
2013-11-13 09:52:32 +08:00
Joshua Johnston
4938777ed3 MDL-41520 LTI: Does not track page views for completion
Add the missing code for completion_info::set_module_viewed() since LTI
says that it offers completion tracking on view
2013-10-04 09:42:19 -04:00
Damyon Wiese
74df2951d1 Revert "MDL-39876 Change get_record('course') calls to get_course"
This reverts commit ab7632b74c331540c90229bf03d13aa2e6bdd9be.
2013-08-21 13:42:30 +08:00
sam marshall
ab7632b74c MDL-39876 Change get_record('course') calls to get_course 2013-08-15 11:31:20 +01:00
Petr Škoda
426f2d5bcc MDL-34741 use 2in3 in mod_lti 2012-08-11 20:40:06 +02:00
Ankit Agarwal
c288a3dbf8 MDL-34467 lti: Repalce all instances of get_context_instanc() with respective context_XXX::instance() 2012-07-27 13:27:13 +08:00
Eloy Lafuente (stronk7)
0fca3dbbce Merge branch 'MDL-30341' of git://github.com/scriby/moodle 2011-11-21 01:11:54 +01:00
Chris Scribner
8f45215d1c MDL-20534 lti: B28 - Update attribution headers. 2011-11-17 16:29:50 -05:00
Chris Scribner
b07878ec7d MDL-20534 lti: B14 - Implementing "show description on course page" 2011-11-17 09:28:40 -05:00
Eloy Lafuente (stronk7)
419c4f54c5 MDL-20534 lti: comments cleanup 2011-11-08 03:36:26 +01:00
Chris Scribner
5de15b83cc MDL-20534 lti: Replacing <<< strings with normal multi-line strings. 2011-11-07 01:05:42 -05:00
Eloy Lafuente (stronk7)
a55c361955 MDL-20534 lti: various fixes 2011-11-06 22:05:35 -05:00
Eloy Lafuente (stronk7)
ea04a9f989 MDL-20534 lti: A3, coding style + some scope, constructors 2011-11-06 22:02:26 -05:00
Chris Scribner
e27cb316aa MDL-20534 lti: A3, whitespace fixes (Changes by stronk7) 2011-11-06 22:00:40 -05:00
Chris Scribner
61eb12d4df MDL-20534 lti: A3, copyright and DOS lf fixed 2011-11-06 21:51:06 -05:00
Chris Scribner
c4d80efeb6 More work on the tool return page to help the user get the tool configured. 2011-11-06 20:42:00 -05:00
Chris Scribner
a390d4537c Leaving a little more room beneath embedded object so it doesn't get cut off on some themes. 2011-11-06 20:41:58 -05:00
Chris Scribner
57d1dffd38 Implementing the return URL.
Still needs some help text when an error occurs.
2011-11-06 20:41:57 -05:00
Chris Scribner
cca9d3f769 Updating launch container for mobile devices 2011-11-06 20:41:54 -05:00
Chris Scribner
f4f711d79b Updating LTI submission viewer 2011-11-06 20:41:54 -05:00
Chris Scribner
dbb0fec9fd Renaming global functions to include lti prefix 2011-11-06 20:41:50 -05:00
Chris Scribner
a0eeacf9c7 Fixing issues with launching a tool which is not configured in the admin side, and improving utility methods for determing if a tool should be registered 2011-11-06 20:41:47 -05:00