Skip to content

Commit

Permalink
Bug #8, urgent fix - 'Issue with BOS return link?' [iet:10334595]
Browse files Browse the repository at this point in the history
* Fix Javascript - `create_survey_url()`
* https://iet.eu.teamwork.com/desk/#/tickets/248776
  • Loading branch information
nfreear committed Jun 5, 2018
1 parent 523c33e commit effbc90
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions js/src/ouop-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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().
});
}
Expand Down
4 changes: 3 additions & 1 deletion js/src/survey-embed-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
$plugin->component = 'auth_ouopenid';

$plugin->dependencies = [
'auth_openid' => '2017030600' // TODO: check!
// Was: 'auth_openid' => '2017030600' // TODO: check!
];

0 comments on commit effbc90

Please sign in to comment.