diff --git a/lms/static/coffee/fixtures/staff_grading.html b/lms/static/coffee/fixtures/staff_grading.html new file mode 100644 index 0000000000..2fe5a39a17 --- /dev/null +++ b/lms/static/coffee/fixtures/staff_grading.html @@ -0,0 +1,76 @@ +
+ +
+

Staff grading

+ +
+
+
+
+ + +
+

Instructions

+
+

This is the list of problems that current need to be graded in order to train the machine learning models. Each problem needs to be trained separately, and we have indicated the number of student submissions that need to be graded in order for a model to be generated. You can grade more than the minimum required number of submissions--this will improve the accuracy of machine learning, though with diminishing returns. You can see the current accuracy of machine learning while grading.

+
+ +

Problem List

+ +
+
+ + + +
+

+
+

Problem Information

+
+
+

Maching Learning Information

+
+
+
+
+

Question

+
+
+
+ +
+ +
+ +
+ +
+

Grading

+ +
+
+

Student Submission

+
+
+
+
+

+

+

+

+ +
+ + +
+ + +
+ +
+ +
+
+ diff --git a/lms/static/coffee/spec/staff_grading_spec.coffee b/lms/static/coffee/spec/staff_grading_spec.coffee new file mode 100644 index 0000000000..595a9eb550 --- /dev/null +++ b/lms/static/coffee/spec/staff_grading_spec.coffee @@ -0,0 +1,11 @@ +describe 'StaffGrading', -> + beforeEach -> + spyOn Logger, 'log' + @mockBackend = new StaffGradingBackend('url', true) + + describe 'constructor', -> + beforeEach -> + @staff_grading = new StaffGrading(@mockBackend) + + it 'we are originally in the list view', -> + expect(@staff_grading.list_view).toBe(true) diff --git a/lms/static/coffee/src/staff_grading/staff_grading.coffee b/lms/static/coffee/src/staff_grading/staff_grading.coffee index c7a8a01bab..005a8e682e 100644 --- a/lms/static/coffee/src/staff_grading/staff_grading.coffee +++ b/lms/static/coffee/src/staff_grading/staff_grading.coffee @@ -9,9 +9,13 @@ state_graded = "graded" state_no_data = "no_data" state_error = "error" -class StaffGradingBackend +class @StaffGradingBackend constructor: (ajax_url, mock_backend) -> @ajax_url = ajax_url + # prevent this from trying to make requests when we don't have + # a proper url + if !ajax_url + mock_backend = true @mock_backend = mock_backend if @mock_backend @mock_cnt = 0 @@ -142,7 +146,7 @@ The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for t .error => callback({success: false, error: "Error occured while performing this operation"}) -class StaffGrading +class @StaffGrading constructor: (backend) -> @backend = backend