Skip to content

Commit

Permalink
Portfolio: Add link to remove user filter in list - refs BT#18201
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Mar 2, 2021
1 parent a81baf5 commit 5ce58f5
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions main/inc/lib/PortfolioController.php
Expand Up @@ -1955,13 +1955,20 @@ private function createFormStudentFilter(bool $listByUser = false): FormValidato
'placeholder' => get_lang('SearchStudent'),
]
);
$frmStudentList->addHtml('<hr>');
$frmStudentList->addHtml(
Display::url(

if ($listByUser) {
$link = Display::url(
get_lang('BackToMainPortfolio'),
$this->baseUrl
);
} else {
$link = Display::url(
get_lang('SeeMyPortfolio'),
$this->baseUrl.http_build_query(['user' => api_get_user_id()])
)
);
);
}

$frmStudentList->addHtml($link);

return $frmStudentList;
}
Expand Down

0 comments on commit 5ce58f5

Please sign in to comment.