diff --git a/src/components/forms/SolutionDetailsForm.js b/src/components/forms/SolutionDetailsForm.js index e7c087a2d265ec05de8fc95c7b102d2747fe1ce1..ea478511ae50ddc7527bdc1b6a6941cff26f2178 100644 --- a/src/components/forms/SolutionDetailsForm.js +++ b/src/components/forms/SolutionDetailsForm.js @@ -26,14 +26,16 @@ class SolutionDetailsForm extends Component { const profileSolutions = taskSolutions.filter(solution => solution.created_by === this.props.homeworks.profiles[i].id); - if (profileSolutions.length === 0) { - noSubmitStudents.push(this.props.homeworks.profiles[i]); - } else if (taskSolutions[taskSolutions.length - 1].corrected === false) { - waitForCorrectionStudents.push(this.props.homeworks.profiles[i]); - } else if (taskSolutions[taskSolutions.length - 1].accepted === false) { - noAcceptStudents.push(this.props.homeworks.profiles[i]); - } else { - acceptedStudents.push(this.props.homeworks.profiles[i]); + if (this.props.homeworks.profiles[i].role === 'Student') { + if (profileSolutions.length === 0) { + noSubmitStudents.push(this.props.homeworks.profiles[i]); + } else if (taskSolutions[taskSolutions.length - 1].corrected === false) { + waitForCorrectionStudents.push(this.props.homeworks.profiles[i]); + } else if (taskSolutions[taskSolutions.length - 1].accepted === false) { + noAcceptStudents.push(this.props.homeworks.profiles[i]); + } else { + acceptedStudents.push(this.props.homeworks.profiles[i]); + } } }