Skip to content

Commit

Permalink
Bug #3, add OUOP.survey_return_redirect() Javascript [iet:8974552]
Browse files Browse the repository at this point in the history
  • Loading branch information
nfreear committed May 11, 2017
1 parent 65a6a89 commit e34e6ac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions user/ouop-local-fixes.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,18 @@
}
};

OUOP.survey_return_redirect = function ($, resp) {
var $flag = $('.ouop-survey-return-redirect');
var params = W.location.search;
var is_survey_return = /utm_(source|medium)=.*(survey|questionnaire)/.test(params);

if (is_survey_return && $flag.length) {
C.warn('ouop: survey-return-redirect');

W.location = resp.redirect_url;
}
};

OUOP.fix_mod_assign_redirect = function ($) {
var $page = $('#page-mod-assign-redirect.ouop-fix-assign-redirect');
var errormsg = $('.debuggingmessage').text();
Expand Down
1 change: 1 addition & 0 deletions user/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@

OUOP.fix_pilot_survey_links($, data);
OUOP.inject_post_activity_survey_link($, data);
OUOP.survey_return_redirect($, data);

OUOP.fix_mod_assign_redirect($);

Expand Down

0 comments on commit e34e6ac

Please sign in to comment.