Skip to content

Loop refresh on fun course for pedagogical team (Firefox only) #727

@brospars

Description

@brospars

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions