Skip to content

Commit c797495

Browse files
committed
got rid of MORE console.logs and made a small change to gradebook rendering for now likely to change with grading option addition
1 parent c16e7c4 commit c797495

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

devU-client/src/components/listItems/assignmentProblemListItem.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ const AssignmentProblemListItem = ({problem, handleChange, disabled}: Props) =>
5757
return (
5858
<div key={problem.id} className={styles.problem}>
5959
<h4 className={styles.problem_header}>{problem.problemName}</h4>
60-
{console.log(options)}
6160
{Object.keys(options).map((key : string) => (
6261
<label key={key} className={styles.mcqLabel} style={disabled ? {cursor: 'default'} : undefined}>
6362
<input id={problem.problemName}
@@ -96,7 +95,7 @@ const AssignmentProblemListItem = ({problem, handleChange, disabled}: Props) =>
9695

9796
else {
9897
return(
99-
<div>{console.log(meta)}Unknown type, something is wrong on the backend!</div>)
98+
<div>Unknown type, something is wrong on the backend!</div>)
10099
}
101100
}
102101

devU-client/src/components/pages/assignments/assignmentDetailPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ const AssignmentDetailPage = () => {
159159
submission.append('courseId', courseId)
160160
submission.append('content', JSON.stringify(contentField))
161161
submission.append('files', file)
162+
162163

163164
response = await RequestService.postMultipart(`/api/course/${courseId}/assignment/${assignmentId}/submissions`, submission);
164165
} else {

devU-client/src/components/pages/forms/assignments/multipleChoiceModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ const MultipleChoiceModal = ({ open, onClose, edit, problemId}: Props) => {
144144
maxScore: '',
145145
correctAnswer: '',
146146
regex: false})
147+
setOptions(new Map<string,string>([['a',''],['b',''],['c','']]))
147148
setBoxType('checkbox')
148149
}
149150

devU-client/src/components/pages/gradebook/gradebookInstructorPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ const TableRow = ({ user, assignments, assignmentScores, maxScores }: RowProps)
4545
assignments.map(a => {
4646
const assignmentScore = assignmentScores.find(as => as.assignmentId === a.id && as.userId === user.id)
4747
if (a.id && assignmentScore){ // Submission defined, so...
48-
if (assignmentScore.createdAt){
49-
const late: boolean = new Date(assignmentScore.createdAt) > new Date(a.dueDate)
48+
if (assignmentScore.updatedAt){
49+
const late: boolean = new Date(assignmentScore.updatedAt) > new Date(a.dueDate) // UPDATE for grading opts
5050
if (late){ // render in red if assignment submission was late.
5151
return (<td className={styles.late} >{assignmentScore.score}/{maxScores.get(a.id)} <strong>!</strong></td>)
5252
}

0 commit comments

Comments
 (0)