Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-45064

Option to add Preconfigured LTI Tool to Activity Chooser

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test 1

      1. As an admin add a few tool types
        1. Go to Site administration ▶︎ Plugins ▶︎ Activity modules ▶︎ LTI ▶︎ Manage external tool types
        2. Click "Add external tool configuration"
        3. Give it a name
        4. Fill in a URL (http://lti.tools/test/tp.php or http://online.dr-chuck.com/sakai-api-test/ are proper tools. But any website will do.)
        5. Tick "Show tool type when creating tool instances"
      2. As a teacher go to a course click add an activity.
      3. Select a tool type directly from the activity chooser (make sure to test both with activity chooser on and off)
      4. Make sure that tool type is selected on the next screen. (you will need to click show more)
      5. Click save
      6. View the activity
      7. Ensure the correct tool is shown
      8. In course settings select to display each section on a separate page
      9. Go to the 1st or second section's page
      10. Repeat adding activity to the section - make sure you are returned to the same section

      Test 2 (after test 1 with the same configuration).

      1. Checkout https://github.com/moodlerooms/moodle-ltisource_debugtool into mod/lti/source/ (folder should be debugtool not ltisource_debugtool)
      2. Go to Site administration ▶︎ Notifications and upgrade if needed
      3. As a teacher go to a course click add an activity (ignore debugging message). Select the same tool type you did before (make sure to test both with activity chooser on and off)
      4. View the activity. You should see the correct site
      5. As a teacher go to a course click add an activity. Select another tool type that you added.
      6. View the activity. You should see the correct site
      7. Regression test: As a teacher create an external tool activity (select General tool) Make sure you can still type an ordinary launch url and select tool types.
      8. BC test: As a teacher select the debugging tool, make sure message "Called: ltisource_debugtool_add_instance_hook" is displayed on the add activity page

      Test 3 (after test2 with the same plugin installed).

      1. Replace mod/lti/lib.php with the file from upstream master
      2. Make sure you can add external tool and also the debugging tool (make sure to test both with activity chooser on and off)

      Test 4 (revert changes in test 3).

      1. As a developer imagine that debugtool is your plugin that you need to upgrade to 3.1 to get rid of debugging message - make sure you can figure out how to do it

      Test 5

      1. Remove the debugtool plugin (pick commit from MDL-53770)
      2. Create a course in single activity format with the activity type = External tool
      3. Go to the course page:
        1. When you have predefined tools you should be redirected to the page that allows you to choose item from activity chooser
        2. When you don't have predefined tools you should be redirected to the "Add actitivy" page for the External tool.
      Show
      Test 1 As an admin add a few tool types Go to Site administration ▶︎ Plugins ▶︎ Activity modules ▶︎ LTI ▶︎ Manage external tool types Click "Add external tool configuration" Give it a name Fill in a URL ( http://lti.tools/test/tp.php or http://online.dr-chuck.com/sakai-api-test/ are proper tools. But any website will do.) Tick "Show tool type when creating tool instances" As a teacher go to a course click add an activity. Select a tool type directly from the activity chooser (make sure to test both with activity chooser on and off) Make sure that tool type is selected on the next screen. (you will need to click show more) Click save View the activity Ensure the correct tool is shown In course settings select to display each section on a separate page Go to the 1st or second section's page Repeat adding activity to the section - make sure you are returned to the same section Test 2 (after test 1 with the same configuration). Checkout https://github.com/moodlerooms/moodle-ltisource_debugtool into mod/lti/source/ (folder should be debugtool not ltisource_debugtool) Go to Site administration ▶︎ Notifications and upgrade if needed As a teacher go to a course click add an activity (ignore debugging message). Select the same tool type you did before (make sure to test both with activity chooser on and off) View the activity. You should see the correct site As a teacher go to a course click add an activity. Select another tool type that you added. View the activity. You should see the correct site Regression test: As a teacher create an external tool activity (select General tool) Make sure you can still type an ordinary launch url and select tool types. BC test: As a teacher select the debugging tool, make sure message "Called: ltisource_debugtool_add_instance_hook" is displayed on the add activity page Test 3 (after test2 with the same plugin installed). Replace mod/lti/lib.php with the file from upstream master Make sure you can add external tool and also the debugging tool (make sure to test both with activity chooser on and off) Test 4 (revert changes in test 3). As a developer imagine that debugtool is your plugin that you need to upgrade to 3.1 to get rid of debugging message - make sure you can figure out how to do it Test 5 Remove the debugtool plugin (pick commit from MDL-53770 ) Create a course in single activity format with the activity type = External tool Go to the course page: When you have predefined tools you should be redirected to the page that allows you to choose item from activity chooser When you don't have predefined tools you should be redirected to the "Add actitivy" page for the External tool.
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      wip-MDL-45064-master

      Description

      Add an option to the LTI External Tool Type Configuration settings to allow a tool to be displayed within the Activity Chooser. I don't feel like this would necessarily be "new" functionality, since - for all intents and purposes - it is just adding tools from the external tool type select box right to the activity chooser.

      I can think of 2.5 possible approaches to accomplishing this, but am still very new to Moodle, so maybe I'm going about it all wrong:

      The first approach that I've been experimenting with is to add a new option "Show tool in course activity chooser," and continuing down that path.

      The second approach that I've been considering is to use the "Show tool type when creating tool instances" option, and save the tool as a mod/lti subtype (inspired from https://code.google.com/p/basiclti4moodle/). Though, this feels a bit too presumptuous... but, maybe there could be a LTI global option to toggle whether or not display tools in the activity chooser when that option set.

      The second and a half approach is mash the first two approaches together by adding a showinchooser field and checkbox option which will save/update the tool as a mod/lti subtype.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                8 Vote for this issue
                Watchers:
                18 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  23/May/16