Skip to content

Commit

Permalink
Fix wrong result display for first corrector
Browse files Browse the repository at this point in the history
  • Loading branch information
fneumann committed Jun 21, 2024
1 parent bd21454 commit cc99db9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/CorrectorAdmin/class.CorrectorAdminListGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ private function getAssignedCorrectorName(Writer $writer, int $pos): string
if(($assignment = $this->getAssignmentByWriterPosition($writer, $pos)) !== null) {
$corrector = $this->correctors[$assignment->getCorrectorId()];

if (!empty($essay = $this->essays[$writer->getId()] ?? null) && isset($this->summaries[$essay->getId()][$corrector->getId()])) {
if (!empty($essay = ($this->essays[$writer->getId()] ?? null)) && isset($this->summaries[$essay->getId()][$corrector->getId()])) {
$summary = $this->summaries[$essay->getId()][$corrector->getId()];
} else {
$summary = null;
Expand Down Expand Up @@ -410,7 +410,7 @@ public function setAssignments(array $assignments): void
public function setSummaries(array $summaries): void
{
foreach($summaries as $summary) {
if(isset($this->summaries[$summary->getEssayId()])) {
if(!isset($this->summaries[$summary->getEssayId()])) {
$this->summaries[$summary->getEssayId()]= [];
}
$this->summaries[$summary->getEssayId()][$summary->getCorrectorId()] = $summary;
Expand Down

0 comments on commit cc99db9

Please sign in to comment.