Skip to content
Snippets Groups Projects
Commit 1380d8e4 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fix my courses portal widget, re #4301, fixes #4728

Closes #4728

Merge request studip/studip!3524
parent 0b8be447
No related branches found
No related tags found
No related merge requests found
......@@ -27,11 +27,13 @@ class MyCoursesWidget extends CorePlugin implements PortalPlugin
{
// get the MyCoursesController in order to prepare the correct data for the overview
$controller = app(MyCoursesController::class, ['dispatcher' => app(\Trails\Dispatcher::class)]);
$data = $controller->getPortalWidgetData();
// add the json data to the head so vue can grab it
PageLayout::addHeadElement('script', [], 'STUDIP.MyCoursesData = ' . json_encode($data) . ';');
return $GLOBALS['template_factory']->open('start/my_courses');
return Studip\VueApp::create('MyCourses')
->withStore(
'MyCoursesStore',
'mycourses',
$controller->getPortalWidgetData()
)
->getTemplate();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment