edx-proctoring 6.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- edx_proctoring/__init__.py +6 -0
- edx_proctoring/admin.py +502 -0
- edx_proctoring/api.py +3269 -0
- edx_proctoring/apps.py +162 -0
- edx_proctoring/backends/LICENSE.txt +202 -0
- edx_proctoring/backends/README.txt +1 -0
- edx_proctoring/backends/__init__.py +20 -0
- edx_proctoring/backends/backend.py +162 -0
- edx_proctoring/backends/mock.py +105 -0
- edx_proctoring/backends/null.py +61 -0
- edx_proctoring/backends/rest.py +422 -0
- edx_proctoring/backends/software_secure.py +423 -0
- edx_proctoring/backends/tests/__init__.py +3 -0
- edx_proctoring/backends/tests/test_backend.py +363 -0
- edx_proctoring/backends/tests/test_rest.py +624 -0
- edx_proctoring/backends/tests/test_review_payload.py +102 -0
- edx_proctoring/backends/tests/test_software_secure.py +628 -0
- edx_proctoring/callbacks.py +66 -0
- edx_proctoring/constants.py +83 -0
- edx_proctoring/decorators.py +3 -0
- edx_proctoring/exceptions.py +188 -0
- edx_proctoring/handlers.py +229 -0
- edx_proctoring/instructor_dashboard_exam_urls.py +19 -0
- edx_proctoring/locale/ar/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/ar/LC_MESSAGES/django.po +1445 -0
- edx_proctoring/locale/ar/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/ar/LC_MESSAGES/djangojs.po +1443 -0
- edx_proctoring/locale/ca/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/ca/LC_MESSAGES/django.po +1464 -0
- edx_proctoring/locale/ca/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/ca/LC_MESSAGES/djangojs.po +1463 -0
- edx_proctoring/locale/config.yaml +73 -0
- edx_proctoring/locale/cs/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/cs/LC_MESSAGES/django.po +1632 -0
- edx_proctoring/locale/cs/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/cs/LC_MESSAGES/djangojs.po +1634 -0
- edx_proctoring/locale/de_DE/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/de_DE/LC_MESSAGES/django.po +1461 -0
- edx_proctoring/locale/de_DE/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/de_DE/LC_MESSAGES/djangojs.po +1461 -0
- edx_proctoring/locale/el/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/el/LC_MESSAGES/django.po +1389 -0
- edx_proctoring/locale/el/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/el/LC_MESSAGES/djangojs.po +1387 -0
- edx_proctoring/locale/en/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/en/LC_MESSAGES/django.po +1476 -0
- edx_proctoring/locale/en/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/en/LC_MESSAGES/djangojs.po +264 -0
- edx_proctoring/locale/eo/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/eo/LC_MESSAGES/django.po +1880 -0
- edx_proctoring/locale/eo/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/eo/LC_MESSAGES/djangojs.po +304 -0
- edx_proctoring/locale/es_419/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/es_419/LC_MESSAGES/django.po +1783 -0
- edx_proctoring/locale/es_419/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/es_419/LC_MESSAGES/djangojs.po +1785 -0
- edx_proctoring/locale/es_AR/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/es_AR/LC_MESSAGES/django.po +1654 -0
- edx_proctoring/locale/es_AR/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/es_AR/LC_MESSAGES/djangojs.po +1655 -0
- edx_proctoring/locale/es_ES/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/es_ES/LC_MESSAGES/django.po +1655 -0
- edx_proctoring/locale/es_ES/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/es_ES/LC_MESSAGES/djangojs.po +1652 -0
- edx_proctoring/locale/eu_ES/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/eu_ES/LC_MESSAGES/django.po +1378 -0
- edx_proctoring/locale/eu_ES/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/eu_ES/LC_MESSAGES/djangojs.po +1378 -0
- edx_proctoring/locale/fa_IR/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/fa_IR/LC_MESSAGES/django.po +1666 -0
- edx_proctoring/locale/fa_IR/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/fa_IR/LC_MESSAGES/djangojs.po +1665 -0
- edx_proctoring/locale/fr/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/fr/LC_MESSAGES/django.po +1805 -0
- edx_proctoring/locale/fr/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/fr/LC_MESSAGES/djangojs.po +1802 -0
- edx_proctoring/locale/fr_CA/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/fr_CA/LC_MESSAGES/django.po +1790 -0
- edx_proctoring/locale/fr_CA/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/fr_CA/LC_MESSAGES/djangojs.po +1793 -0
- edx_proctoring/locale/he/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/he/LC_MESSAGES/django.po +1444 -0
- edx_proctoring/locale/he/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/he/LC_MESSAGES/djangojs.po +1443 -0
- edx_proctoring/locale/id/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/id/LC_MESSAGES/django.po +1390 -0
- edx_proctoring/locale/id/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/id/LC_MESSAGES/djangojs.po +1389 -0
- edx_proctoring/locale/it_IT/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/it_IT/LC_MESSAGES/django.po +1715 -0
- edx_proctoring/locale/it_IT/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/it_IT/LC_MESSAGES/djangojs.po +1715 -0
- edx_proctoring/locale/ja_JP/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/ja_JP/LC_MESSAGES/djangojs.po +1387 -0
- edx_proctoring/locale/ka/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/ka/LC_MESSAGES/django.po +1380 -0
- edx_proctoring/locale/ka/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/ka/LC_MESSAGES/djangojs.po +1380 -0
- edx_proctoring/locale/lv/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/lv/LC_MESSAGES/django.po +1377 -0
- edx_proctoring/locale/lv/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/lv/LC_MESSAGES/djangojs.po +1377 -0
- edx_proctoring/locale/mn/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/mn/LC_MESSAGES/django.po +1434 -0
- edx_proctoring/locale/mn/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/mn/LC_MESSAGES/djangojs.po +1379 -0
- edx_proctoring/locale/nb/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/nb/LC_MESSAGES/django.po +1393 -0
- edx_proctoring/locale/nb/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/nb/LC_MESSAGES/djangojs.po +1393 -0
- edx_proctoring/locale/pl/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/pl/LC_MESSAGES/django.po +1386 -0
- edx_proctoring/locale/pl/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/pl/LC_MESSAGES/djangojs.po +1386 -0
- edx_proctoring/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/pt_PT/LC_MESSAGES/django.po +1793 -0
- edx_proctoring/locale/pt_PT/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/pt_PT/LC_MESSAGES/djangojs.po +1810 -0
- edx_proctoring/locale/ro/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/ro/LC_MESSAGES/django.po +1382 -0
- edx_proctoring/locale/ro/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/ro/LC_MESSAGES/djangojs.po +1382 -0
- edx_proctoring/locale/ru/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/ru/LC_MESSAGES/django.po +1456 -0
- edx_proctoring/locale/ru/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/ru/LC_MESSAGES/djangojs.po +1459 -0
- edx_proctoring/locale/sw_KE/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/sw_KE/LC_MESSAGES/django.po +1462 -0
- edx_proctoring/locale/sw_KE/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/sw_KE/LC_MESSAGES/djangojs.po +1464 -0
- edx_proctoring/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/tr_TR/LC_MESSAGES/django.po +1527 -0
- edx_proctoring/locale/tr_TR/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/tr_TR/LC_MESSAGES/djangojs.po +1527 -0
- edx_proctoring/locale/uk/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/uk/LC_MESSAGES/django.po +1443 -0
- edx_proctoring/locale/uk/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/uk/LC_MESSAGES/djangojs.po +1443 -0
- edx_proctoring/locale/zh_CN/LC_MESSAGES/django.mo +0 -0
- edx_proctoring/locale/zh_CN/LC_MESSAGES/django.po +1468 -0
- edx_proctoring/locale/zh_CN/LC_MESSAGES/djangojs.mo +0 -0
- edx_proctoring/locale/zh_CN/LC_MESSAGES/djangojs.po +1469 -0
- edx_proctoring/management/__init__.py +3 -0
- edx_proctoring/management/commands/__init__.py +3 -0
- edx_proctoring/management/commands/reset_attempts.py +87 -0
- edx_proctoring/management/commands/set_attempt_status.py +52 -0
- edx_proctoring/management/commands/set_is_attempt_active.py +104 -0
- edx_proctoring/management/commands/tests/__init__.py +3 -0
- edx_proctoring/management/commands/tests/test_reset_attempts.py +153 -0
- edx_proctoring/management/commands/tests/test_set_attempt_status.py +85 -0
- edx_proctoring/management/commands/tests/test_set_is_attempt_active.py +85 -0
- edx_proctoring/management/commands/tests/test_update_attempt_status_from_review.py +113 -0
- edx_proctoring/management/commands/tests/test_update_attempts_for_exam.py +62 -0
- edx_proctoring/management/commands/update_attempt_status_from_review.py +81 -0
- edx_proctoring/management/commands/update_attempts_for_exam.py +78 -0
- edx_proctoring/migrations/0001_initial.py +227 -0
- edx_proctoring/migrations/0002_proctoredexamstudentattempt_is_status_acknowledged.py +18 -0
- edx_proctoring/migrations/0003_auto_20160101_0525.py +24 -0
- edx_proctoring/migrations/0004_auto_20160201_0523.py +19 -0
- edx_proctoring/migrations/0005_proctoredexam_hide_after_due.py +19 -0
- edx_proctoring/migrations/0006_allowed_time_limit_mins.py +24 -0
- edx_proctoring/migrations/0007_proctoredexam_backend.py +20 -0
- edx_proctoring/migrations/0008_auto_20181116_1551.py +32 -0
- edx_proctoring/migrations/0009_proctoredexamreviewpolicy_remove_rules.py +23 -0
- edx_proctoring/migrations/0010_update_backend.py +32 -0
- edx_proctoring/migrations/0011_allow_multiple_attempts.py +17 -0
- edx_proctoring/migrations/0012_proctoredexamstudentattempt_time_remaining_seconds.py +18 -0
- edx_proctoring/migrations/0013_proctoredexamsoftwaresecurereview_is_active_attempt.py +23 -0
- edx_proctoring/migrations/0014_add_is_resumable_to_proctoredexamstudentattempt.py +23 -0
- edx_proctoring/migrations/0015_rm_proctoredexamstudentattempt_ips.py +29 -0
- edx_proctoring/migrations/0016_nullable_proctoredexamstudentattempt_name.py +23 -0
- edx_proctoring/migrations/0017_rm_proctoredexamstudentattempt_name.py +21 -0
- edx_proctoring/migrations/0018_historicalproctoredexamstudentattempt.py +53 -0
- edx_proctoring/migrations/0019_proctoredexamsoftwaresecurereview_encrypted_video_url.py +18 -0
- edx_proctoring/migrations/0020_auto_20211028_1915.py +23 -0
- edx_proctoring/migrations/0021_auto_20211029_1353.py +26 -0
- edx_proctoring/migrations/0022_proctoredexamstudentattempt_add_readytoresume_resumed.py +33 -0
- edx_proctoring/migrations/0023_historicalproctoredexam.py +50 -0
- edx_proctoring/migrations/0024_delete_proctoredexamstudentattempthistory.py +16 -0
- edx_proctoring/migrations/0025_auto_20230727_2112.py +21 -0
- edx_proctoring/migrations/__init__.py +0 -0
- edx_proctoring/models.py +844 -0
- edx_proctoring/rules.py +15 -0
- edx_proctoring/runtime.py +21 -0
- edx_proctoring/scripts/obscure_user.py +108 -0
- edx_proctoring/serializers.py +147 -0
- edx_proctoring/services.py +43 -0
- edx_proctoring/settings/__init__.py +0 -0
- edx_proctoring/settings/common.py +50 -0
- edx_proctoring/settings/production.py +13 -0
- edx_proctoring/settings/test.py +11 -0
- edx_proctoring/signals.py +5 -0
- edx_proctoring/static/index.js +41 -0
- edx_proctoring/static/proctoring/clippy.swf +0 -0
- edx_proctoring/static/proctoring/close-modal-hover.png +0 -0
- edx_proctoring/static/proctoring/close-modal.png +0 -0
- edx_proctoring/static/proctoring/js/collections/proctored_exam_allowance_collection.js +15 -0
- edx_proctoring/static/proctoring/js/collections/proctored_exam_attempt_grouped_collection.js +15 -0
- edx_proctoring/static/proctoring/js/collections/proctored_exam_collection.js +16 -0
- edx_proctoring/static/proctoring/js/collections/proctored_exam_onboarding_collection.js +13 -0
- edx_proctoring/static/proctoring/js/dropdown.js +97 -0
- edx_proctoring/static/proctoring/js/exam_action_handler.js +252 -0
- edx_proctoring/static/proctoring/js/models/learner_onboarding_model.js +9 -0
- edx_proctoring/static/proctoring/js/models/proctored_exam_allowance_model.js +15 -0
- edx_proctoring/static/proctoring/js/models/proctored_exam_attempt_model.js +15 -0
- edx_proctoring/static/proctoring/js/models/proctored_exam_bulk_allowance_model.js +15 -0
- edx_proctoring/static/proctoring/js/models/proctored_exam_model.js +56 -0
- edx_proctoring/static/proctoring/js/proctored_app.js +16 -0
- edx_proctoring/static/proctoring/js/vendor/backbone.js +1608 -0
- edx_proctoring/static/proctoring/js/vendor/date.js +145 -0
- edx_proctoring/static/proctoring/js/vendor/i18n.js +10 -0
- edx_proctoring/static/proctoring/js/vendor/jquery.js +4 -0
- edx_proctoring/static/proctoring/js/vendor/underscore.js +1416 -0
- edx_proctoring/static/proctoring/js/views/Backbone.ModalDialog.js +338 -0
- edx_proctoring/static/proctoring/js/views/proctored_exam_add_bulk_allowance_view.js +300 -0
- edx_proctoring/static/proctoring/js/views/proctored_exam_allowance_view.js +204 -0
- edx_proctoring/static/proctoring/js/views/proctored_exam_attempt_view.js +307 -0
- edx_proctoring/static/proctoring/js/views/proctored_exam_edit_allowance_view.js +165 -0
- edx_proctoring/static/proctoring/js/views/proctored_exam_info.js +232 -0
- edx_proctoring/static/proctoring/js/views/proctored_exam_instructor_launch.js +41 -0
- edx_proctoring/static/proctoring/js/views/proctored_exam_onboarding_view.js +288 -0
- edx_proctoring/static/proctoring/js/views/proctored_exam_view.js +267 -0
- edx_proctoring/static/proctoring/templates/add-new-bulk-allowance.underscore +105 -0
- edx_proctoring/static/proctoring/templates/course_grouped_allowances.underscore +70 -0
- edx_proctoring/static/proctoring/templates/dashboard.underscore +3 -0
- edx_proctoring/static/proctoring/templates/edit-allowance.underscore +52 -0
- edx_proctoring/static/proctoring/templates/proctored-exam-info.underscore +46 -0
- edx_proctoring/static/proctoring/templates/student-onboarding-status.underscore +153 -0
- edx_proctoring/static/proctoring/templates/student-proctored-exam-attempts-grouped.underscore +287 -0
- edx_proctoring/statuses.py +330 -0
- edx_proctoring/templates/common/waiting_banner.html +12 -0
- edx_proctoring/templates/emails/proctoring_attempt_satisfactory_email.html +28 -0
- edx_proctoring/templates/emails/proctoring_attempt_submitted_email.html +20 -0
- edx_proctoring/templates/emails/proctoring_attempt_unsatisfactory_email.html +33 -0
- edx_proctoring/templates/onboarding_exam/entrance.html +65 -0
- edx_proctoring/templates/onboarding_exam/error.html +18 -0
- edx_proctoring/templates/onboarding_exam/ready_to_submit.html +10 -0
- edx_proctoring/templates/onboarding_exam/rejected.html +33 -0
- edx_proctoring/templates/onboarding_exam/submitted.html +60 -0
- edx_proctoring/templates/onboarding_exam/verified.html +23 -0
- edx_proctoring/templates/practice_exam/entrance.html +90 -0
- edx_proctoring/templates/practice_exam/error.html +42 -0
- edx_proctoring/templates/practice_exam/submitted.html +31 -0
- edx_proctoring/templates/proctored_exam/confirm-decline.html +55 -0
- edx_proctoring/templates/proctored_exam/entrance.html +29 -0
- edx_proctoring/templates/proctored_exam/error.html +26 -0
- edx_proctoring/templates/proctored_exam/error_modal.html +26 -0
- edx_proctoring/templates/proctored_exam/error_wrong_browser.html +32 -0
- edx_proctoring/templates/proctored_exam/expired.html +13 -0
- edx_proctoring/templates/proctored_exam/failed-prerequisites.html +46 -0
- edx_proctoring/templates/proctored_exam/footer.html +80 -0
- edx_proctoring/templates/proctored_exam/inactive_account.html +38 -0
- edx_proctoring/templates/proctored_exam/instructions.html +227 -0
- edx_proctoring/templates/proctored_exam/onboarding_error.html +45 -0
- edx_proctoring/templates/proctored_exam/pending-prerequisites.html +40 -0
- edx_proctoring/templates/proctored_exam/proctoring_launch_callback.html +183 -0
- edx_proctoring/templates/proctored_exam/proctoring_opt_out_button.html +8 -0
- edx_proctoring/templates/proctored_exam/ready_to_resume.html +33 -0
- edx_proctoring/templates/proctored_exam/ready_to_start.html +70 -0
- edx_proctoring/templates/proctored_exam/ready_to_submit.html +39 -0
- edx_proctoring/templates/proctored_exam/rejected.html +30 -0
- edx_proctoring/templates/proctored_exam/submitted.html +24 -0
- edx_proctoring/templates/proctored_exam/verified.html +19 -0
- edx_proctoring/templates/proctored_exam/visit_exam_content.html +38 -0
- edx_proctoring/templates/timed_exam/entrance.html +79 -0
- edx_proctoring/templates/timed_exam/expired.html +13 -0
- edx_proctoring/templates/timed_exam/footer.html +10 -0
- edx_proctoring/templates/timed_exam/ready_to_submit.html +56 -0
- edx_proctoring/templates/timed_exam/submitted.html +32 -0
- edx_proctoring/tests/__init__.py +56 -0
- edx_proctoring/tests/test_api.py +3878 -0
- edx_proctoring/tests/test_email.py +325 -0
- edx_proctoring/tests/test_handlers.py +56 -0
- edx_proctoring/tests/test_mfe_views.py +579 -0
- edx_proctoring/tests/test_models.py +483 -0
- edx_proctoring/tests/test_reviews.py +844 -0
- edx_proctoring/tests/test_serializer.py +34 -0
- edx_proctoring/tests/test_services.py +429 -0
- edx_proctoring/tests/test_student_view.py +1676 -0
- edx_proctoring/tests/test_utils/factories.py +35 -0
- edx_proctoring/tests/test_utils/test_utils.py +207 -0
- edx_proctoring/tests/test_utils/utils.py +402 -0
- edx_proctoring/tests/test_views.py +6501 -0
- edx_proctoring/tests/test_workerconfig.py +96 -0
- edx_proctoring/urls.py +149 -0
- edx_proctoring/utils.py +488 -0
- edx_proctoring/views.py +2333 -0
- edx_proctoring-6.2.0.dist-info/METADATA +152 -0
- edx_proctoring-6.2.0.dist-info/RECORD +293 -0
- edx_proctoring-6.2.0.dist-info/WHEEL +5 -0
- edx_proctoring-6.2.0.dist-info/entry_points.txt +11 -0
- edx_proctoring-6.2.0.dist-info/licenses/LICENSE.txt +674 -0
- edx_proctoring-6.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
edx = edx || {};
|
|
2
|
+
|
|
3
|
+
(function(Backbone, $, _, gettext) {
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
edx.courseware = edx.courseware || {};
|
|
7
|
+
edx.courseware.proctored_exam = edx.courseware.proctored_exam || {};
|
|
8
|
+
|
|
9
|
+
edx.courseware.proctored_exam.ProctoredExamView = Backbone.View.extend({
|
|
10
|
+
initialize: function(options) {
|
|
11
|
+
var templateHtml, controlsTemplateHtml;
|
|
12
|
+
_.bindAll(this, 'detectScroll');
|
|
13
|
+
this.$el = options.el;
|
|
14
|
+
this.timerBarTopPosition = this.$el.position().top;
|
|
15
|
+
this.initialCourseNavBarMarginTop = this.timerBarTopPosition - 3;
|
|
16
|
+
this.model = options.model;
|
|
17
|
+
this.templateId = options.proctored_template;
|
|
18
|
+
this.template = null;
|
|
19
|
+
this.timerId = null;
|
|
20
|
+
this.timerTick = 0;
|
|
21
|
+
this.secondsLeft = 0;
|
|
22
|
+
/* give an extra 5 seconds where the timer holds at 00:00 before page refreshes */
|
|
23
|
+
this.grace_period_secs = 5;
|
|
24
|
+
this.poll_interval = 60;
|
|
25
|
+
this.first_time_rendering = true;
|
|
26
|
+
|
|
27
|
+
// we need to keep a copy here because the model will
|
|
28
|
+
// get destroyed before onbeforeunload is called
|
|
29
|
+
this.taking_as_proctored = false;
|
|
30
|
+
|
|
31
|
+
templateHtml = $(this.templateId).text();
|
|
32
|
+
if (templateHtml !== null) {
|
|
33
|
+
/* don't assume this backbone view is running on a page with the underscore templates */
|
|
34
|
+
this.template = _.template(templateHtml);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
controlsTemplateHtml = $(this.examControlsTemplateId).text();
|
|
38
|
+
if (controlsTemplateHtml !== null) {
|
|
39
|
+
/* don't assume this backbone view is running on a page with the underscore templates */
|
|
40
|
+
this.controls_template = _.template(controlsTemplateHtml);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* re-render if the model changes */
|
|
44
|
+
this.listenTo(this.model, 'change', this.modelChanged);
|
|
45
|
+
|
|
46
|
+
$(window).unbind('beforeunload', this.unloadMessage);
|
|
47
|
+
|
|
48
|
+
/* make the async call to the backend REST API */
|
|
49
|
+
/* after it loads, the listenTo event will file and */
|
|
50
|
+
/* will call into the rendering */
|
|
51
|
+
this.model.fetch();
|
|
52
|
+
},
|
|
53
|
+
events: {
|
|
54
|
+
'click #toggle_timer': 'toggleTimerVisibility',
|
|
55
|
+
'click .js-toggle-show-more': 'toggleShowText'
|
|
56
|
+
},
|
|
57
|
+
detectScroll: function(event) {
|
|
58
|
+
var examStatusBarHeight;
|
|
59
|
+
var $courseNavBar = $('.wrapper-course-material');
|
|
60
|
+
if (!$courseNavBar.length) {
|
|
61
|
+
$courseNavBar = $('.course-tabs');
|
|
62
|
+
}
|
|
63
|
+
examStatusBarHeight = this.$el.height();
|
|
64
|
+
if ($(event.currentTarget).scrollTop() > this.timerBarTopPosition) {
|
|
65
|
+
$('.proctored_exam_status').addClass('is-fixed');
|
|
66
|
+
$courseNavBar.css('margin-top', examStatusBarHeight + 'px');
|
|
67
|
+
} else {
|
|
68
|
+
$('.proctored_exam_status').removeClass('is-fixed');
|
|
69
|
+
$courseNavBar.css('margin-top', '0');
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
modelChanged: function() {
|
|
73
|
+
var desktopApplicationJsUrl;
|
|
74
|
+
// if we are a proctored exam, then we need to alert user that he/she
|
|
75
|
+
// should not be navigating around the courseware
|
|
76
|
+
var takingAsProctored = this.model.get('taking_as_proctored');
|
|
77
|
+
var timeLeft = this.model.get('time_remaining_seconds') > 0;
|
|
78
|
+
var status = this.model.get('attempt_status');
|
|
79
|
+
var inCourseware = document.location.href.indexOf(
|
|
80
|
+
'/courses/' + this.model.get('course_id') + '/courseware/'
|
|
81
|
+
) > -1;
|
|
82
|
+
this.secondsLeft = this.model.get('time_remaining_seconds');
|
|
83
|
+
|
|
84
|
+
if (takingAsProctored && timeLeft && inCourseware && status !== 'started') {
|
|
85
|
+
$(window).bind('beforeunload', this.unloadMessage);
|
|
86
|
+
} else {
|
|
87
|
+
// remove callback on unload event
|
|
88
|
+
$(window).unbind('beforeunload', this.unloadMessage);
|
|
89
|
+
}
|
|
90
|
+
desktopApplicationJsUrl = this.model.get('desktop_application_js_url');
|
|
91
|
+
if (desktopApplicationJsUrl && !edx.courseware.proctored_exam.configuredWorkerURL) {
|
|
92
|
+
edx.courseware.proctored_exam.configuredWorkerURL = desktopApplicationJsUrl;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
this.render();
|
|
96
|
+
},
|
|
97
|
+
render: function() {
|
|
98
|
+
var html, self;
|
|
99
|
+
if (this.template !== null) {
|
|
100
|
+
if (
|
|
101
|
+
this.model.get('in_timed_exam') &&
|
|
102
|
+
this.model.get('time_remaining_seconds') > 0 &&
|
|
103
|
+
this.model.get('attempt_status') !== 'error'
|
|
104
|
+
) {
|
|
105
|
+
// add callback on scroll event
|
|
106
|
+
$(window).bind('scroll', this.detectScroll);
|
|
107
|
+
|
|
108
|
+
html = this.template(this.model.toJSON());
|
|
109
|
+
this.$el.html(html);
|
|
110
|
+
this.$el.show();
|
|
111
|
+
// only render the accesibility string the first time we render after
|
|
112
|
+
// page load (then we will update on time left warnings)
|
|
113
|
+
if (this.first_time_rendering) {
|
|
114
|
+
this.accessibility_time_string = this.model.get('accessibility_time_string');
|
|
115
|
+
this.$el.find('.timer-announce').html(this.accessibility_time_string);
|
|
116
|
+
if (!(window && window.matchMedia && window.matchMedia('(min-width: 992px)').matches)) {
|
|
117
|
+
this.toggleShowText();
|
|
118
|
+
}
|
|
119
|
+
this.first_time_rendering = false;
|
|
120
|
+
}
|
|
121
|
+
this.updateRemainingTime();
|
|
122
|
+
this.timerId = setInterval(this.updateRemainingTime.bind(this), 1000, this);
|
|
123
|
+
|
|
124
|
+
// Bind a click handler to the exam controls
|
|
125
|
+
self = this;
|
|
126
|
+
$('.exam-button-turn-in-exam').click(function() {
|
|
127
|
+
$(window).unbind('beforeunload', self.unloadMessage);
|
|
128
|
+
|
|
129
|
+
$.ajax({
|
|
130
|
+
url: '/api/edx_proctoring/v1/proctored_exam/attempt/' + self.model.get('attempt_id'),
|
|
131
|
+
type: 'PUT',
|
|
132
|
+
data: {
|
|
133
|
+
action: 'stop'
|
|
134
|
+
},
|
|
135
|
+
success: function() {
|
|
136
|
+
// change the location of the page to the active exam page
|
|
137
|
+
// which will reflect the new state of the attempt
|
|
138
|
+
location.href = self.model.get('exam_url_path');
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
} else {
|
|
143
|
+
// remove callback on scroll event
|
|
144
|
+
$(window).unbind('scroll', this.detectScroll);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return this;
|
|
148
|
+
},
|
|
149
|
+
reloadPage: function() {
|
|
150
|
+
location.reload();
|
|
151
|
+
},
|
|
152
|
+
unloadMessage: function() {
|
|
153
|
+
return gettext('Are you sure you want to leave this page? \n' +
|
|
154
|
+
'To pass your proctored exam you must also pass the online proctoring session review.');
|
|
155
|
+
},
|
|
156
|
+
updateRemainingTime: function() {
|
|
157
|
+
var url, queryString, newState;
|
|
158
|
+
var self = this;
|
|
159
|
+
var pingInterval = self.model.get('ping_interval');
|
|
160
|
+
self.timerTick += 1;
|
|
161
|
+
self.secondsLeft -= 1;
|
|
162
|
+
|
|
163
|
+
// AED 2020-02-21:
|
|
164
|
+
// If the learner is in a state where they've finished the exam
|
|
165
|
+
// and the attempt can be submitted (i.e. they are "ready_to_submit"),
|
|
166
|
+
// don't ping the proctoring app (which action could move
|
|
167
|
+
// the attempt into an error state).
|
|
168
|
+
if (
|
|
169
|
+
self.timerTick % pingInterval === pingInterval / 2 &&
|
|
170
|
+
edx.courseware.proctored_exam.configuredWorkerURL &&
|
|
171
|
+
this.model.get('attempt_status') !== 'ready_to_submit'
|
|
172
|
+
) {
|
|
173
|
+
edx.courseware.proctored_exam.pingApplication(pingInterval)
|
|
174
|
+
.catch(function(error) {
|
|
175
|
+
self.endExamForFailureState(error);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
if (self.timerTick % self.poll_interval === 0) {
|
|
179
|
+
url = self.model.url + '/' + self.model.get('attempt_id');
|
|
180
|
+
queryString = '?sourceid=in_exam&proctored=' + self.model.get('taking_as_proctored');
|
|
181
|
+
$.ajax(url + queryString)
|
|
182
|
+
.success(function(data) {
|
|
183
|
+
if (data.status === 'error') {
|
|
184
|
+
// The proctoring session is in error state
|
|
185
|
+
// refresh the page to bring up the new Proctoring state from the backend.
|
|
186
|
+
clearInterval(self.timerId); // stop the timer once the time finishes.
|
|
187
|
+
$(window).unbind('beforeunload', self.unloadMessage);
|
|
188
|
+
self.reloadPage();
|
|
189
|
+
} else {
|
|
190
|
+
self.secondsLeft = data.time_remaining_seconds;
|
|
191
|
+
self.accessibility_time_string = data.accessibility_time_string;
|
|
192
|
+
}
|
|
193
|
+
})
|
|
194
|
+
.error(function(error) {
|
|
195
|
+
// if unauthorized refresh the page to kick user out of exam
|
|
196
|
+
if (error.status === 403) {
|
|
197
|
+
clearInterval(self.timerId);
|
|
198
|
+
$(window).unbind('beforeunload', self.unloadMessage);
|
|
199
|
+
self.reloadPage();
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
self.$el.find('div.exam-timer').attr('class');
|
|
204
|
+
newState = self.model.getRemainingTimeState(self.secondsLeft);
|
|
205
|
+
|
|
206
|
+
if (newState !== null && !self.$el.find('div.exam-timer').hasClass(newState)) {
|
|
207
|
+
self.$el.find('div.exam-timer').removeClass('warning critical');
|
|
208
|
+
self.$el.find('div.exam-timer').addClass('low-time ' + newState);
|
|
209
|
+
// refresh accessibility string
|
|
210
|
+
self.$el.find('.timer-announce').html(self.accessibility_time_string);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
self.$el.find('h3#time_remaining_id b').html(self.model.getFormattedRemainingTime(self.secondsLeft));
|
|
214
|
+
if (self.secondsLeft <= -self.grace_period_secs) {
|
|
215
|
+
clearInterval(self.timerId); // stop the timer once the time finishes.
|
|
216
|
+
$(window).unbind('beforeunload', this.unloadMessage);
|
|
217
|
+
// refresh the page when the timer expired
|
|
218
|
+
edx.courseware.proctored_exam.endExam(self.model.get('exam_started_poll_url')).then(self.reloadPage);
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
endExamForFailureState: function(error) {
|
|
222
|
+
var self = this;
|
|
223
|
+
return $.ajax({
|
|
224
|
+
data: {
|
|
225
|
+
action: 'error',
|
|
226
|
+
detail: String(error)
|
|
227
|
+
},
|
|
228
|
+
url: this.model.url + '/' + this.model.get('attempt_id'),
|
|
229
|
+
type: 'PUT'
|
|
230
|
+
}).done(function(result) {
|
|
231
|
+
if (result.exam_attempt_id) {
|
|
232
|
+
self.reloadPage();
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
},
|
|
236
|
+
toggleTimerVisibility: function(event) {
|
|
237
|
+
var $button = $(event.currentTarget);
|
|
238
|
+
var icon = $button.find('i');
|
|
239
|
+
var timer = this.$el.find('h3#time_remaining_id b');
|
|
240
|
+
if (timer.hasClass('timer-hidden')) {
|
|
241
|
+
timer.removeClass('timer-hidden');
|
|
242
|
+
$button.attr('aria-pressed', 'false');
|
|
243
|
+
icon.removeClass('fa-eye').addClass('fa-eye-slash');
|
|
244
|
+
} else {
|
|
245
|
+
timer.addClass('timer-hidden');
|
|
246
|
+
$button.attr('aria-pressed', 'true');
|
|
247
|
+
icon.removeClass('fa-eye-slash').addClass('fa-eye');
|
|
248
|
+
}
|
|
249
|
+
event.stopPropagation();
|
|
250
|
+
event.preventDefault();
|
|
251
|
+
},
|
|
252
|
+
toggleShowText: function() {
|
|
253
|
+
var $examText = this.$el.find('.js-exam-text');
|
|
254
|
+
var $toggle = this.$el.find('.js-toggle-show-more');
|
|
255
|
+
var $additionalText = this.$el.find('.js-exam-additional-text');
|
|
256
|
+
var currentlyShowingLongText = $examText.data('showLong');
|
|
257
|
+
$additionalText
|
|
258
|
+
// uses both a v1 and a bootstrap utility class because
|
|
259
|
+
// this banner appears across both types of pages
|
|
260
|
+
.toggleClass('hidden d-none', currentlyShowingLongText)
|
|
261
|
+
.attr('aria-hidden', currentlyShowingLongText);
|
|
262
|
+
$toggle.html(currentlyShowingLongText ? $toggle.data('showMoreText') : $toggle.data('showLessText'));
|
|
263
|
+
$examText.data('showLong', !currentlyShowingLongText);
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
this.edx.courseware.proctored_exam.ProctoredExamView = edx.courseware.proctored_exam.ProctoredExamView;
|
|
267
|
+
}).call(this, Backbone, $, _, gettext);
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
select#proctored_exam {
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
select#timed_exam {
|
|
6
|
+
width: 100%;
|
|
7
|
+
}
|
|
8
|
+
table, td {
|
|
9
|
+
width: 100%;
|
|
10
|
+
}
|
|
11
|
+
</style>
|
|
12
|
+
<div class='modal-header'><%- gettext("Add a New Allowance") %></div>
|
|
13
|
+
<form>
|
|
14
|
+
<h3 class='error-response'><h3>
|
|
15
|
+
<table class='compact'>
|
|
16
|
+
<tr>
|
|
17
|
+
<td>
|
|
18
|
+
<label><%- gettext("Add Usernames or Emails seperated by commas") %></label>
|
|
19
|
+
</td>
|
|
20
|
+
</tr>
|
|
21
|
+
<tr>
|
|
22
|
+
<td>
|
|
23
|
+
<input type="text" id="user_info" />
|
|
24
|
+
</td>
|
|
25
|
+
</tr>
|
|
26
|
+
<tr>
|
|
27
|
+
<td>
|
|
28
|
+
<label><%- gettext("Select Exam Type") %></label>
|
|
29
|
+
</td>
|
|
30
|
+
</tr>
|
|
31
|
+
<tr>
|
|
32
|
+
<td>
|
|
33
|
+
<select id="exam_type">
|
|
34
|
+
<option value="proctored_exam">
|
|
35
|
+
<%- gettext("Proctored Exam") %>
|
|
36
|
+
</option>
|
|
37
|
+
<option value="timed_exam">
|
|
38
|
+
<%- gettext("Timed Exam") %>
|
|
39
|
+
</option>
|
|
40
|
+
</select>
|
|
41
|
+
</td>
|
|
42
|
+
</tr>
|
|
43
|
+
<tr>
|
|
44
|
+
<td>
|
|
45
|
+
<label><%- gettext("Select Exams") %></label>
|
|
46
|
+
</td>
|
|
47
|
+
</tr>
|
|
48
|
+
<tr>
|
|
49
|
+
<td>
|
|
50
|
+
<select multiple id='proctored_exam' class="exam_dropdown">
|
|
51
|
+
<option hidden selected value=default> <%- gettext("Choose Exams Below") %> </option>
|
|
52
|
+
<% _.each(proctored_exams, function(proctored_exam){ %>
|
|
53
|
+
<option value="<%= proctored_exam.id %>">
|
|
54
|
+
<%- interpolate(gettext(' %(exam_display_name)s '), { exam_display_name: proctored_exam.exam_name }, true) %>
|
|
55
|
+
</option>
|
|
56
|
+
<% }); %>
|
|
57
|
+
</select>
|
|
58
|
+
<select multiple id='timed_exam' class="exam_dropdown" style="display:none;">
|
|
59
|
+
<option hidden selected value=default> <%- gettext("Choose Exams Below") %> </option>
|
|
60
|
+
<% _.each(timed_exams, function(timed_exam){ %>
|
|
61
|
+
<option value="<%= timed_exam.id %>">
|
|
62
|
+
<%- interpolate(gettext(' %(exam_display_name)s '), { exam_display_name: timed_exam.exam_name }, true) %>
|
|
63
|
+
</option>
|
|
64
|
+
<% }); %>
|
|
65
|
+
</select>
|
|
66
|
+
</td>
|
|
67
|
+
</tr>
|
|
68
|
+
<tr>
|
|
69
|
+
<td colspan="3">
|
|
70
|
+
<div id="selected_exams" ></div>
|
|
71
|
+
</td>
|
|
72
|
+
</tr>
|
|
73
|
+
<tr>
|
|
74
|
+
<td>
|
|
75
|
+
<label><%- gettext("Allowance Type") %></label>
|
|
76
|
+
</td>
|
|
77
|
+
</tr>
|
|
78
|
+
<tr>
|
|
79
|
+
<td>
|
|
80
|
+
<select id="allowance_type">
|
|
81
|
+
<% _.each(allowance_types, function(allowance_type){ %>
|
|
82
|
+
<option value="<%= allowance_type[0] %>">
|
|
83
|
+
<%= allowance_type[1] %>
|
|
84
|
+
</option>
|
|
85
|
+
<% }); %>
|
|
86
|
+
</select>
|
|
87
|
+
</td>
|
|
88
|
+
</tr>
|
|
89
|
+
<tr>
|
|
90
|
+
<td>
|
|
91
|
+
<label id='allowance_value_label'><%- gettext("Add Time(Minutes)") %></label>
|
|
92
|
+
</td>
|
|
93
|
+
</tr>
|
|
94
|
+
<tr>
|
|
95
|
+
<td>
|
|
96
|
+
<input type="text" id="allowance_value" />
|
|
97
|
+
</td>
|
|
98
|
+
</tr>
|
|
99
|
+
<tr>
|
|
100
|
+
<td>
|
|
101
|
+
<input id='addNewAllowance' type='submit' value='Create Allowance' />
|
|
102
|
+
</td>
|
|
103
|
+
</tr>
|
|
104
|
+
</table>
|
|
105
|
+
</form>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<span class="tip"> <%- gettext("Allowances") %>
|
|
2
|
+
<span>
|
|
3
|
+
<a id="add-allowance" href="#" class="add blue-button">+ <%- gettext("Add Allowance") %></a>
|
|
4
|
+
</span>
|
|
5
|
+
</span>
|
|
6
|
+
<% var is_allowances = proctored_exam_allowances.length !== 0 %>
|
|
7
|
+
<% if (is_allowances) { %>
|
|
8
|
+
|
|
9
|
+
<div class="wrapper-content wrapper">
|
|
10
|
+
<section class="content exam-allowances-content">
|
|
11
|
+
<% _.each(proctored_exam_allowances, function(student){ %>
|
|
12
|
+
<div class="accordion-trigger" aria-expanded="false" style="font-size:20px;" data-key-id="<%=generateDomId(student[0].user.username)%>">
|
|
13
|
+
<span class="fa fa-chevron-down" aria-hidden="true"></span>
|
|
14
|
+
<%=student[0].user.username %>
|
|
15
|
+
</div>
|
|
16
|
+
<table class="allowance-table" id="<%=generateDomId(student[0].user.username) %>" style="display:none;">
|
|
17
|
+
<tbody>
|
|
18
|
+
<tr class="allowance-headings">
|
|
19
|
+
<th class="exam-name"><%- gettext("Exam Name") %></th>
|
|
20
|
+
<th class="email"><%- gettext("Email") %></th>
|
|
21
|
+
<th class="allowance-name"><%- gettext("Allowance Type") %> </th>
|
|
22
|
+
<th class="allowance-value"><%- gettext("Allowance Value") %></th>
|
|
23
|
+
<th class="c_action"><%- gettext("Actions") %> </th>
|
|
24
|
+
</tr>
|
|
25
|
+
<% _.each(student, function(proctored_exam_allowance){ %>
|
|
26
|
+
<% var key = proctored_exam_allowance.key; %>
|
|
27
|
+
<% for (i = 0; i < allowance_types.length; i += 1) { %>
|
|
28
|
+
<% if (key === allowance_types[i][0]) { %>
|
|
29
|
+
<% proctored_exam_allowance.key_display_name = allowance_types[i][1]; %>
|
|
30
|
+
<% break; %>
|
|
31
|
+
<% }} %>
|
|
32
|
+
<% if (!proctored_exam_allowance.key_display_name) { %>
|
|
33
|
+
<% proctored_exam_allowance.key_display_name = key;} %>
|
|
34
|
+
<tr class="allowance-items">
|
|
35
|
+
<td>
|
|
36
|
+
<%- proctored_exam_allowance.proctored_exam.exam_name %>
|
|
37
|
+
</td>
|
|
38
|
+
<td>
|
|
39
|
+
<% if (proctored_exam_allowance.user){ %>
|
|
40
|
+
<%= proctored_exam_allowance.user.email %>
|
|
41
|
+
</td>
|
|
42
|
+
<% }else{ %>
|
|
43
|
+
<td>N/A</td>
|
|
44
|
+
<td>N/A</td>
|
|
45
|
+
<% } %>
|
|
46
|
+
<td>
|
|
47
|
+
<%= proctored_exam_allowance.key_display_name %>
|
|
48
|
+
</td>
|
|
49
|
+
<td>
|
|
50
|
+
<%- proctored_exam_allowance.value %></td>
|
|
51
|
+
<td>
|
|
52
|
+
<a data-exam-id="<%= proctored_exam_allowance.proctored_exam.id %>"
|
|
53
|
+
data-key-name="<%= proctored_exam_allowance.key %>"
|
|
54
|
+
data-key-value="<%= proctored_exam_allowance.key_display_name %>"
|
|
55
|
+
data-user-name="<%= proctored_exam_allowance.user.username %>"
|
|
56
|
+
data-exam-name="<%= proctored_exam_allowance.proctored_exam.exam_name %>"
|
|
57
|
+
class="edit_allowance" href="#">Edit</a>
|
|
58
|
+
<a data-exam-id="<%= proctored_exam_allowance.proctored_exam.id %>"
|
|
59
|
+
data-key-name="<%= proctored_exam_allowance.key %>"
|
|
60
|
+
data-user-id="<%= proctored_exam_allowance.user.id %>"
|
|
61
|
+
class="remove_allowance" href="#">Delete</a>
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
<% }); %>
|
|
65
|
+
</tbody>
|
|
66
|
+
</table>
|
|
67
|
+
<% }); %>
|
|
68
|
+
</section>
|
|
69
|
+
</div>
|
|
70
|
+
<% } %>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<div class='modal-header'><%- gettext("Edit Allowance") %></div>
|
|
2
|
+
<form>
|
|
3
|
+
<h3 class='error-response'><h3>
|
|
4
|
+
<table class='compact'>
|
|
5
|
+
<tr>
|
|
6
|
+
<td>
|
|
7
|
+
<label><%- gettext("Username") %></label>
|
|
8
|
+
</td>
|
|
9
|
+
<td>
|
|
10
|
+
<label> <%= selected_user %> </label>
|
|
11
|
+
</td>
|
|
12
|
+
</tr>
|
|
13
|
+
<tr>
|
|
14
|
+
<td>
|
|
15
|
+
<label><%- gettext("Special Exam") %></label>
|
|
16
|
+
</td>
|
|
17
|
+
<td>
|
|
18
|
+
<label>
|
|
19
|
+
<%= selected_exam_name %>
|
|
20
|
+
</label>
|
|
21
|
+
</td>
|
|
22
|
+
</tr>
|
|
23
|
+
<tr>
|
|
24
|
+
<td>
|
|
25
|
+
<label><%- gettext("Allowance Type") %></label>
|
|
26
|
+
</td>
|
|
27
|
+
<td>
|
|
28
|
+
<label>
|
|
29
|
+
<%= allowance_type_name %>
|
|
30
|
+
</label>
|
|
31
|
+
</td>
|
|
32
|
+
</tr>
|
|
33
|
+
<tr>
|
|
34
|
+
<td>
|
|
35
|
+
<% if (allowance_type == 'additional_time_granted') { %>
|
|
36
|
+
<label id='allowance_value_label'><%- gettext("Add Time(Minutes)") %></label>
|
|
37
|
+
<% }else{ %>
|
|
38
|
+
<label id='allowance_value_label'><%- gettext("Add Policy Exception") %></label>
|
|
39
|
+
<% } %>
|
|
40
|
+
</td>
|
|
41
|
+
<td>
|
|
42
|
+
<input type="text" id="allowance_value" />
|
|
43
|
+
</td>
|
|
44
|
+
</tr>
|
|
45
|
+
<tr>
|
|
46
|
+
<td></td>
|
|
47
|
+
<td>
|
|
48
|
+
<input id='editAllowance' type='submit' value='Save' />
|
|
49
|
+
</td>
|
|
50
|
+
</tr>
|
|
51
|
+
</table>
|
|
52
|
+
</form>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<div class="proctoring-info">
|
|
2
|
+
<h3 class="message-title"> <%= gettext("This course contains proctored exams") %></h3>
|
|
3
|
+
<% if (onboardingStatusText) { %>
|
|
4
|
+
<div class="onboarding-status">
|
|
5
|
+
<span class="onboarding-status"><%= gettext("Current Onboarding Status:") %> <%= onboardingStatusText %></span>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="onboarding-status-message">
|
|
8
|
+
<span class="onboarding-status-message"><%= onboardingMessage %></span>
|
|
9
|
+
</div>
|
|
10
|
+
<% if (onboardingDetail) { %>
|
|
11
|
+
<div class="onboarding-status-detail">
|
|
12
|
+
<span class="onboarding-status-detail"><%= onboardingDetail %></span>
|
|
13
|
+
</div>
|
|
14
|
+
<%} %>
|
|
15
|
+
<%} %>
|
|
16
|
+
<div class="onboarding-reminder">
|
|
17
|
+
<% if (showOnboardingReminder) { %>
|
|
18
|
+
<h4 class="message-title">
|
|
19
|
+
<% if (showOnboardingExamLink) { %>
|
|
20
|
+
<%= gettext("You must have a verified onboarding profile prior to taking any proctored exam.") %>
|
|
21
|
+
<% } else { %>
|
|
22
|
+
<%= gettext("You have successfully submitted your onboarding profile for review.") %>
|
|
23
|
+
<%} %>
|
|
24
|
+
</h4>
|
|
25
|
+
<p class="message-copy">
|
|
26
|
+
<%= gettext("Onboarding profile review can take 2+ business days.") %>
|
|
27
|
+
</p>
|
|
28
|
+
<%} %>
|
|
29
|
+
</div>
|
|
30
|
+
<% if (showOnboardingExamLink) { %>
|
|
31
|
+
<% if (onboardingPastDue) { %>
|
|
32
|
+
<a class="action action-onboarding action-disabled"><%= gettext("Onboarding Past Due") %></a>
|
|
33
|
+
<% } else if (onboardingNotReleased) { %>
|
|
34
|
+
<a class="action action-onboarding action-disabled"><%= gettext("Onboarding Opens") %> <%= onboardingReleaseDate %></a>
|
|
35
|
+
<%} else if (onboardingStatus && onboardingStatus === 'other_course_approved') { %>
|
|
36
|
+
<a href="<%= onboardingLink %>" class="action action-onboarding-practice"><%= gettext("View Onboarding Exam") %></a>
|
|
37
|
+
<%} else { %>
|
|
38
|
+
<a href="<%= onboardingLink %>" class="action action-onboarding"><%= gettext("Complete Onboarding") %></a>
|
|
39
|
+
<%} %>
|
|
40
|
+
<%} %>
|
|
41
|
+
<% if (reviewRequirementsUrl) { %>
|
|
42
|
+
<a href="<%= reviewRequirementsUrl %>" class="action action-info-link"><%= gettext("Review instructions and system requirements for proctored exams") %></a>
|
|
43
|
+
<%} else { %>
|
|
44
|
+
<a href="https://support.edx.org/hc/en-us/articles/207249428-How-do-proctored-exams-work" class="action action-info-link"><%= gettext("Review instructions and system requirements for proctored exams") %></a>
|
|
45
|
+
<%} %>
|
|
46
|
+
</div>
|