1 Installation steps and configuration of
LA EjsS Moodle plugin
Current Situation
Moodle 4.0 supports new functionalities for plugins
Learning Analytics (LA) EjsS Moodle Plugin updated for Moodle 4.0
References:
Tutorial: How to write plugins for Moodle, available at https://docs.moodle.org/dev/Tutorial
LA EjsS Moodle Plugin, available at https://gitlab.com/ejsS/addon-projects/moodle-plugin
Step 1. Installation in Moodle 4.0
As an admin user, install and configure the plugin.
Download the plugin and generate a zip file with the plugin folder (check that the zip file does not contain hidden folders such as .git or similar)
Go to Site Administration > Plugins > Install plugins
Drag and drop the zip file and click "Install plugin from the Zip file"
If the validation of the plugin is successful, click "Continue"
If the checks of the Moodle server are successful, click "Continue"
In the window Plugins check, review the plugin information and click "Upgrade Moodle database now"
If the installation is successful, click "Continue"
Step 2. Configuration in Moodle 4.0
The plugin requires the configuration of several aspects in Moodle.
Enable web service advance feature
Go to Site Administration > General > Advanced features
Enable web services and click "Save changes"
Enable REST protocol
Got to Site Administration > Server > Web services > Manage protocols
Enable REST protocol and click "Save changes"
Allow users to create a web service token and use REST protocol
Go to Site Administration > Users > Permissions > Define roles
Click the button "Edit" for Authenticated user
Filter capabilities with the text "web service"
Click "Allow" for the capability "Create a web service token"
Filter capabilities with the text "rest:use"
Click "Allow" for the capability "Use REST protocol" and click "Save changes"
Using the LA EjsS Moodle
Step 1. Creating a course with EjsS simulations
As an admin user, verify which users have the role "Course creator" in Site Administration > Users > Assign roles in System. Note that the course creators, teachers or students cannot be an admin user as well.
As a Course creator user, create a new course as usual.
Go to Site Administration > Courses > Manage courses and categories
Click the button "Create new course"
Fill the course properties
Go to Completion tracking > Enable completion tracking, and select No
Click "Save and display"
Enable "Edit mode"
The plugin allows to include EjsS simulations as a resource.
Click "Add an activity or resource" and select EjsS Simulation
Enter a name and description, and then upload the simulation zip file
Select the zip file and click Unzip
Select the file index.html and click Set main file
Click the button "Save and display"
Note that you can find a repository of EjsS simulations at https://iwant2study.org/ospsg/
References:
Open Source Physics @ Singapore, available at https://iwant2study.org/ospsg/
Step 2. Accessing a course with EjsS simulations
As a course creator user, enroll users as teachers or students.
Go to the Participants page in the course and click the button "Enrol users"
Search for the teacher and select Teacher as role to assign, and click the button "Enrol users"
Search for the teachers and select Student as role to assign, and click the button "Enrol users"
As a student user, access the course and try the EjsS simulation.
As a teacher or course creator user, access the course and see the LA EjsS plugin reports.
Go to the specific course and then go to More > EjsS Analytics
Click the button "See" of the EjsS simulation that you want to see
Click the button "Activity" of the EjsS simulation to see the activity report
Click the button "Search" of the EjsS simulation to see an activity report for a specific action
Click the button "Monitor" of the EjsS simulation to see a real-time activity report
As an admin user, list the courses with EjsS simulations.
Go to Site Administration > Reports > EjsS Simulation & Stats
Click the link of the course to see its report as a teacher user
2 Patching Moodle 4.0 to allow integration with SLS
Current Situation
Moodle 4.0 supports LTI 1.3 and LTI Advantage
SLS partially supports LTI 1.3 and does not support LTI Advantage
References:
Publish as LTI tool in Moodle, available at https://docs.moodle.org/400/en/Publish_as_LTI_tool#Custom_launch_parameters
List of LTI Advantage certified products, available at https://www.imsglobal.org/ltiadvantage
Integration with SLS, available at https://docs.learning.moe.edu.sg/sls/partners/integration/integrationsls.html
Patch for resource identification
Moodle 4.0 supports two targets link uris:
[MOODLE_40]/enrol/lti/launch.php endpoint (for regular resource link launches)
[MOODLE_40]/enrol/lti/launch_deeplink.php endpoint (for deep linking launches)
Moreover, Moodle 4.0 requires that the resource identification by the custom claim field 'id'.
For example, a valid launch request for Moodle could be the following one:
{"sub":"f25afda7-b05b-4b70-82b5-2f285f1807fe",
"name":"Loo Kang, Wee",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/roles":[
"http:\/\/purl.imsglobal.org\/vocab\/lis\/v2\/institution\/person#Instructor"
],
"iss":"https:\/\/vle.dev.sls.ufinity.com",
"aud":["76b5f118-d6b0-4a6b-9cfa-00fa3387e3d9"],
"nonce":"nonce-7964af86f762fdac04fdaa4286650308f2c63cb92dba8f2a21e226049a65c8c5",
"iat":1660698910,
"exp":1660699210,
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/message_type":"LtiResourceLinkRequest",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/version":"1.3.0",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/deployment_id":
"9ebbd42f-0f45-41f8-b25b-8cf5aef68d02",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/target_link_uri":
"https:\/\/iwant2study.org\/moodle402\/enrol\/lti\/launch.php ",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/resource_link":{
"id":"13d6485e-2482-49d4-bbc5-f9dec785d5cf_890743021_1660698910",
"title":null,
"description":null
},
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/context":null,
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/role_scope_mentor":[],
"https:\/\/purl.imsglobal.org\/spec\/lti-nrps\/claim\/namesroleservice":null,
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/custom": {
"id": "68b09cbe-85fc-4777-be2d-d6d8c219f775"
}
}
Moodle implements the resource identification consistently with the LTI 1.3 specification. See https://www.imsglobal.org/spec/lti/v1p3/impl#do-not-use-resource_link-id
However, SLS does not allow to include the resource identification by the custom claim field 'id'.
We decided to patch Moodle to allow SLS to include the resource identification in the target link uri.
For example, a valid SLS launch request for Moodle could be the following one:
{"sub":"f25afda7-b05b-4b70-82b5-2f285f1807fe",
"name":"Loo Kang, Wee",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/roles":[
"http:\/\/purl.imsglobal.org\/vocab\/lis\/v2\/institution\/person#Instructor"
],
"iss":"https:\/\/vle.dev.sls.ufinity.com",
"aud":["76b5f118-d6b0-4a6b-9cfa-00fa3387e3d9"],
"nonce":"nonce-7964af86f762fdac04fdaa4286650308f2c63cb92dba8f2a21e226049a65c8c5",
"iat":1660698910,
"exp":1660699210,
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/message_type":"LtiResourceLinkRequest",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/version":"1.3.0",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/deployment_id":
"9ebbd42f-0f45-41f8-b25b-8cf5aef68d02",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/target_link_uri":
"https:\/\/iwant2study.org\/moodle402\/enrol\/lti\/launch.php?id=68b09cbe-85fc-4777-be2d-d6d8c219f775",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/resource_link":{
"id":"13d6485e-2482-49d4-bbc5-f9dec785d5cf_890743021_1660698910",
"title":null,
"description":null
},
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/context":null,
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/role_scope_mentor":[],
"https:\/\/purl.imsglobal.org\/spec\/lti-nrps\/claim\/namesroleservice":null,
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/custom":null
}
File: [MOODLE_40]/enrol/lti/login.php
// This code verifies the target_link_uri. Only two values are permitted (see endpoints listed above).
>> if (!in_array($targetlinkuri, $validuris)) {
<< if (!in_array(strtok($targetlinkuri,'?'), $validuris)) {
$msg = 'The target_link_uri param must match one of the redirect URIs set during tool registration.';
throw new coding_exception($msg);
}
File: [MOODLE_40]/lib/lti1p3/src/LtiMessageLaunch.php
>> means remove line
<< means add line
/**
* Fetches the decoded body of the JWT used in the current launch.
*
* @return array|object returns the decoded json body of the launch as an array
*/
public function getLaunchData()
{
>> return $this->jwt['body'];
<< $launchdata = $this->jwt['body'];
<< if(strpos($launchdata['iss'], "vle.") !== false) {
<< if (empty($launchdata['https://purl.imsglobal.org/spec/lti/claim/custom']['id'])) {
<< $query = parse_url($launchdata['https://purl.imsglobal.org/spec/lti/claim/target_link_uri'], PHP_URL_QUERY);
<< if (!empty($query)) {
<< parse_str($query, $query_array);
<< if (!empty($query_array['id'])) {
<< $launchdata['https://purl.imsglobal.org/spec/lti/claim/custom'] = $query_array;
<< }
<< }
<< }
<< }
<< return $launchdata;
}
References:
Learning Tools Interoperability Core Specification Version 1.3, available at https://docs.moodle.org/400/en/Publish_as_LTI_tool#Custom_launch_parameters
Patch for keeping SLS username and role in Moodle
New Moodle accounts will be automatically created for SLS users launching a resource from SLS platform. Because the SLS launch request does include the fields 'given_name' and 'family_name', Moodle generates a new account with a name that is difficult to be associated with SLS users.
We decided to patch Moodle to include the missing fields (based on the field 'name') in the SLS launch request.
Moreover, the role identifier used by the SLS platform is not identified adequately by Moodle. Specifically, Moodle requires role identifier with the prefix http://purl.imsglobal.org/vocab/lis/v2/membership, wheres SLS uses the prefix http://purl.imsglobal.org/vocab/lis/v2/institution/person.
We decided to patch Moodle to include the identification of the role used by SLS in Moodle.
Considering these patches, a valid SLS launch request for Moodle could be the following one:
{"sub":"f25afda7-b05b-4b70-82b5-2f285f1807fe",
"name":"Loo Kang, Wee",
"given_name": "Wee",
"family_name": "Loo Kang",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/roles":[
"http:\/\/purl.imsglobal.org\/vocab\/lis\/v2\/membership#Instructor"
],
"iss":"https:\/\/vle.dev.sls.ufinity.com",
"aud":["76b5f118-d6b0-4a6b-9cfa-00fa3387e3d9"],
"nonce":"nonce-7964af86f762fdac04fdaa4286650308f2c63cb92dba8f2a21e226049a65c8c5",
"iat":1660698910,
"exp":1660699210,
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/message_type":"LtiResourceLinkRequest",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/version":"1.3.0",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/deployment_id":
"9ebbd42f-0f45-41f8-b25b-8cf5aef68d02",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/target_link_uri":
"https:\/\/iwant2study.org\/moodle402\/enrol\/lti\/launch.php?id=68b09cbe-85fc-4777-be2d-d6d8c219f775",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/resource_link":{
"id":"13d6485e-2482-49d4-bbc5-f9dec785d5cf_890743021_1660698910",
"title":null,
"description":null
},
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/context":null,
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/role_scope_mentor":[],
"https:\/\/purl.imsglobal.org\/spec\/lti-nrps\/claim\/namesroleservice":null,
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/custom":null
}
File: [MOODLE_40]/lib/lti1p3/src/LtiMessageLaunch.php
/**
* Fetches the decoded body of the JWT used in the current launch.
*
* @return array|object returns the decoded json body of the launch as an array
*/
public function getLaunchData()
{
$launchdata = $this->jwt['body'];
if(strpos($launchdata['iss'], "vle.") !== false) {
if (empty($launchdata['https://purl.imsglobal.org/spec/lti/claim/custom']['id'])) {
$query = parse_url($launchdata['https://purl.imsglobal.org/spec/lti/claim/target_link_uri'], PHP_URL_QUERY);
if (!empty($query)) {
parse_str($query, $query_array);
if (!empty($query_array['id'])) {
$launchdata['https://purl.imsglobal.org/spec/lti/claim/custom'] = $query_array;
}
}
}
>> if (!empty($launchdata['name']) and
>> empty($launchdata['given_name']) and
>> empty($launchdata['family_name'])) {
>> $parts = explode(",", $launchdata['name']);
>> $launchdata['given_name'] = trim($parts[0]);
>> if (!empty($parts[1])) {
>> $launchdata['family_name'] = trim($parts[1]);
>> } else {
>> // if not family name, set initials
>> $launchdata['family_name'] = implode( '', array_map( function ( $word ) {
>> return strtoupper( $word['0'] );
>> }, explode( ' ', $parts[0] ) ) );
>> }
>> }
>> $launchroles = $launchdata['https://purl.imsglobal.org/spec/lti/claim/roles'] ?? null;
>> if ($launchroles) {
>> foreach ($launchroles as $key => $role) {
>> if ($role == 'http://purl.imsglobal.org/vocab/lis/v2/institution/person#Instructor') {
>> $launchroles[$key] = 'http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor';
>> } elseif ($role == 'http://purl.imsglobal.org/vocab/lis/v2/institution/person#Leaner') {
>> $launchroles[$key] = 'http://purl.imsglobal.org/vocab/lis/v2/membership#Leaner';
>> }
>> }
>> $launchdata['https://purl.imsglobal.org/spec/lti/claim/roles'] = $launchroles;
>> }
}
return $launchdata;
}
Reference:
Role vocabularies, available at https://www.imsglobal.org/spec/lti/v1p3/#role-vocabularies
Patch for forcing embed simulation
Moodle uses the custom field 'force_embed' of the launch request to force embed view. This field is not sent by the SLS platform.
We decided to patch Moodle to include the custom field 'force_embed' in the SLS launch request.
Considering this patch, a valid SLS launch request for Moodle could be the following one:
{"sub":"f25afda7-b05b-4b70-82b5-2f285f1807fe",
"name":"Loo Kang, Wee",
"given_name": "Wee",
"family_name": "Loo Kang",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/roles":[
"http:\/\/purl.imsglobal.org\/vocab\/lis\/v2\/membership#Instructor"
],
"iss":"https:\/\/vle.dev.sls.ufinity.com",
"aud":["76b5f118-d6b0-4a6b-9cfa-00fa3387e3d9"],
"nonce":"nonce-7964af86f762fdac04fdaa4286650308f2c63cb92dba8f2a21e226049a65c8c5",
"iat":1660698910,
"exp":1660699210,
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/message_type":"LtiResourceLinkRequest",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/version":"1.3.0",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/deployment_id":
"9ebbd42f-0f45-41f8-b25b-8cf5aef68d02",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/target_link_uri":
"https:\/\/iwant2study.org\/moodle402\/enrol\/lti\/launch.php?id=68b09cbe-85fc-4777-be2d-d6d8c219f775",
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/resource_link":{
"id":"13d6485e-2482-49d4-bbc5-f9dec785d5cf_890743021_1660698910",
"title":null,
"description":null
},
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/context":null,
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/role_scope_mentor":[],
"https:\/\/purl.imsglobal.org\/spec\/lti-nrps\/claim\/namesroleservice":null,
"https:\/\/purl.imsglobal.org\/spec\/lti\/claim\/custom": {
"force_embed": 1
}
}
File: [MOODLE_40]/lib/lti1p3/src/LtiMessageLaunch.php
/**
* Fetches the decoded body of the JWT used in the current launch.
*
* @return array|object returns the decoded json body of the launch as an array
*/
public function getLaunchData()
{
$launchdata = $this->jwt['body'];
if(strpos($launchdata['iss'], "vle.") !== false) {
if (empty($launchdata['https://purl.imsglobal.org/spec/lti/claim/custom']['id'])) {
$query = parse_url($launchdata['https://purl.imsglobal.org/spec/lti/claim/target_link_uri'], PHP_URL_QUERY);
if (!empty($query)) {
parse_str($query, $query_array);
if (!empty($query_array['id'])) {
$launchdata['https://purl.imsglobal.org/spec/lti/claim/custom'] = $query_array;
}
}
}
if (!empty($launchdata['name']) and
empty($launchdata['given_name']) and
empty($launchdata['family_name'])) {
$parts = explode(",", $launchdata['name']);
$launchdata['given_name'] = trim($parts[0]);
if (!empty($parts[1])) {
$launchdata['family_name'] = trim($parts[1]);
} else {
// if not family name, set initials
$launchdata['family_name'] = implode( '', array_map( function ( $word ) {
return strtoupper( $word['0'] );
}, explode( ' ', $parts[0] ) ) );
}
}
$launchroles = $launchdata['https://purl.imsglobal.org/spec/lti/claim/roles'] ?? null;
if ($launchroles) {
foreach ($launchroles as $key => $role) {
if ($role == 'http://purl.imsglobal.org/vocab/lis/v2/institution/person#Instructor') {
$launchroles[$key] = 'http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor';
} elseif ($role == 'http://purl.imsglobal.org/vocab/lis/v2/institution/person#Leaner') {
$launchroles[$key] = 'http://purl.imsglobal.org/vocab/lis/v2/membership#Leaner';
}
}
$launchdata['https://purl.imsglobal.org/spec/lti/claim/roles'] = $launchroles;
}
>> $launchdata['https://purl.imsglobal.org/spec/lti/claim/custom']['force_embed'] = 1;
}
return $launchdata;
}
Patch for providing a simulation browser
Since the SLS platform does not provide a Deep Linking process compliant with the specification, we have defined an alternative way to allow users to select the resource.
When a Deep Linking process is requested to the LTI Launch URI, it replies to user with a resource browser. The user only needs to copy the resource URL into the configuration input.
File: [MOODLE_40]/ enrol/lti/launch.php
>> // Special case for SLS, we show list of resources if deep linking request
>> // the deep linking must use launch_deeplink.php, but we provide this alternative way
>> // i.e. a launch request with deep linking type when we only want to see list of resources
>> if ($messagelaunch->isDeepLinkLaunch() && message_helper::is_instructor_launch($launchdata)) {
>> $auth = get_auth_plugin('lti');
>> $auth->complete_login(
>> $launchdata,
>> new moodle_url('/enrol/lti/launch.php', ['launchid' => $messagelaunch->getLaunchId()]),
>> auth_plugin_lti::PROVISIONING_MODE_AUTO_ONLY,
>> $legacyconsumersecrets ?? []
>> );
>> require_login(null, false);
>> global $USER, $CFG;
>>
>> $PAGE->set_context(context_system::instance());
>> $url = new moodle_url('/enrol/lti/launch.php');
>> $PAGE->set_url($url);
>> $PAGE->set_pagelayout('popup');
>> $PAGE->set_title(get_string('opentool', 'enrol_lti'));
>>
>> // Get all the published_resource view objects and render them for selection.
>> $resourcerepo = new published_resource_repository();
>> if(strpos($launchdata['iss'], "vle.") !== false &&
>> message_helper::is_instructor_launch($launchdata)) {
>> // Get all available LTI resources
>> $user = \core_user::get_user_by_username('admin');
>> $resources = $resourcerepo->find_all_for_user($user->id);
>> } else {
>> global $USER;
>> $resources = $resourcerepo->find_all_for_user($USER->id);
>> }
>>
>> // renderer
>> $urlpath = $launchdata["https://purl.imsglobal.org/spec/lti/claim/target_link_uri"];
>> $context = [ 'courses' => [], 'deploymentid' => $launchdata["https://purl.imsglobal.org/spec/lti/claim/deployment_id"] ];
>> foreach ($resources as $resource) {
>> $context['courses'][$resource->get_courseid()]['fullname'] = $resource->get_coursefullname();
>> if (!$resource->is_course()) {
>> $context['courses'][$resource->get_courseid()]['modules'][] = [
>> 'name' => $resource->get_name(),
>> 'id' => $resource->get_id(),
>> 'url' => $urlpath . "?id=" . $resource->get_uuid()
>> ];
>> } else {
>> $context['courses'][$resource->get_courseid()]['id'] = $resource->get_id();
>> }
>> }
>> $context['courses'] = array_values($context['courses']); // Reset keys for use in the template.
>> echo $OUTPUT->header();
>> echo $OUTPUT->render_from_template('enrol_lti/local/ltiadvantage/content_show', $context);
>> echo $OUTPUT->footer();
>> } else {
// To authenticate, we need the resource's account provisioning mode for the given LTI role.
if (empty($launchdata['https://purl.imsglobal.org/spec/lti/claim/custom']['id'])) {
throw new \moodle_exception('ltiadvlauncherror:missingid', 'enrol_lti');
}
…
> }
In addition, this file requires the mustache template file [MOODLE_40]/enrol/lti/templates/local/ltiadvantage/content_show.mustache
3 Integration [patched] Moodle 4.0 with SLS
Current Situation
Moodle 4.0 supports LTI 1.3 and LTI Advantage
Moodle 4.0 patched to allow integration with SLS
SLS partially supports LTI 1.3 and does not support LTI Advantage. Refer to this official listing of products that have passed 1EdTech interoperability certification.
https://site.imsglobal.org/certifications?refinementList%5Bstandards_lvlx%5D%5B0%5D=Learning%20Tools%20Interoperability%C2%AE%20%28LTI%29 Note that SLS is NOT certified LTI 1.3.
References:
Publish as LTI tool in Moodle, available at https://docs.moodle.org/400/en/Publish_as_LTI_tool#Custom_launch_parameters
List of LTI Advantage certified products, available at https://www.imsglobal.org/ltiadvantage
Integration with SLS, available at https://docs.learning.moe.edu.sg/sls/partners/integration/integrationsls.html
Step 1. Enabling the 'Publish as LTI tool' feature in Moodle
As an admin user, enable the 'Publish as LTI tool' for use across the site:
Go to Site administration > Plugins > Authentication > Manage authentication, and enable LTI
Go to Site administration > Plugins > Enrolments > Manage enrol plugins, and enable 'Publish as LTI tool'
Optionally, go to Settings of 'Publish as LTI tool' and fill the properties
It is recommended that the site administration setting 'Allow frame embedding' is enabled (in "Site Administration > Security > HTTP security") so that tools can be displayed within a frame rather than in a new window, if desired.
Step 2. Initial manual registration in Moodle
As an admin user, create a new platform registration for SLS:
Go to "Site administration > Plugins > Enrolments > Publish as LTI tool > Tool registration"
Click the "Register a platform" button to create a new platform registration
Enter the name of the platform and click "Continue"
You'll see a "Tool details" tab with the LTI endpoints.
Step 3. Manual registration in SLS
As an App Admin user, add an LTI App using the Moodle information:
Go to "Administration > App Admin > Manage Apps"
Click the "Add New App" button to create a new App
Enter the name, description, division, branch and icon, and optionally the rest of parameters
Change the tab "App Configuration" and enter the type LTI
The App configuration depends on the Moodle configuration and your preferences. An example is the following one:
❌Public Key: "ignored" or updated 20230904 “MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0vdTbC0eTjLZpucQ0rzIJbZNbOn9wfkLT7BycO0LrzdsG15dKwILWRnNmMYHhlsM6vwtdofERLhVLpzVwnA0p2v+p3mVEioR+wnKe4OuMwq0JOtw716xigpuqF4U7FpMOHXPNSiKOtdz2Y/kmy4+n1wjxreFotaFhxhCuGqLRLkyUW4H1qNeoyrqg6qUXCmscVxFCkze4XmyOy+0c3JAB53Y1na3DtrJIfaesxq9oeHf6iAmghq6Sd9uCQDy3BSTleGjipfplc1JPWHwZLxfbV3pmtvxBKMsyQIlwAwIradBAlPEDuUUo0dNGez4PouC8XyK58EAiO1iEkvPOtvaQIDAQAB”
✅OIDC Login URL: https://iwant2study.org/moodle402/enrol/lti/login.php
❌Searchable in App Library: https://iwant2study.org/moodle402/enrol/lti/launch.php
❌Installable to Class / Group: https://iwant2study.org/moodle402/enrol/lti/launch.php
✅Embeddable to Lesson: https://iwant2study.org/moodle402/enrol/lti/launch.php
✅Whitelisted Domains (Maximum 10 Domains): vle.dev.sls.ufinity.com, dev.sls.ufinity.com, vle.learning.moe.edu.sg, iwant2study.org
Click "Save" and then click the button "Edit App Availability" in order to make available the App.
Step 4. Final manual registration in Moodle
As the admin user, complete the registration for SLS:
Go to "Site administration > Plugins > Enrolments > Publish as LTI tool > Tool registration". If you have the registration open still, simply click the "Platform details" tab. If not, from the registration table, click the "View platform details" action. You'll see a table listing the various platform endpoints and identifiers.
Click "Edit platform details"
Copy the following values from actual SLS:
Platform ID (issuer): https://vle.learning.moe.edu.sg
Client ID: useYourOwnLMS
Authentication request URL: or OIDC: https://vle.learning.moe.edu.sg/lti/authorize/
Public keyset URL or JWKS: https://vle.learning.moe.edu.sg/lti/key-set/
Access token URL: https://vle.learning.moe.edu.sg/lti/authorize/
Save and, next, select the "Deployments" tab
Click "Add a deployment", enter a deployment name, copy the value Deployment ID provided by the SLS vendor and save.
Note that Platform ID and Client ID are obtained from the SLS registration. However, the Deployment ID is not visible at the SLS platform. You must request the Deployment ID to the SLS vendor
Update 20230904: Client ID : 1ecc01ea-c4ad-4221-b1a6-7237c8fb5a14
Update 20230904: Deployment ID : 1823fd1e-b1b4-4f3d-82df-4ddc3cda50b7
The registration process is now complete. Click the "Back" button or navigate to "Site administration > Plugins > Enrolments > Publish as LTI tool > Tool registration", where you will now see the registration listed as "Active".
Step 5. Sharing access to an EjsS Simulation from Moodle
As a course admin user, share access to your EjsS Simulations:
From the course navigation, select "Published as LTI tools"
Under the "LTI Advantage" tab (this is selected by default) click the "Add" button
In "Tool to be published" select the EjsS Simulation to be shared
In "Teacher first launch provisioning modes" and "Student first launch provisioning mode" select "New accounts only (automatic)”.
Disable grade and user sync for the resource
Click the "Add method" button
The published activity or course is now ready for use in SLS. Note that Moodle provides an identifier that must be used in the next step.
Step 6. Sharing access to an EjsS Simulation from Moodle
As a teacher user, add an EjsS Simulation using the LTI App:
Add a component as usual into your lesson and add Embed App
On the tab "App", select the App created in Step 2 by its name. Now, there are two options to input the Resource URL.
Option 1. Manually enter the Resource URL. The Resource URL is the target link uri. Based on the result of the previous step, enter: "https://iwant2study.org/moodle402/enrol/lti/launch.php?id= c57f3601-5d95-4fa0-8c75-6d09d59e057c"
Note that the target link uri has the form "Launch URL" + "Custom properties"
Option 2. Click the “Browse” button. A list of simulations and their Resource URLs are shown. Copy the Resource URL and paste into the corresponding input.
Click "Add" and save
Finally, the EjsS Simulation will be visible.
References:
Publish as LTI tool in Moodle, available at https://docs.moodle.org/400/en/Publish_as_LTI_tool#Custom_launch_parameters
Integration Guide with SLS, available at https://docs.learning.moe.edu.sg/sls/partners/integration/adpspecifications.pdf
4 Monitoring of EjsS Simulations in SLS
Current Situation
Moodle 4.0 and SLS integrated via LTI 1.3 (partial in SLS) Type 2 Apps
General design
Integration Moodle – SLS
Student assignment and monitoring
Data exchange
Step 1. Define an assessment file
As a course creator in Moodle, define the file assessment.json with the activity questions. This file is used by Moodle to check the student interactions and automatically assess the student experience.
The general format of this file is:
[
{ "name": "short name of the question",
"description": "description of the question",
"marks": [ { "value": "mark value",
"state": [ … ], // properties and their values
"history": { … } // element with info
}, … ],
"events": { "start": { … }, // starting event of the question
"end" : { … }, // ending event of the question
}
}, …
]
more samples can be found here
https://github.com/lookang/codesforejss/blob/master/assessment.json with capability for checking data value
https://github.com/lookang/codesforejss/blob/master/assessment.pencil.json with capability of checking for equal in value
A step-by-step tutorial https://weelookang.blogspot.com/2022/11/how-to-prepare-your-easy-javascript.html is included here to help with the creation of the assessment.json file and the EJSS codes to be added.
An example is the following one:
// Example assessment json file
{
tasks": [
{ "name": "Q1",
"description": "Question 1",
"marks" : [
{ "value": "1",
"state": [
{"element": "input1", "property": "Value", "data": "9" }
],
"history": {"element": "log1", "property": "Value" }
},
{ "value": "2",
"state": [
{"element": "input2", "property": "Value", "data": "3" }
],
"history": {"element": "log1", "property": "Value" }
},
{ "value": "3",
"state": [
{"element": "input3", "property": "Value", "data": "3" },
{"element": "input4", "property": "Value", "data": "9" },
{"element": "input5", "property": "Value", "data": "3" }
],
"history": {"element": "log1", "property": "Value" }
}
],
"events": {
"start": {"element": "label", "property": "Value", "data": "Q1" },
"end" : {"element": "checkbutton", "action": "OnClick"}
}
},
{ "name": "Q2",
"description": "Question 2",
"marks" : [
{ "value": "1",
"state": [
{"element": "input1", "property": "Value", "data": "2" }
],
"history": {"element": "log1", "property": "Value" }
},
{ "value": "2",
"state": [
{"element": "input2", "property": "Value", "data": "1" }
],
"history": {"element": "log1", "property": "Value" }
},
{ "value": "3",
"state": [
{"element": "input3", "property": "Value", "data": "1" },
{"element": "input4", "property": "Value", "data": "3" },
{"element": "input5", "property": "Value", "data": "4" }
],
"history": {"element": "log1", "property": "Value" }
}
],
"events": {
"start": {"element": "label", "property": "Value", "data": "Q1" },
"end" : {"element": "checkbutton", "action": "OnClick"}
}
}
]
}
And upload this file with the filename “assessment.json” in the EjsS simulation in Moodle.
Step 2. Access monitoring from SLS
As a SLS teacher access the activity with the EjsS Simulation and then click the button "See Analytics".
The assignment monitoring will report students status considering the file assessment.json.
Visit EJSS LTI Moodle https://iwant2study.org/moodle402/login/index.php
Create an teacher account here https://iwant2study.org/moodle402/login/signup.php
self enroll here https://iwant2study.org/moodle402/course/view.php?id=6
For example visit Chemistry https://iwant2study.org/moodle402/mod/laejss/view.php?id=34
as role of Teacher , see Data Analytics https://iwant2study.org/moodle402/mod/laejss/report_lti.php?title=Chemistry01+balance+equations&cm=34&cminstance=11&course=6&resourcelink=
as role of Student, interact with simulations https://iwant2study.org/moodle402/mod/laejss/view.php?id=34 for interaction data to be capture and display on Teacher dashboard
No comments:
Post a Comment