Skip to content

Commit

Permalink
Revert "refactor: add missing defaults for tests"
Browse files Browse the repository at this point in the history
This reverts commit cbb7a86.

Revert "temp: remove forcing default value for grading strategy"

This reverts commit 2a71705.
  • Loading branch information
mariajgrimaldi committed Apr 18, 2024
1 parent a734b8b commit 436ffce
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 2 additions & 4 deletions openassessment/xblock/static/js/fixtures/templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,7 @@
"start": "2014-01-02T00:00",
"due": "2014-01-03T00:00",
"must_grade": 5,
"must_be_graded_by": 3,
"grading_strategy": "median"
"must_be_graded_by": 3
},
"self_assessment": {
"start": "2014-01-04T00:00",
Expand Down Expand Up @@ -667,8 +666,7 @@
"start": "2014-01-02T00:00",
"due": "2020-01-01T12:34",
"must_grade": 5,
"must_be_graded_by": 3,
"grading_strategy": "median"
"must_be_graded_by": 3
}
},
"editor_assessments_order": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ describe("OpenAssessment edit assessment views", function() {
it("loads a description", function() {
view.mustGradeNum(1);
view.mustBeGradedByNum(2);
view.gradingStrategy("median");
view.startDatetime("2014-01-01", "00:00");
view.dueDatetime("2014-03-04", "00:00");
expect(view.description()).toEqual({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ describe('OpenAssessment.EditScheduleView', function() {
const peerAssessmentView = new EditPeerAssessmentView(peerAssessmentElement);
peerAssessmentView.startDatetime("2014-01-01", "00:00");
peerAssessmentView.dueDatetime("2014-01-01", "00:00");
peerAssessmentView.gradingStrategy("median");

const selfAssessmentElement = $("#oa_self_assessment_editor").get(0);
const selfAssessmentView = new EditSelfAssessmentView(selfAssessmentElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ export class EditPeerAssessmentView {
if (strategy !== undefined) {
self.val(strategy);
}
if (self.val() === undefined || self.val() === '') {
self.val('median');
return 'median';
}
return self.val();
}

Expand Down

0 comments on commit 436ffce

Please sign in to comment.