-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CP3108 Staff Dashboard - Assessment Uploader #1080
Conversation
Pull Request Test Coverage Report for Build 4909
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I attempt to delete an assignment, I immediately get logged out with the following message:
The log from the backend seems to be fine:
[info] Sent 200 in 1ms
[info] GET /v1/notification
[debug] Processing with CadetWeb.NotificationController.index/2
Parameters: %{}
Pipelines: [:api, :auth, :ensure_auth]
[debug] QUERY OK source="users" db=0.2ms
SELECT u0."id", u0."name", u0."role", u0."nusnet_id", u0."group_id", u0."inserted_at", u0."updated_at" FROM "users" AS u0 WHERE (u0."id" = $1) [10]
[debug] QUERY OK source="notifications" db=0.2ms
SELECT n0."id", n0."type", n0."read", n0."user_id", n0."assessment_id", n0."submission_id", n0."inserted_at", n0."updated_at" FROM "notifications" AS n0 WHERE (n0."user_id" = $1) AND (n0."read" = FALSE) [10]
[info] Sent 200 in 1ms
[info] GET /v1/assessments
[debug] Processing with CadetWeb.AssessmentsController.index/2
Parameters: %{}
Pipelines: [:api, :auth, :ensure_auth]
[debug] QUERY OK source="users" db=0.3ms
SELECT u0."id", u0."name", u0."role", u0."nusnet_id", u0."group_id", u0."inserted_at", u0."updated_at" FROM "users" AS u0 WHERE (u0."id" = $1) [10]
[debug] QUERY OK db=1.4ms
SELECT s0."id", s0."title", s0."is_published", s0."type", s0."summary_short", s0."summary_long", s0."open_at", s0."close_at", s0."cover_picture", s0."mission_pdf", s0."number", s0."story", s0."reading", s0."password", s0."inserted_at", s0."updated_at", s0."max_grade", s0."max_xp", s1."xp" + s1."xp_adjustment" + s1."xp_bonus", s1."grade" + s1."adjustment", s1."status", s2."count", s3."count" FROM (SELECT a0."id" AS "id", a0."title" AS "title", a0."is_published" AS "is_published", a0."type" AS "type", a0."summary_short" AS "summary_short", a0."summary_long" AS "summary_long", a0."open_at" AS "open_at", a0."close_at" AS "close_at", a0."cover_picture" AS "cover_picture", a0."mission_pdf" AS "mission_pdf", a0."number" AS "number", a0."story" AS "story", a0."reading" AS "reading", a0."password" AS "password", a0."inserted_at" AS "inserted_at", a0."updated_at" AS "updated_at", s1."max_grade" AS "max_grade", s1."max_xp" AS "max_xp" FROM "assessments" AS a0 INNER JOIN (SELECT q0."assessment_id" AS "assessment_id", sum(q0."max_grade") AS "max_grade", sum(q0."max_xp") AS "max_xp" FROM "questions" AS q0 GROUP BY q0."assessment_id") AS s1 ON a0."id" = s1."assessment_id") AS s0 LEFT OUTER JOIN (SELECT s0."id" AS "id", s0."xp_bonus" AS "xp_bonus", s0."status" AS "status", s0."unsubmitted_at" AS "unsubmitted_at", s0."assessment_id" AS "assessment_id", s0."student_id" AS "student_id", s0."unsubmitted_by_id" AS "unsubmitted_by_id", s0."inserted_at" AS "inserted_at", s0."updated_at" AS "updated_at", s1."xp" AS "xp", s1."xp_adjustment" AS "xp_adjustment", s1."grade" AS "grade", s1."adjustment" AS "adjustment" FROM "submissions" AS s0 INNER JOIN (SELECT a0."submission_id" AS "submission_id", sum(a0."grade") AS "grade", sum(a0."adjustment") AS "adjustment", sum(a0."xp") AS "xp", sum(a0."xp_adjustment") AS "xp_adjustment" FROM "answers" AS a0 GROUP BY a0."submission_id") AS s1 ON s0."id" = s1."submission_id") AS s1 ON (s0."id" = s1."assessment_id") AND (s1."student_id" = $1) LEFT OUTER JOIN (SELECT q0."assessment_id" AS "assessment_id", count(q0."id") AS "count" FROM "questions" AS q0 GROUP BY q0."assessment_id") AS s2 ON s0."id" = s2."assessment_id" LEFT OUTER JOIN (SELECT a0."submission_id" AS "submission_id", count(a0."id") AS "count" FROM "answers" AS a0 WHERE (NOT (a0."grader_id" IS NULL)) GROUP BY a0."submission_id") AS s3 ON s1."id" = s3."submission_id" ORDER BY s0."open_at" [10]
I couldn't recreate the error which you encountered but I did find a bug that occurs when deleting an assessment and I'm not sure if it is related to the error you are facing. Can you try pulling from my latest commit from the backend PR and see if you still face the same error. Also can you display the browser console when deleting the assessment so that I can see the response from the backend? Thanks a lot. |
I just remembered that the nginx config file from the cadet repo does not allow for DELETE requests which causes you to get logged out when deleting an assessment. nginx.conf.txt |
Thanks for pointing that out. I used the nginx config provided and now it no longer logs me out but it seems to be something to do with the backend instead:
|
You have to pull from the latest commit I made to the backend PR a few days ago that fixed this specific bug |
Oh yes the latest commit works now, thanks! |
Do let me know if you would want to fix the merge conflicts yourself thanks =) |
#1058, which contained some or all of the commits from this PR, was merged. So.. I'm not sure if this needs to be merged anymore. |
Context
This PR adds the Assessment Uploader component for the CP3108 Staff Dashboard project. The Assessment Uploader, also called the GroundControl, provides an interface for staff to manage assessments for the course. Staff can upload, delete, publish or update assessments through this interface.
Implementation
The UI for GroundControl can be seen here:

Other Information
Corresponding PR to
cadet
: PR 586More info in the wiki: Assessment Uploader