Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@edx/edx-proctoring

Package Overview
Dependencies
Maintainers
11
Versions
232
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@edx/edx-proctoring - npm Package Compare versions

Comparing version 3.22.0 to 3.22.1

edx_proctoring/static/proctoring/js/views/proctored_exam_edit_allowance_view.js

4

edx_proctoring/static/proctoring/js/views/proctored_exam_add_bulk_allowance_view.js

@@ -239,5 +239,5 @@ edx = edx || {};

if (selectedAllowanceType === 'additional_time_granted') {
$('#allowance_value_label').text(gettext('Input Additional Minutes as a Positive Number'));
$('#allowance_value_label').text(gettext('Add Time(Minutes)'));
} else if (selectedAllowanceType === 'time_multiplier') {
$('#allowance_value_label').text(gettext('Input Multiplier as a Number Greater Than 1'));
$('#allowance_value_label').text(gettext('Add Multiplier as a Number Greater Than 1'));
} else {

@@ -244,0 +244,0 @@ $('#allowance_value_label').text(gettext('Add Policy Exception'));

@@ -47,3 +47,4 @@ edx = edx || {};

'click .remove_allowance': 'removeAllowance',
'click .accordion-trigger': 'toggleAllowanceAccordion'
'click .accordion-trigger': 'toggleAllowanceAccordion',
'click .edit_allowance': 'editAllowance'
},

@@ -189,2 +190,25 @@ getCSRFToken: function() {

},
editAllowance: function(event) {
var $element = $(event.currentTarget);
var userName = $element.data('user-name');
var examID = $element.data('exam-id');
var examName = $element.data('exam-name');
var key = $element.data('key-name');
var keyName = $element.data('key-value');
var self = this;
self.proctoredExamCollection.fetch({
success: function() {
// eslint-disable-next-line no-new
new edx.instructor_dashboard.proctoring.EditAllowanceView({
course_id: self.course_id,
selected_exam_ID: examID,
selected_exam_name: examName,
proctored_exam_allowance_view: self,
selected_user: userName,
allowance_type: key,
allowance_type_name: keyName
});
}
});
},
toggleAllowanceAccordion: function(event) {

@@ -198,12 +222,12 @@ // based on code from openedx/features/course_experience/static/course_experience/js/CourseOutline.js

if (!isExpanded) {
$toggleChevron = $(accordionRow).find('.fa-chevron-right');
$toggleChevron = $(accordionRow).find('.fa-chevron-down');
$contentPanel = $('#' + accordionRow.innerText.trim());
$contentPanel.show();
$toggleChevron.addClass('fa-rotate-90');
$toggleChevron.addClass('fa-rotate-180');
accordionRow.setAttribute('aria-expanded', 'true');
} else {
$toggleChevron = $(accordionRow).find('.fa-chevron-right');
$toggleChevron = $(accordionRow).find('.fa-chevron-down');
$contentPanel = $('#' + accordionRow.innerText.trim());
$contentPanel.hide();
$toggleChevron.removeClass('fa-rotate-90');
$toggleChevron.removeClass('fa-rotate-180');
accordionRow.setAttribute('aria-expanded', 'false');

@@ -210,0 +234,0 @@ }

@@ -91,3 +91,3 @@ describe('ProctoredExamAAllowanceView', function() {

// eslint-disable-next-line max-len
html = '<div class=\'modal-header\'><%- gettext("Add a New Allowance") %></div>\n<form>\n <h3 class=\'error-response\'><h3>\n <table class=\'compact\'>\n <tr>\n <td>\n <label><%- gettext("Add Usernames or Emails seperated by commas") %></label>\n </td>\n </tr>\n <tr>\n <td>\n <input type="text" id="user_info" />\n </td>\n </tr>\n <tr>\n <td>\n <label><%- gettext("Select Exam Type") %></label>\n </td>\n </tr>\n <tr>\n <td>\n <select id="exam_type">\n <option value="proctored_exam">\n <%- gettext("Proctored Exam") %>\n </option>\n <option value="timed_exam">\n <%- gettext("Timed Exam") %>\n </option>\n </select>\n </td>\n </tr>\n <tr>\n <td>\n <label><%- gettext("Select Exams") %></label>\n </td>\n </tr>\n <tr>\n <td>\n <select multiple id=\'proctored_exam\' class="exam_dropdown">\n <option hidden selected value=default> <%- gettext("Choose Exams Below") %> </option>\n <% _.each(proctored_exams, function(proctored_exam){ %>\n <option value="<%= proctored_exam.id %>">\n <%- interpolate(gettext(\' %(exam_display_name)s \'), { exam_display_name: proctored_exam.exam_name }, true) %>\n </option>\n <% }); %>\n </select>\n <select multiple id=\'timed_exam\' class="exam_dropdown" style="display:none;">\n <option hidden selected value=default> <%- gettext("Choose Exams Below") %> </option>\n <% _.each(timed_exams, function(timed_exam){ %>\n <option value="<%= timed_exam.id %>">\n <%- interpolate(gettext(\' %(exam_display_name)s \'), { exam_display_name: timed_exam.exam_name }, true) %>\n </option>\n <% }); %>\n </select>\n </td>\n </tr>\n <tr>\n <td colspan="3">\n <div id="selected_exams" ></div>\n </td>\n </tr>\n <tr>\n <td>\n <label><%- gettext("Allowance Type") %></label>\n </td>\n </tr>\n <tr>\n <td>\n <select id="allowance_type">\n <% _.each(allowance_types, function(allowance_type){ %>\n <option value="<%= allowance_type[0] %>">\n <%= allowance_type[1] %>\n </option>\n <% }); %>\n </select>\n </td>\n </tr>\n <tr>\n <td>\n <label id=\'allowance_value_label\'><%- gettext("Input Additional Minutes as a Positive Number") %></label>\n </td>\n </tr>\n <tr>\n <td>\n <input type="text" id="allowance_value" />\n </td>\n </tr>\n <tr>\n <td>\n <input id=\'addNewAllowance\' type=\'submit\' value=\'Create Allowance\' />\n </td>\n </tr>\n </table>\n</form>';
html = '<div class=\'modal-header\'><%- gettext("Add a New Allowance") %></div>\n<form>\n <h3 class=\'error-response\'><h3>\n <table class=\'compact\'>\n <tr>\n <td>\n <label><%- gettext("Add Usernames or Emails seperated by commas") %></label>\n </td>\n </tr>\n <tr>\n <td>\n <input type="text" id="user_info" />\n </td>\n </tr>\n <tr>\n <td>\n <label><%- gettext("Select Exam Type") %></label>\n </td>\n </tr>\n <tr>\n <td>\n <select id="exam_type">\n <option value="proctored_exam">\n <%- gettext("Proctored Exam") %>\n </option>\n <option value="timed_exam">\n <%- gettext("Timed Exam") %>\n </option>\n </select>\n </td>\n </tr>\n <tr>\n <td>\n <label><%- gettext("Select Exams") %></label>\n </td>\n </tr>\n <tr>\n <td>\n <select multiple id=\'proctored_exam\' class="exam_dropdown">\n <option hidden selected value=default> <%- gettext("Choose Exams Below") %> </option>\n <% _.each(proctored_exams, function(proctored_exam){ %>\n <option value="<%= proctored_exam.id %>">\n <%- interpolate(gettext(\' %(exam_display_name)s \'), { exam_display_name: proctored_exam.exam_name }, true) %>\n </option>\n <% }); %>\n </select>\n <select multiple id=\'timed_exam\' class="exam_dropdown" style="display:none;">\n <option hidden selected value=default> <%- gettext("Choose Exams Below") %> </option>\n <% _.each(timed_exams, function(timed_exam){ %>\n <option value="<%= timed_exam.id %>">\n <%- interpolate(gettext(\' %(exam_display_name)s \'), { exam_display_name: timed_exam.exam_name }, true) %>\n </option>\n <% }); %>\n </select>\n </td>\n </tr>\n <tr>\n <td colspan="3">\n <div id="selected_exams" ></div>\n </td>\n </tr>\n <tr>\n <td>\n <label><%- gettext("Allowance Type") %></label>\n </td>\n </tr>\n <tr>\n <td>\n <select id="allowance_type">\n <% _.each(allowance_types, function(allowance_type){ %>\n <option value="<%= allowance_type[0] %>">\n <%= allowance_type[1] %>\n </option>\n <% }); %>\n </select>\n </td>\n </tr>\n <tr>\n <td>\n <label id=\'allowance_value_label\'><%- gettext("Add Time(Minutes)") %></label>\n </td>\n </tr>\n <tr>\n <td>\n <input type="text" id="allowance_value" />\n </td>\n </tr>\n <tr>\n <td>\n <input id=\'addNewAllowance\' type=\'submit\' value=\'Create Allowance\' />\n </td>\n </tr>\n </table>\n</form>\n';

@@ -94,0 +94,0 @@ allowancesHtml = '<span class="tip">' +

@@ -32,3 +32,3 @@ describe('ProctoredExamAllowanceView', function() {

// eslint-disable-next-line max-len
html = '<span class="tip"> <%- gettext("Allowances") %>\n <span>\n <a id="add-allowance" href="#" class="add blue-button">+ <%- gettext("Add Allowance") %></a>\n </span>\n</span>\n<% var is_allowances = proctored_exam_allowances.length !== 0 %>\n<% if (is_allowances) { %>\n\n<div class="wrapper-content wrapper">\n <section class="content exam-allowances-content">\n <% _.each(proctored_exam_allowances, function(student){ %>\n <div class="accordion-trigger" aria-expanded="false" style="font-size:20px;">\n <span class="fa fa-chevron-right" aria-hidden="true"></span>\n <%=student[0].user.username %>\n </div>\n <table class="allowance-table" id="<%=student[0].user.username %>" style="display:none;">\n <tbody>\n <tr class="allowance-headings">\n <th class="exam-name"><%- gettext("Exam Name") %></th>\n <th class="email"><%- gettext("Email") %></th>\n <th class="allowance-name"><%- gettext("Allowance Type") %> </th>\n <th class="allowance-value"><%- gettext("Allowance Value") %></th>\n <th class="c_action"><%- gettext("Actions") %> </th>\n </tr>\n <% _.each(student, function(proctored_exam_allowance){ %>\n <% var key = proctored_exam_allowance.key; %>\n <% for (i = 0; i < allowance_types.length; i += 1) { %>\n <% if (key === allowance_types[i][0]) { %>\n <% proctored_exam_allowance.key_display_name = allowance_types[i][1]; %>\n <% break; %>\n <% }} %>\n <% if (!proctored_exam_allowance.key_display_name) { %>\n <% proctored_exam_allowance.key_display_name = key;} %>\n <tr class="allowance-items">\n <td>\n <%- proctored_exam_allowance.proctored_exam.exam_name %>\n </td>\n <td>\n <% if (proctored_exam_allowance.user){ %>\n <%= proctored_exam_allowance.user.email %>\n </td>\n <% }else{ %>\n <td>N/A</td>\n <td>N/A</td>\n <% } %>\n <td>\n <%= proctored_exam_allowance.key_display_name %>\n </td>\n <td>\n <%- proctored_exam_allowance.value %></td>\n <td>\n <a data-exam-id="<%= proctored_exam_allowance.proctored_exam.id %>"\n data-key-name="<%= proctored_exam_allowance.key %>"\n data-user-id="<%= proctored_exam_allowance.user.id %>"\n class="remove_allowance" href="#">[x]</a>\n </td>\n </tr>\n <% }); %>\n </tbody>\n </table>\n <% }); %>\n </section>\n</div>\n<% } %>\n';
html = '<span class="tip"> <%- gettext("Allowances") %>\n <span>\n <a id="add-allowance" href="#" class="add blue-button">+ <%- gettext("Add Allowance") %></a>\n </span>\n</span>\n<% var is_allowances = proctored_exam_allowances.length !== 0 %>\n<% if (is_allowances) { %>\n\n<div class="wrapper-content wrapper">\n <section class="content exam-allowances-content">\n <% _.each(proctored_exam_allowances, function(student){ %>\n <div class="accordion-trigger" aria-expanded="false" style="font-size:20px;">\n <span class="fa fa-chevron-down" aria-hidden="true"></span>\n <%=student[0].user.username %>\n </div>\n <table class="allowance-table" id="<%=student[0].user.username %>" style="display:none;">\n <tbody>\n <tr class="allowance-headings">\n <th class="exam-name"><%- gettext("Exam Name") %></th>\n <th class="email"><%- gettext("Email") %></th>\n <th class="allowance-name"><%- gettext("Allowance Type") %> </th>\n <th class="allowance-value"><%- gettext("Allowance Value") %></th>\n <th class="c_action"><%- gettext("Actions") %> </th>\n </tr>\n <% _.each(student, function(proctored_exam_allowance){ %>\n <% var key = proctored_exam_allowance.key; %>\n <% for (i = 0; i < allowance_types.length; i += 1) { %>\n <% if (key === allowance_types[i][0]) { %>\n <% proctored_exam_allowance.key_display_name = allowance_types[i][1]; %>\n <% break; %>\n <% }} %>\n <% if (!proctored_exam_allowance.key_display_name) { %>\n <% proctored_exam_allowance.key_display_name = key;} %>\n <tr class="allowance-items">\n <td>\n <%- proctored_exam_allowance.proctored_exam.exam_name %>\n </td>\n <td>\n <% if (proctored_exam_allowance.user){ %>\n <%= proctored_exam_allowance.user.email %>\n </td>\n <% }else{ %>\n <td>N/A</td>\n <td>N/A</td>\n <% } %>\n <td>\n <%= proctored_exam_allowance.key_display_name %>\n </td>\n <td>\n <%- proctored_exam_allowance.value %></td>\n <td>\n <a data-exam-id="<%= proctored_exam_allowance.proctored_exam.id %>"\n data-key-name="<%= proctored_exam_allowance.key %>"\n data-key-value="<%= proctored_exam_allowance.key_display_name %>"\n data-user-name="<%= proctored_exam_allowance.user.username %>"\n data-exam-name="<%= proctored_exam_allowance.proctored_exam.exam_name %>"\n class="edit_allowance" href="#">Edit</a>\n <a data-exam-id="<%= proctored_exam_allowance.proctored_exam.id %>"\n data-key-name="<%= proctored_exam_allowance.key %>"\n data-user-id="<%= proctored_exam_allowance.user.id %>"\n class="remove_allowance" href="#">Delete</a>\n </td>\n </tr>\n <% }); %>\n </tbody>\n </table>\n <% }); %>\n </section>\n</div>\n<% } %>\n';
this.server = sinon.fakeServer.create();

@@ -35,0 +35,0 @@ this.server.autoRespond = true;

{
"name": "@edx/edx-proctoring",
"//": "Note that the version format is slightly different than that of the Python version when using prereleases.",
"version": "3.22.0",
"version": "3.22.1",
"main": "edx_proctoring/static/index.js",

@@ -6,0 +6,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc