Skip to content

Commit 449174e

Browse files
Internal: Fix GradebookLink initialization creating a course
1 parent 6257eb6 commit 449174e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/CoreBundle/Entity/GradebookLink.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public function __construct()
7474
{
7575
$this->locked = 0;
7676
$this->visible = 1;
77+
$this->userScoreList = [];
7778
}
7879

7980
public function setType(int $type): self

src/CoreBundle/Helpers/CourseHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ private function createExampleGradebookContent(Course $course, GradebookCategory
620620

621621
$gradebookLink->setType(1);
622622
$gradebookLink->setRefId($refId);
623-
$gradebookLink->setUser(api_get_user_entity());
623+
$gradebookLink->setUserScoreList([]);
624624
$gradebookLink->setCourse($course);
625625
$gradebookLink->setCategory($childGradebookCategory);
626626
$gradebookLink->setCreatedAt(new DateTime());

0 commit comments

Comments
 (0)