diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a5de2a..f36bd3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,9 @@ * Extend Javascript-based pa11y-ci configuration — `.pa11yci.conf.js`; * Add Javascript — `add_course_code_to_urls()`; * Fix Javascript — `survey_embed_link()`; - * Fix Javascript — `generic_embeds()` (_BRASIL_ course); + * Fix Javascript — `generic_embeds()` (_BRASIL_ course) + * Add & fix Javascript — `create_survey_url()` (_BRASIL_ course) + * Alter `UNDEF_INSTRUMENT` from `fr` to `tpt` (_BRASIL_ course etc.) ## Version 1.5.0 — Pilot 3-B diff --git a/js/src/ouop-utils.js b/js/src/ouop-utils.js index aea3178..93c3e33 100644 --- a/js/src/ouop-utils.js +++ b/js/src/ouop-utils.js @@ -127,6 +127,7 @@ function replace_object (str, mapObj, reFlags) { var re = new RegExp(Object.keys(mapObj).join('|'), reFlags || 'g'); // Was: "gi". return str.replace(re, function (matched) { + // console.warn('replace_obj:', re, matched, mapObj); return mapObj[ matched ]; // Was: matched.toLowerCase(). }); } diff --git a/js/src/survey-embed-link.js b/js/src/survey-embed-link.js index 9e2ca60..0896a1d 100644 --- a/js/src/survey-embed-link.js +++ b/js/src/survey-embed-link.js @@ -136,5 +136,7 @@ function survey_return_redirect ($, resp) { } function create_survey_url(url, resp) { - return resp.util.replace(url, { '{oucu}': resp.profile.ouop_oucu, '{course}': resp.course_code }, 'gi'); + var result_url = resp.util.replace(url, { '{OUCU}': resp.profile.ouop_oucu, '{COURSE}': resp.course_code }); // Was: 'gi' (doesn't work!!) + C.warn('create_survey_url:', url, result_url, resp.course_code, resp); + return result_url; } diff --git a/version.php b/version.php index 69124d1..037e709 100644 --- a/version.php +++ b/version.php @@ -15,5 +15,5 @@ $plugin->component = 'auth_ouopenid'; $plugin->dependencies = [ - 'auth_openid' => '2017030600' // TODO: check! + // Was: 'auth_openid' => '2017030600' // TODO: check! ];