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

fix call to tabularasa action for institutes, fixes #1734

Closes #1734

Merge request studip/studip!1129
parent 82e9be57
No related branches found
No related tags found
No related merge requests found
...@@ -61,9 +61,15 @@ class MyInstitutesController extends AuthenticatedController ...@@ -61,9 +61,15 @@ class MyInstitutesController extends AuthenticatedController
public function tabularasa_action($timestamp = null) public function tabularasa_action($timestamp = null)
{ {
$institutes = MyRealmModel::getMyInstitutes(); $institutes = MyRealmModel::getMyInstitutes();
foreach ($institutes as $index => $institut) {
MyRealmModel::setObjectVisits($institutes[$index], $institut['institut_id'], $this->user_id, $timestamp); // This is ugly but since the above does not return object, we need to
} // load the institutes again
Institute::findEachMany(
function (Institute $institute) use ($timestamp) {
MyRealmModel::setObjectVisits($institute, $this->user_id, $timestamp);
},
array_column($institutes, 'institut_id')
);
PageLayout::postSuccess(_('Alles als gelesen markiert!')); PageLayout::postSuccess(_('Alles als gelesen markiert!'));
$this->redirect('my_institutes/index'); $this->redirect('my_institutes/index');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment