Commit graph

59 commits

Author SHA1 Message Date
Dan Poltawski
68153d5cbc Merge branch 'MDL-56564-master-2' of git://github.com/junpataleta/moodle 2016-11-23 11:27:20 +00:00
Jun Pataleta
1b669ebeba MDL-56564 mod_lti: External tool form fixes
* Revert disabling of the Preconfigured tool field on edit mode
* Reset LTI tool configuration fields when selecting a different
  preconfigured tool.
* Behat fixes for UI changes.
2016-11-23 13:10:51 +08:00
Frederic Massart
6b7e523b5d
MDL-56182 mod_lti: Include the query string when comparing type URLs 2016-11-23 10:16:50 +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
Jun Pataleta
2d3130532c MDL-56232 mod_lti: Fix logic for disabling mod_form fields
* Disable tool "Select content" button if selected preconfigured tool
  does not support Content-Item, and if the selected option is set to
  "Automatic, based on launch URL".
* Disable tool configuration form fields if selected preconfigured tool
  does not support Content-Item, but enable these fields if the selected
  option is set to "Automatic, based on launch URL".
* Behat tests also updated to check disabling/enabling of launch url field.
2016-10-10 13:16:25 +08:00
Rajesh Taneja
86ebbed6ca
MDL-56210 behat: Test for disabled button later
With phantomjs, dom is not updated by the time
next step is executed, so suffle it to ensure
this scenario pass
2016-10-05 15:45:22 +08:00
Rajesh Taneja
24c2dcada5
MDl-56210 behat: Ensure page is loaded, before checking button 2016-10-03 13:03:51 +08:00
Rajesh Taneja
71ee163664
MDL-49609 behat: Replace deprecated step 2016-09-29 07:06:26 +08:00
David Monllao
d830f1518a MDL-49609 mod_lti behat: Removing unexisting components 2016-09-28 09:03:09 +08:00
David Monllao
f747e45411 Merge branch 'MDL-49609-master-5' of git://github.com/junpataleta/moodle 2016-09-28 08:59:22 +08:00
Damyon Wiese
63e4df60f6 MDL-55839 behat: Behat fixes for theme_noname
This is a squash of many small fixes.
The list of changes are:

Initial set of behat selectors overrides required for new theme.

set core behat selectors if not overridden by theme

Remove pause

Fix for checkboxes not saving properly

Custom override for click in the user menu

Fix for behat guessing the field type.

Behat fix for guessing the correct field type.

Fix for missing closeElementBefore mforms mess.

Fix for textareas not displaying their contents.

Fix availability form element

Fix action menu selectors for activities in a course page

Fix textareas not retaining their values

Fix selector for blocks

I had to change the single select template to use an input instead of a button because of a
behat bug we have not tracked down yet.

Fix for frozen attribute in form elements

Use input instead of button while behat is still broken

Fix for navigation selector override

Behat selector fixes and multi-select fixes for templated select

Fix for configure blocks selector + booleans for autocomplete

Fixes for course_summary behat tests

Allow optgroups in single_select

Behat fixes for block_navigation

Fixes for url form element and activity chooser selectors

blocks_social - fix specific selector for behat

Fix export_for_template for selectgroups element.

Dont set empty id on the form

Fix direct call to behat_navigation in backup context

Checkbox empty value fix

Fix for assign grading panel popouts

file picker overrides to find a file manager in the page

Fix chat tests to use element name

Make selectors in mod_data behat less specific

MDL-55839: recent activity behat test relies on time()

SQUASH Honour mform element "class" attribute on the container

SQUASH Fixes for behat in mod_forum

SQUASH search form template showing value as text next to the button

SQUASH undo double selectgroup fix

SQUASH - The slightly different structure to action menus breaks course drag and drop

SQUASH Wrap loading icon in a span so the selector still works.

SQUASH Fix fragile javascript in report_loglive

SQUASH Fix tabtree, and selectgroups for mod_feedback

Also - do-not enhance the action menu - we are dropping support for this.

SQUASH Fix filemanager selector and pix_icon template for mod_forum tests.

