Skip to content

Commit

Permalink
Plugin: LTI: Avoid duplicated gradebooks to configure
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Jan 21, 2022
1 parent ed6c2ca commit 7ebf391
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/ims_lti/admin.php
Expand Up @@ -33,8 +33,8 @@
} else {
$categories = Category::load(null, null, $childTool->getCourse()->getCode());
}
if ($categories != null) {
array_push($categoriesGradeBook, $categories[0]);
if (!empty($categories) && !in_array($categories[0], $categoriesGradeBook)) {
$categoriesGradeBook[] = $categories[0];
}
}
}
Expand Down

0 comments on commit 7ebf391

Please sign in to comment.