Deletes a Correction.

@param Correction $correction
174168
public function deleteCorrection(Correction $correction)
    {
        $this->om->startFlushSuite();

        $drop = $correction->getDrop();
        $drop->removeCorrection($correction);
        $this->om->remove($correction);
        $drop = $this->computeDropScore($drop);
        $this->checkSuccess($drop);

        $this->om->endFlushSuite();

        $this->eventDispatcher->dispatch('log', new LogCorrectionDeleteEvent($correction->getDrop()->getDropzone(), $drop, $correction));
    }
751858
public function remove($key, $autocommit = false)
    {
        unset($this->data[$key]);

        if ($autocommit) {
            $this->commit();
        }
    }
298822
public function switchCorrectionValidation(Correction $correction)
    {
        $this->om->startFlushSuite();

        $correction->setValid(!$correction->isValid());
        $this->om->persist($correction);
        $drop = $this->computeDropScore($correction->getDrop());
        $this->checkSuccess($drop);

        $this->om->endFlushSuite();

        $this->eventDispatcher->dispatch('log', new LogCorrectionValidationChangeEvent($correction->getDrop()->getDropzone(), $correction->getDrop(), $correction));

        return $correction;
    }
1299268
public function offsetUnset($offset) {
        if (! $this->offsetExists($offset)) {
            return;
        }
        $value = $this->offsetGet($offset);
        unset($this->values[$offset]);
        $this->tracker->logDeletion($value);
    }
339988
public function remove($name): void
    {
        if ($this->contains($name) == false) {
            return;
        }

        unset($this->record[$name]);
    }
813921
final public function delete($code) {

        if ( array_key_exists($code, $this->rpc_errors) ) {

            unset($this->rpc_errors[$code]);

            $this->logger->debug("Deleted error $code");

            return true;

        } else {

            $this->logger->warning("Cannot delete error $code: entry not found");

            return false;

        }

    }
88612
public function delete($id)
    {
        if ($this->_mails && isset($this->_mails[$id])) {
            $this->_mails[$id]['is_deleted'] = true;
        }
    }
517462
public function computeCorrectionScore(Correction $correction)
    {
        $drop = $correction->getDrop();
        $dropzone = $drop->getDropzone();
        $criteria = $dropzone->getCriteria();

        if ($dropzone->isCriteriaEnabled() && count($criteria) > 0) {
            $score = 0;
            $criteriaIds = [];
            $scoreMax = $dropzone->getScoreMax();
            $total = ($dropzone->getCriteriaTotal() - 1) * count($criteria);
            $grades = $correction->getGrades();

            foreach ($criteria as $criterion) {
                $criteriaIds[] = $criterion->getUuid();
            }
            foreach ($grades as $grade) {
                $gradeCriterion = $grade->getCriterion();

                if (in_array($gradeCriterion->getUuid(), $criteriaIds)) {
                    $score += $grade->getValue();
                }
            }
            $score = round(($score / $total) * $scoreMax, 2);
            $correction->setScore($score);
        }
        $this->om->persist($correction);
        $this->om->flush();

        return $correction;
    }
2497
public static function delete(string $path) : void
    {
        $exception = null;

        try {
            $success = ErrorCatcher::run(static function() use ($path) {
                if (is_dir($path)) {
                    return rmdir($path);
                }

                return unlink($path);
            });

            if ($success === true) {
                return;
            }
        } catch (\ErrorException $e) {
            $exception = $e;
        }

        throw new IoException('Error deleting ' . $path, 0, $exception);
    }
1128198
public function undo( Revision $revision ) {
		$this->api->postRequest( new SimpleRequest(
			'edit',
			$this->getParamsFromRevision( $revision )
		) );
		return true;
	}
1088461
public function offsetUnset($offset) {
		if($this->isCollection)
		{
			unset($this->data[$offset]);
		}
		else
		{
			unset($this->data->{$offset});
		}
	}
1178603
public function offsetUnset($offset)
    {
        if ($this->has($offset)) {
            unset(
                $this->_store[$offset],
                $this->_frozen[$offset]
            );
        }
    }
1229702
public function offsetUnset($offset)
    {
        if (is_int($offset)) {
            $offset = $this->resolveOffset($offset);
            $keys   = array_keys($this->objects);
            if (isset($keys[$offset])) {
                $offset = $keys[$offset];
            }
        }

        $this->remove($offset);
    }
481466
public function removeCheck($check)
    {
        if (in_array($check, $this->checks)) {
            $this->checks = array_diff($this->checks, [$check]);
        }
    }
1000189
public function erase(string $pos): void
    {
        $keys = array_keys($this->map);

        unset($this->map[$keys[$pos]]);
    }
1352558
public function offsetUnset($offset)
	 {
		 $value = isset ($this->data[$offset]) ? $this->data[$offset] : null;
		 unset ($this->data[$offset]);
		 $this->trigger ('unset', $value, $offset);
	 }
1163428
public function delete($id)
    {
        $this->_deletedDirty = true;

        if (extension_loaded('bitset')) {
            if ($this->_deleted === null) {
                $this->_deleted = bitset_empty($id);
            }
            bitset_incl($this->_deleted, $id);
        } else {
            if ($this->_deleted === null) {
                $this->_deleted = array();
            }

            $this->_deleted[$id] = 1;
        }
    }