SQUASH Fixes to breadcrumb and add formid to single select (fixes mod_glossary tests)

SQUASH lesson behat fixes. 95% of lesson styles were rubbish so they were disgarded.

SQUASH Fix lti behat tests - they were cheating and using a context step from quiz

SQUASH Behat fixes for quiz with new theme

SQUASH behat fixes for mod_wiki

SQUASH Workshop behat fixes

SQUASH Frozen form elements cannot use a readonly form element because it screws with the form JS "disabledIf" stuff.

SQUASH Fixes for grades behat tests

SQUASH behat fixes for groups

SQUASH blacklist action menu tests

SQUASH Fix for tag form element missing "manage standard tags" link

SQUASH Incomplete fixes for course behat tests

SQUASH behat fixes for badges

SQUASH Tags fixes for behat

SQUASH filepicker fixes for behat

SQUASH Abort guessing field type when we hit 'html'

SQUASH Fix for admin/tool/behat tests

SQUASH fix for admin tool behat tests

SQUASH fix for availabilty conditions hiding "aria-hidden" elements

SQUASH give the blocks more room. We get behat files because nav tree nodes are not in view

SQUASH Blocks fixed

Fix behaviour of unchecked checkboxes

SQUASH Remove incorrect step in user test

SQUASH behat fixes for course tests

Part of MDL-55071
2016-09-23 10:55:16 +01:00
Jun Pataleta
1e7490ad9a MDL-49609 mod_lti: Content-Item message type-related unit tests 2016-09-23 16:29:27 +08:00
Jun Pataleta
6696cdab8f MDL-49609 mod_lti: Content-Item message type-related Behat tests 2016-09-23 16:29:27 +08:00
Eloy Lafuente (stronk7)
e0519d032d Merge branch 'MDL-55314-master' of https://github.com/mrmark/moodle 2016-08-02 17:16:07 +02:00
Eloy Lafuente (stronk7)
8a78cb42da Merge branch 'MDL-55315-master' of https://github.com/mrmark/moodle 2016-08-02 17:07:16 +02:00
Mark Nielsen
123cc912ec MDL-55314 mod_lti: Several fixes to lti_load_cartridge
* Fixed XML loading when there is an error
* Fixed exception thrown by lti_load_cartridge
* By default, don't allow LTI mod generator to
  use a toolurl as that results in a cURL call.
