Merged in bugfix/VBV-600-teilnehmer-progress (pull request #244)

Bugfix/VBV-600 teilnehmer progress
This commit is contained in:
Daniel Egger 2023-12-08 10:28:53 +00:00
commit 745d38819e
2 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
import { TEST_STUDENT1_USER_ID } from "../../consts";
import { TEST_TRAINER1_USER_ID } from "../../consts";
import { login } from "../helpers";
describe("assignmentTrainer.cy.js", () => {
@ -85,8 +85,8 @@ describe("assignmentTrainer.cy.js", () => {
cy.wait(500);
// load AssignmentCompletion from DB and check
cy.loadAssignmentCompletion(
"assignment_user_id",
TEST_STUDENT1_USER_ID
"evaluation_user_id",
TEST_TRAINER1_USER_ID
).then((ac) => {
expect(ac.completion_status).to.equal("EVALUATION_IN_PROGRESS");
expect(JSON.stringify(ac.completion_data)).to.include("Nicht so gut");
@ -187,8 +187,8 @@ describe("assignmentTrainer.cy.js", () => {
// load AssignmentCompletion from DB and check
cy.loadAssignmentCompletion(
"assignment_user_id",
TEST_STUDENT1_USER_ID
"evaluation_user_id",
TEST_TRAINER1_USER_ID
).then((ac) => {
expect(ac.completion_status).to.equal("EVALUATION_SUBMITTED");
expect(ac.evaluation_points).to.equal(17);
@ -237,8 +237,8 @@ describe("assignmentTrainer.cy.js", () => {
// load AssignmentCompletion from DB and check
cy.loadAssignmentCompletion(
"assignment_user_id",
TEST_STUDENT1_USER_ID
"evaluation_user_id",
TEST_TRAINER1_USER_ID
).then((ac) => {
console.log(ac.completion_status);
expect(ac.completion_status).to.equal("EVALUATION_IN_PROGRESS");
@ -323,8 +323,8 @@ describe("assignmentTrainer.cy.js", () => {
// load AssignmentCompletion from DB and check
cy.loadAssignmentCompletion(
"assignment_user_id",
TEST_STUDENT1_USER_ID
"evaluation_user_id",
TEST_TRAINER1_USER_ID
).then((ac) => {
expect(ac.completion_status).to.equal("EVALUATION_SUBMITTED");
expect(ac.evaluation_max_points).to.equal(0);

View File

@ -148,8 +148,8 @@ class DashboardQuery(graphene.ObjectType):
assignment=ProgressDashboardAssignmentType( # noqa
_id=course_id, # noqa
total_count=len(evaluation_results), # noqa
points_max_count=points_max_count, # noqa
points_achieved_count=points_achieved_count, # noqa
points_max_count=int(points_max_count), # noqa
points_achieved_count=int(points_achieved_count), # noqa
),
)