Skip to content

Commit 4ed387f

Browse files
committed
Cleanup the grader test files
1 parent 6881dff commit 4ed387f

File tree

3 files changed

+9
-79
lines changed

3 files changed

+9
-79
lines changed

Diff for: webcomponents/tool/src/main/frontend/packages/sakai-grader/test/data.js

+2-59
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,9 @@
1-
export { i18n, i18nUrl } from "./i18n.js";
1+
export { i18n, i18nUrl, filePickerI18n, filePickerI18nUrl } from "./i18n.js";
22

3-
import { GRADE_CHECKED,
4-
LETTER_GRADE_TYPE,
5-
SCORE_GRADE_TYPE,
6-
PASS_FAIL_GRADE_TYPE,
7-
CHECK_GRADE_TYPE } from "../src/sakai-grader-constants.js";
3+
export { closeTime, gradableData } from "./gradable.js";
84

9-
import { closeTime, firstSubmission, firstSubmissionId, gradableData, gradableId } from "./gradable.js";
10-
11-
export { closeTime, firstSubmission, firstSubmissionId, gradableData, gradableId };
12-
13-
export const filePickerI18nUrl = /getI18nProperties.*file-picker/;
14-
15-
export const filePickerI18n = `
16-
remove=Remove
17-
to_be_added=To be added:
18-
`;
19-
20-
export const textSubmissionId = "submission1";
215
export const siteId = "site1";
226
export const siteTitle = "Site 1";
23-
export const submittedText = "My submission";
24-
export const textAttachmentUrl = "http://text.com";
25-
26-
export const fullSubmissionsUrl = `/direct/assignment/fullSubmissions.json?gradableId=${gradableId}&submissionIds=${firstSubmissionId}`;
27-
/*
28-
export const textSubmission = {
29-
id: "submission1",
30-
hydrated: true,
31-
dateSubmitted: "7 Feb 1971",
32-
properties: {
33-
allow_resubmit_number: 0,
34-
},
35-
resubmitsAllowed: -1,
36-
submitted: true,
37-
submitters: [
38-
{
39-
sortName: "Fish, Adrian",
40-
displayId: "fisha",
41-
},
42-
],
43-
//submittedAttachments: [ textAttachment ],
44-
submittedText,
45-
};
46-
*/
47-
48-
export const gradesData = {
49-
students: [],
50-
grades: [],
51-
};
52-
53-
/*
54-
this._submission.originalityShowing = true;
55-
this._submission.originalityServiceName = "Turnitin";
56-
const supplies = [
57-
{
58-
"1": "http://www.balls.com",
59-
"4": "balls",
60-
}
61-
];
62-
this._submission.originalitySupplies = supplies;
63-
*/
647

658
export const gradableType = "Topic";
669
export const gradableRef = "abcd1234";

Diff for: webcomponents/tool/src/main/frontend/packages/sakai-grader/test/gradable.js

-20
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,10 @@
1-
export const gradableId = "8c5fc4bf-69fa-4bfd-a5f6-9a90df394a65";
2-
export const firstSubmissionId = "36bec473-07e4-44c8-97fd-da8333c18226";
31
import { SCORE_GRADE_TYPE, TEXT_AND_ATTACHMENT_ASSIGNMENT_SUBMISSION } from "../src/sakai-grader-constants.js";
42

53
export const closeTime = {
64
"epochSecond": 1696430640,
75
"nano": 0,
86
};
97

10-
export const firstSubmission = {
11-
"feedbackText": "No submission",
12-
"visible": false,
13-
"hydrated": true,
14-
"id": firstSubmissionId,
15-
"submitters": [
16-
{
17-
"sortName": "Abernathy, Price",
18-
"displayName": "Price Abernathy",
19-
"grade": "50.00",
20-
"id": "d1e94a87-79ff-48ea-a781-977b6c52e80c",
21-
"displayId": "984482259"
22-
}
23-
],
24-
firstSubmitterName: "Price Abernathy",
25-
"status": "No Submission - Not Started"
26-
};
27-
288
const gradableTitle = "The atmosphere of Venus";
299

3010
export const gradableData = {

Diff for: webcomponents/tool/src/main/frontend/packages/sakai-grader/test/i18n.js

+7
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,10 @@ grades.lateness.late=Late
139139
gen.assign.spent=Time spent:
140140
select_category_label=Select a category
141141
`;
142+
143+
export const filePickerI18nUrl = /getI18nProperties.*file-picker/;
144+
145+
export const filePickerI18n = `
146+
remove=Remove
147+
to_be_added=To be added:
148+
`;

0 commit comments

Comments
 (0)