diff --git a/db/User.php b/db/User.php index 760ee0b..00f29f6 100644 --- a/db/User.php +++ b/db/User.php @@ -7,7 +7,7 @@ * * @package auth_ouopenid * @author Nick Freear, 13-March-2017. - * @copyright (c) 2017 The Open University. + * @copyright © 2017 The Open University. * * @link https://docs.moodle.org/dev/Data_manipulation_API * @link https://github.com/goodby/csv#import-to-database-via-pdo @@ -29,7 +29,7 @@ class User extends base const CSV_BATCH = 8; // Bug #5. const PREFIX = 'ouop_'; - const UNDEF_INSTRUMENT = 'kd'; // 'tpt'; + const UNDEF_INSTRUMENT = 'fr'; // Was: 'kd', 'tpt'; const INSTRUMENT_REGEX = '/^(kd|tpt|fa|vr|fr)/'; const OUCU_REGEX = '@^[a-z]{2,4}\d{1,7}$@'; diff --git a/js/src/local-fixes.js b/js/src/local-fixes.js index 5e39cf9..8fc11fc 100644 --- a/js/src/local-fixes.js +++ b/js/src/local-fixes.js @@ -189,12 +189,14 @@ function course_add_tesla_result_links($, resp) { var $cm_edit_menus = $('.path-course-view .section-cm-edit-actions[ data-owner ]'); var lti_res = resp.config.lti_results; - $cm_edit_menus.each(function (idx, el) { + $cm_edit_menus.each(function () { // Was: (idx, el) var cmid = $(this).data('owner').replace(/#module-/, ''); var $link = $(this).find('a.editing_update.cm-edit-action'); - var url = '/local/tesla/views/tesla_results.php?cmid=' + cmid + (lti_res ? '' : '&noredirect=1'); + var url = '/local/tesla/views/tesla_results.php?cmid=%s'.replace(/%s/, cmid); - $link.after('TeSLA results'.replace(/%s/, url)); + $link + .after('TeSLA results'.replace(/%s/, url).replace(/%f/, '&noredirect=1')) + .after('TeSLA results (LTI)'.replace(/%s/, url)); console.warn('course-add-tesla-result-links, cmid:', cmid, url, lti_res); });