From 90c4537f1cb2a556ab0c1cd9e35af01c49368b41 Mon Sep 17 00:00:00 2001 From: Bereczki Sandor <bsandor453@gmail.com> Date: Thu, 31 Jan 2019 17:54:56 +0100 Subject: [PATCH] Staffs no longer appear on the solution details panel. --- src/components/forms/SolutionDetailsForm.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/forms/SolutionDetailsForm.js b/src/components/forms/SolutionDetailsForm.js index e7c087a..ea47851 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]); + } } } -- GitLab