2016-07-27 09:08:21 -07:00
Rajesh Taneja
52f3e060e4
MDL-55091 phpunit: Following has been deprecated.
1. getMock()
2. setExpectedException()
3. checkForUnintentionallyCoveredCode renamed to beStrictAboutCoversAnnotation
4. beStrictAboutTestSize renamed to enforceTimeLimit
5. UnitTestCase class is now fully removed.
2016-07-26 10:11:30 +08:00
Mark Nielsen
3077ae6004 MDL-55315 mod_lti: Fix Nginx 405 error
It appears that Nginx doesn't allow POST
to static files.  So rename the fixture from
a HTML file to a PHP file.
2016-07-22 11:39:42 -07:00
Juan Leyva
7ef49bd393 MDL-54951 webservice: Return intro text files in modules 2016-07-04 09:24:28 +01:00
Dan Poltawski
ab8ef75406 Merge branch 'MDL-55022-master' of git://github.com/junpataleta/moodle 2016-06-30 09:24:56 +01:00
David Mudrák
46994de566 MDL-55002 lang: Fix behat scenarios using modified strings 2016-06-27 22:57:34 +02:00
Jun Pataleta
eb55f72d63 MDL-55022 mod_lti: Fix undefined variable 2016-06-27 11:40:03 +08:00
Rajesh Taneja
c14701a2ce MDL-53988 behat: Fixed modified error string 2016-05-20 09:12:48 +08:00
Marina Glancy
bff0a28894 MDL-54632 mod_lti: separate show as preconfigured and in activitychooser 2016-05-19 15:15:46 +08:00
Dan Poltawski
60941d4cb0 Merge branch 'MDL-54025' of https://github.com/stronk7/moodle 2016-05-18 19:20:23 +01:00
Eloy Lafuente (stronk7)
8728dbeecb MDL-54025 mod_lti: Amend tests to observe the new behavior 2016-05-18 19:37:57 +02:00
David Mudrák
50d083f07a MDL-54549 lang: Fix changed strings in behat scenario files 2016-05-17 18:29:30 +02:00
Rajesh Taneja
790bf3ace0 MDL-54561 phpunit: only search with first 3 chars
Windows uses only the first three characters of prefix in
tempnam(), so only use first 3 chars to find if error
is logged
2016-05-13 13:33:52 +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
John Okely
01e8bfd745 MDL-45064 lti: LTI types in activity chooser 2016-04-13 08:30:04 +08:00
Sam Chaffee
0c9c466964 MDL-53661 mod_lti: Fix lti_prepare_type_for_save forcessl config 2016-03-30 18:32:34 -06:00
John Okely
a7be136f20 MDL-52821 lti: Remove summary from unit test 2016-03-16 13:24:22 +08:00
John Okely
2a5bb939c2 MDL-52821 lti: Change tool_consumer_instance_description to site fullname
And change tool_consumer_instance_name to site shortname
2016-03-16 12:04:09 +08:00
Andrew Nicols
295ab83d2e Merge branch 'MDL-53351-master-lti-notice' of git://github.com/mudrd8mz/moodle 2016-03-15 12:48:06 +08:00
Andrew Nicols
bac8a365fa Merge branch 'MDL-52821-master' of https://github.com/xow/moodle 2016-03-14 10:58:25 +08:00
David Mudrák
496bf3ea16 MDL-53351 lti: Do not throw PHP notice when deleting LTI instance
The typeid=0 is a valid and common value representing "Automatic, based
on launch URL" type. In that case, no record in the lti_types table is
found. Thence attempting to access its toolproxyid property used to
throw PHP notice.
2016-03-04 16:42:05 +01:00
John Okely
7204d77b9f MDL-52821 lti: Include tool_consumer_instance_description in launch 2016-03-04 15:49:56 +08:00
Mark Nielsen
00e270600f MDL-51571 mod_lti: Improve service error handling 2016-02-25 15:43:31 -07:00
Juan Leyva
0bf6c0bebe MDL-52895 webservice: Fix capability checks 2016-02-03 10:57:07 +01:00
Marina Glancy
ccfd168a6d MDL-52335 mod_lti: php7 compatibility in variable syntax 2015-12-03 09:31:20 +08:00
Juan Leyva
4bed1682bb MDL-51624 mod_lti: New Web Service mod_lti_view_lti 2015-10-07 14:54:18 +02:00
Juan Leyva
dfcdec1254 MDL-50543 mod_lti: New WS mod_lti_get_ltis_by_courses 2015-10-04 21:19:18 +02:00
Juan Leyva
d5ded9e72d MDL-51615 mod_lti: New Web Service mod_lti_get_tool_launch_data 2015-10-04 21:19:06 +02:00
Eloy Lafuente (stronk7)
d4e65df215 Merge branch 'MDL-49143-master' of git://github.com/cameron1729/moodle
Note: Fixed small bug in unit test.
2015-09-30 03:22:26 +02:00
Eloy Lafuente (stronk7)
07842a3861 MDL-49143 LTI: Test resource_link_id in lti_build_request() 2015-09-29 13:42:02 +08: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
Eloy Lafuente (stronk7)
1ca98142cd Merge branch 'MDL-46536_oauthSig' of https://github.com/moodlerooms/moodle 2014-08-19 20:27:52 +02:00
Mark Nielsen
e16146351f MDL-46051 mod_lti: Fixing errors in unknown_service_api_called class
Also adding unit tests.
2014-08-13 09:01:08 -07:00
Mark Nielsen
ff9d3d819a MDL-46536: OAuth signature fails with inconsistent new lines
When the LTI intro contains a single \n or
\r newline character then the OAuth signature
fails.  All newlines should be \r\n
2014-07-30 10:01:15 -07:00
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