Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions app/V1Module/presenters/ExercisesConfigPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -745,8 +745,6 @@ public function checkGetTests(string $id)
public function actionGetTests(string $id)
{
$exercise = $this->exercises->findOrThrow($id);

// Get to da responsa!
$this->sendSuccessResponse($exercise->getExerciseTests()->getValues());
}

Expand Down Expand Up @@ -782,6 +780,7 @@ public function actionSetTests(string $id)
*/

$newTests = [];
/** @var array<string, string> */
$namesToOldIds = []; // new test name => old test ID
$testsModified = false;

Expand Down Expand Up @@ -810,11 +809,6 @@ public function actionSetTests(string $id)
if ($testEntity === null) {
// new exercise test was requested to be created
$testsModified = true;

if ($exercise->getExerciseTestByName($name)) {
throw new InvalidApiArgumentException('tests', "given test name '$name' is already taken");
}

$testEntity = new ExerciseTest($name, $description, $this->getCurrentUser());
$this->exerciseTests->persist($testEntity);
} elseif ($testEntity->getName() !== $name || $testEntity->getDescription() !== $description) {
Expand Down
Loading