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

fixes #3888

Closes #3888

Merge request studip/studip!2740
parent 9f0d1f58
No related branches found
No related tags found
No related merge requests found
...@@ -302,7 +302,7 @@ class Admin_CoursesController extends AuthenticatedController ...@@ -302,7 +302,7 @@ class Admin_CoursesController extends AuthenticatedController
public function index_action() public function index_action()
{ {
$this->fields = $this->getViewFilters(); $this->fields = $this->getViewFilters();
$this->sortby = $GLOBALS['user']->cfg->MEINE_SEMINARE_SORT ?? 'name'; $this->sortby = $GLOBALS['user']->cfg->MEINE_SEMINARE_SORT ?? (Config::get()->IMPORTANT_SEMNUMBER ? 'number' : 'name');
$this->sortflag = $GLOBALS['user']->cfg->MEINE_SEMINARE_SORT_FLAG ?? 'ASC'; $this->sortflag = $GLOBALS['user']->cfg->MEINE_SEMINARE_SORT_FLAG ?? 'ASC';
$this->buildSidebar(); $this->buildSidebar();
...@@ -788,11 +788,6 @@ class Admin_CoursesController extends AuthenticatedController ...@@ -788,11 +788,6 @@ class Admin_CoursesController extends AuthenticatedController
$template->course = $course; $template->course = $course;
$d['action'] = $template->render(); $d['action'] = $template->render();
break; break;
case 22: //Masssenexport Teilnehmendendaten
$template = $tf->open('admin/courses/batch_export_members');
$template->course = $course;
$d['action'] = $template->render();
break;
default: default:
foreach (PluginManager::getInstance()->getPlugins('AdminCourseAction') as $plugin) { foreach (PluginManager::getInstance()->getPlugins('AdminCourseAction') as $plugin) {
if ($GLOBALS['user']->cfg->MY_COURSES_ACTION_AREA === get_class($plugin)) { if ($GLOBALS['user']->cfg->MY_COURSES_ACTION_AREA === get_class($plugin)) {
......
...@@ -248,6 +248,16 @@ export default { ...@@ -248,6 +248,16 @@ export default {
if (sortby === 'last_activity') { if (sortby === 'last_activity') {
sortFunction = (a, b) => a.last_activity_raw - b.last_activity_raw; sortFunction = (a, b) => a.last_activity_raw - b.last_activity_raw;
} else if (sortby === 'name') {
sortFunction = (a, b) => {
return collator.compare(striptags(a.name), striptags(b.name))
|| collator.compare(striptags(a.number), striptags(b.number));
};
} else if (sortby === 'number') {
sortFunction = (a, b) => {
return collator.compare(striptags(a.number), striptags(b.number))
|| collator.compare(striptags(a.name), striptags(b.name));
};
} else { } else {
let is_numeric = true; let is_numeric = true;
for (let i in array) { for (let i in array) {
......
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