Skip to content
Snippets Groups Projects
Commit b5e68417 authored by Moritz Strohm's avatar Moritz Strohm
Browse files

file/choose_file_from_course: use MyCoursesSearch instead of StandardSearch, re #2545

Merge request studip/studip!1978
parent 6e7632d1
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,12 @@ if (Request::get('range_type')) { ...@@ -15,7 +15,12 @@ if (Request::get('range_type')) {
<form id="filechooser_course_search" <form id="filechooser_course_search"
action="<?= $controller->link_for('file/choose_file_from_course/' . $folder_id) ?>" action="<?= $controller->link_for('file/choose_file_from_course/' . $folder_id) ?>"
data-dialog> data-dialog>
<?= QuickSearch::get('course_id', new StandardSearch('AnySeminar_id')) <?= QuickSearch::get('course_id', new MyCoursesSearch('AnySeminar_id', $GLOBALS['perm']->get_perm(),
[
'userid' => $GLOBALS['user']->id,
'exclude' => Request::submitted('cid') ? [Request::get('cid')] : [],
'institutes' => array_column(Institute::getMyInstitutes(), 'Institut_id')
]))
->fireJSFunctionOnSelect("function () { jQuery('#filechooser_course_search').submit(); }") ->fireJSFunctionOnSelect("function () { jQuery('#filechooser_course_search').submit(); }")
->setInputStyle('width: calc(100% - 40px); margin: 20px;') ->setInputStyle('width: calc(100% - 40px); margin: 20px;')
->render() ?> ->render() ?>
......
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