fun-apps
fun-apps copied to clipboard
Loop refresh on fun course for pedagogical team (Firefox only)
Hi,
For some time we experience this bug that the page refresh endlessly in Firefox.
Using debug breakpoints I identify the cause is an ajax call made to masquerade :
function masquerade(selectedOption) {
var data = {
role: selectedOption.val() === 'staff' ? 'staff' : 'student',
user_partition_id: 1765775040,
group_id: selectedOption.data('group-id'),
user_name: selectedOption.val() === 'specific student' ? userNameElement.val() : null
};
$.ajax({
url: '/courses/course-v1:inria+41xxx+demotest/masquerade',
type: 'POST',
dataType: 'json',
contentType: 'application/json',
data: JSON.stringify(data),
success: function(result) {
if (result.success) {
location.reload(); // <------------------ this
} else {
alert(result.error);
}
},
error: function() {
alert('Error: cannot connect to server');
}
});
}
To reproduce :
- Using Firefox
- Login as pedagogical team member
- Go on a course