Fix for course autosync with the pages change

This commit is contained in:
PMKuipers 2023-08-07 22:20:45 +02:00
parent 36c3306c67
commit 833f0fb261

View File

@ -636,7 +636,8 @@ class studyplan {
$sql = "SELECT i.course_id
FROM {local_treestudyplan} p
INNER JOIN {local_treestudyplan_line} l ON p.id = l.studyplan_id
INNER JOIN {local_treestudyplan_page} pg ON p.id = pg.studyplan_id
INNER JOIN {local_treestudyplan_line} l ON pg.id = l.page_id
INNER JOIN {local_treestudyplan_item} i ON l.id = i.line_id
WHERE p.id = :studyplan_id AND i.type = :itemtype";
$fields = $DB->get_fieldset_sql($sql,["studyplan_id" => $this->id,"itemtype" => studyitem::COURSE]);