ian-james / IFS

Immediate Feedback System for student programming assignments and essay writing
MIT License
5 stars 6 forks source link

Feedback will not store in database when no assignment is selected for evaluation #171

Open ndomenic opened 6 years ago

ndomenic commented 6 years ago

Bug Report

Description

Whenever I submit a file for evaluation, the Node console logs an error in which a foreign key constraint for the assignmentID fails on insertion, since there is no assignment to associate with. This only occurs when no course AND no assignment are selected for evaluation.

Steps to reproduce

  1. Log into IFS, and go to the tool page
  2. Enable a tool, and upload a file for evaluation, without setting the course or assignment it is for
  3. Click the evaluate button
  4. Check the Node console for the error message

Implementation

There needs to be a database migration that alters the feedback table so that assignmentID can be made NULL if need be when there is no assignment relating to current feedback.

GrantDouglas commented 6 years ago

When you select the course and assignment, are they blank fields, or are they "None"?

ndomenic commented 6 years ago

The course says "none", and as such the assignment field is not an option