Morning all,

 

We are using WebPA LTI/Learn 9.1 and also using WebPA as a standalone tool. When email notifications are sent to students the email includes a link to the WebPA installation, APP__WWW. This was confusing for students who access WebPA assignments through Learn as their assignments won’t be viewable in APP__WWW. So, I’ve customized the WebPA link in the notifications email to link to the Blackboard course if the student accessed the assignment through Blackboard/LTI and to APP__WWW if the assignment was in standalone. I’m generating the Blackboard/LTI link as follows below, which is working as expected. Does anyone with LTI experience know a better way of doing this or of any potential gotchas?

 

Best regards,

Ian

 

$consumer = new LTI_Tool_Consumer($_user_source_id, APP__DB_TABLE_PREFIX);

$resource_link = new LTI_Resource_Link($consumer, $_SESSION['_user_context_id']);

$assessment_url = APP__WWW;

          

if(isset($resource_link->settings['ext_ims_lti_tool_setting_url'])){

// match the vle url

     // from [ext_ims_lti_tool_setting_url]

     preg_match('/^(.+)?\/extension$/', $resource_link->settings['ext_ims_lti_tool_setting_url'], $lti_url_match );

               

     // match the course id and content id

// from [ext_ims_lti_tool_setting_id]

     preg_match('/:(_\d+_1):(_\d+_1):webpa/', $resource_link->settings['ext_ims_lti_tool_setting_id'], $lti_course_content_id_match);

                    

     // put the matchs together so the url looks like this

     // https://bb.imperial.ac.uk/webapps/osc-BasicLTI-BBLEARN/

     // iframe.jsp?course_id=_1234_1&content_id=_56789_1&id=webpa&

               

     $assessment_url = sprintf("%s/iframe.jsp?course_id=%s&content_id=%s&id=webpa", $lti_url_match[1], $lti_course_content_id_match[1], $lti_course_content_id_match[2]);

}

 

Ian McGilloway

E-Learning Technical Analyst
ICT
Imperial College London
Level 4, Sherfield Building
Exhibition Road
London SW7 2AZ

Tel:  +44 (0)20 7594 1958
Email: [log in to unmask]">[log in to unmask]

http://www.imperial.ac.uk/admin-services/ict/

 

Note: I work from home on Fridays.