Skip to content

Commit

Permalink
Update routes.php (#327)
Browse files Browse the repository at this point in the history
* updated routes.php frontpage for first semester and fixed some indentations

* changed order in routes.php

* updated links frontpage for second semester

* updated links frontpage for third semester

* updated links to ref new tumonline sites

* updated links frontpage for fourth and fifth semester

* removed deleted elements from semester list

* fixed redirect to moodle testcase, added moodle id to gbs

* Update tests/General/MainTest.php

Changed enrol to course in test

Co-authored-by: Joscha Henningsen <44805696+joschahenningsen@users.noreply.github.com>

* Update routes.php

* Update MainTest.php

---------

Co-authored-by: Joscha Henningsen <44805696+joschahenningsen@users.noreply.github.com>
Co-authored-by: Kordian Bruck <kordianbruck@users.noreply.github.com>
  • Loading branch information
3 people committed Sep 22, 2024
1 parent 0c36066 commit 4ecb903
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 49 deletions.
84 changes: 37 additions & 47 deletions redirect/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Route {
],
'anal' => [
'description' => 'Analysis für Informatik',
'moodle_id' => '83133',
'target' => 'https://campus.tum.de/tumonline/ee/ui/ca2/app/desktop/#/slc.tm.cp/student/courses/950763262',
],
'androidsec' => [
'description' => 'Praktikum: Android Security',
Expand All @@ -52,6 +52,10 @@ class Route {
'description' => 'TUM Campus App',
'target' => 'https://www.tum.app/',
],
'arb' => [
'description' => 'Arbabi Tutoriums-Website',
'target' => 'https://home.in.tum.de/~arb/',
],
'artemis' => [
'description' => 'Artemis platform (Applied Software Engineering)',
'target' => 'https://artemis.cit.tum.de',
Expand Down Expand Up @@ -178,8 +182,7 @@ class Route {
],
'db' => [
'description' => 'Grundlagen: Datenbanken',
'target' => 'https://db.in.tum.de/teaching/ws2223/grundlagen/?lang=de',
'moodle_id' => '80363',
'target' => 'https://campus.tum.de/tumonline/ee/ui/ca2/app/desktop/#/slc.tm.cp/student/courses/950763749',
],
'dea' => [
'description' => 'Studienplan von Data Engineering & Analytics',
Expand All @@ -190,8 +193,8 @@ class Route {
'target' => 'https://www.sv.tum.de/asta/team/diversityqueer/',
],
'ds' => [
'description' => 'Diskrete Strukturen',
'moodle_id' => '80008',
'description' => 'Diskrete Strukturen (Moodle-Kurs)',
'moodle_id' => '100934',
],
'dsolver' => [
'description' => 'DSolver',
Expand All @@ -217,13 +220,13 @@ class Route {
'description' => 'HowTo: Setup eduroam securely!',
'target' => 'https://tum.sexy/eduroam.php',
],
'eidi' => [
'description' => 'Einführung in die Informatik (Moodle-Kurs)',
'moodle_id' => '100933',
],
'eist' => [
'description' => 'Einführung in die Softwaretechnik',
'target' => 'https://artemis.cit.tum.de/courses/241',
],
'eistslack' => [
'description' => 'EIST Slack-Channel',
'target' => 'https://eist2023.slack.com/',
'target' => 'https://dse.in.tum.de/teaching/eist-24/',
],
'enigame' => [
'description' => 'enigame Puzzle Hunt (Escape Game) Event',
Expand Down Expand Up @@ -269,12 +272,11 @@ class Route {
],
'fpv' => [
'description' => 'Functional Programming and Verification',
'target' => 'https://www.in.tum.de/i02/lehre/sommersemester-22/vorlesungen/functional-programming-and-verification/',
'moodle_id' => '75431',
'target' => 'https://www.cs.cit.tum.de/pl/lehre/wintersemester-2122/vorlesungen/functional-programming-and-verification/',
],
'gad' => [
'description' => 'Grundlegende Algorithmen und Datenstrukturen',
'target' => 'https://artemis.ase.in.tum.de/courses/256/exercises',
'target' => 'https://campus.tum.de/tumonline/ee/ui/ca2/app/desktop/#/slc.tm.cp/student/courses/950763749',
'moodle_id' => '86017',
],
'gadunittests' => [
Expand All @@ -283,7 +285,8 @@ class Route {
],
'gbs' => [
'description' => 'Grundlagen: Betriebssysteme und Systemsoftware',
'moodle_id' => '80270',
'target' => 'https://campus.tum.de/tumonline/ee/ui/ca2/app/desktop/#/slc.tm.cp/student/courses/950763892',
'moodle_id' => '100579',
],
'ge-ma-sp' => [
'description' => 'Studienplan M.Sc. Informatik: Games Engineering',
Expand Down Expand Up @@ -331,7 +334,7 @@ class Route {
],
'grnvs' => [
'description' => 'Grundlagen Rechnernetze und Verteilte Systeme',
'target' => 'https://www.net.in.tum.de/teaching/ss23/grnvs.html',
'target' => 'https://www.net.in.tum.de/teaching/ss24/grnvs.html',
],
'gs' => [
'description' => 'DocGS',
Expand Down Expand Up @@ -377,10 +380,6 @@ class Route {
'description' => 'Medical Imaging Technology',
'moodle_id' => '61616',
],
'info1' => [
'description' => 'Einführung in die Informatik 1',
'moodle_id' => '80182',
],
'io' => [
'description' => 'Information Officer',
'target' => 'https://www.sv.tum.de/asta/io/',
Expand All @@ -402,6 +401,10 @@ class Route {
'description' => 'Julius Kreutz Tutoriums Website',
'target' => 'https://julius-kreutz.de',
],
'kap' => [
'description' => 'Klinisches Anwendungsprojekt KAP (Medizin-Anwendungsfach)',
'target' => 'https://gist.github.com/Jolly5/6bfe61e2e844e3c1efb56f02e4354cee',
],
'ki' => [
'description' => 'Grundlagen der künstlichen Intelligenz',
'moodle_id' => '58014',
Expand All @@ -417,7 +420,7 @@ class Route {
],
'linalg' => [
'description' => 'Lineare Algebra für Informatik',
'target' => 'https://www.moodle.tum.de/course/view.php?id=78521',
'target' => 'https://campus.tum.de/tumonline/ee/ui/ca2/app/desktop/#/slc.tm.cp/student/courses/950729947',
],
'live' => [
'description' => 'Livestreams und Aufzeichnungen von Vorlesungen',
Expand All @@ -443,7 +446,7 @@ class Route {
],
'matching' => [
'description' => 'IN.TUM-Matching-System',
'target' => 'https://matching.in.tum.de/saml2/login/',
'target' => 'https://matching.in.tum.de',
],
'med1' => [
'description' => 'Medizin 1',
Expand Down Expand Up @@ -508,7 +511,7 @@ class Route {
],
'numprog' => [
'description' => 'Numerisches Programmieren',
'moodle_id' => '75131',
'moodle_id' => '100678',
],
'o' => [
'description' => 'TUM Opac',
Expand All @@ -527,8 +530,8 @@ class Route {
'target' => 'https://tum.cloud.panopto.eu',
],
'pgdp' => [
'description' => 'Praktikum Grundlagen der Programmierung (Moodle-Kurs)',
'moodle_id' => '80180',
'description' => 'Praktikum: Grundlagen der Programmierung (Moodle-Kurs)',
'moodle_id' => '100771',
],
'pgdpunittests' => [
'description' => 'Unit - Tests: Praktikum Grundlagen der Programmierung',
Expand Down Expand Up @@ -716,10 +719,6 @@ class Route {
'target' => 'https://www.cs.cit.tum.de/tcs/lehre/sommersemester-2024/theo/',
'moodle_id' => '96557',
],
'theojudge' => [
'description' => 'TUMjudge - Einführung in die theoretische Informatik',
'target' => 'https://judge.in.tum.de/theo/public/',
],
'theotutor' => [
'description' => 'Einführung in die theoretische Informatik: Automatatutor',
'target' => 'https://automata.model.in.tum.de/',
Expand All @@ -740,10 +739,6 @@ class Route {
'description' => 'Status of the Validation Stations',
'target' => 'https://campus.tum.de/valistatus/en/',
],
'uanal' => [
'description' => 'Übungen zu Analysis für Informatik',
'moodle_id' => '84798',
],
'unidb' => [
'description' => 'Unischema von Prof. Kemper',
'target' => 'https://db.in.tum.de/teaching/ws2021/grundlagen/uni.png',
Expand Down Expand Up @@ -798,7 +793,7 @@ class Route {
'complexity' => 'comp',
'covid' => 'corona',
'csd' => 'pride',
'eidi' => 'info1',
'eidi1' => 'eidi',
'eidi2' => 'fpv',
'erap' => 'gra',
'erapra' => 'gra',
Expand All @@ -809,6 +804,7 @@ class Route {
'geokal' => 'geokalkuele',
'gpp' => 'pgdp',
'hsw' => 'wahl',
'info1' => 'eidi',
'info2' => 'fpv',
'kino' => 'film',
'kreutz' => 'julius',
Expand All @@ -822,8 +818,6 @@ class Route {
'patterns' => 'pse',
'protein' => 'pp',
'queer' => 'diversity',
'rbgreater' => 'streams',
'rbgreateragain' => 'streams',
'roomfinder' => 'finder',
'rooms' => 'room',
'sem' => 'semantics',
Expand All @@ -833,7 +827,6 @@ class Route {
'tex' => 'sharelatex',
'ticket' => 'semesterticket',
'tumi' => 'esn',
'uebanal' => 'uanal',
'uml' => 'apollon',
'urban-mobility' => 'ecarus',
'wahlomat' => 'walomat',
Expand All @@ -847,36 +840,34 @@ class Route {
*/
private $sections = [
'1. Semester' => [
'info1',
'pgdp',
'era',
'ds',
'carlos',
'ds',
'dsolver',
'eidi',
'era',
'pgdp',
],
'2. Semester' => [
'eist',
'eistslack',
'fpv',
'fpv',
'gad',
'gra',
'linalg',
'ged',
],
'3. Semester' => [
'anal',
'uanal',
'db',
'gbs',
],
'4. Semester' => [
'grnvs',
'theo',
'theojudge',
'dwt',
],
'5. Semester' => [
'numprog',
'kap',
],
'6. Semester' => [],
'Special' => [
Expand Down Expand Up @@ -916,11 +907,10 @@ class Route {
'sharelatex',
'slam',
'social',
'sp',
'spaetzle',
'sp',
'spaetzle',
'springer',
'statista',
'streams',
'tumenu',
'tval',
'vorkurs',
Expand Down
4 changes: 2 additions & 2 deletions tests/General/MainTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public function testRouteResolving() {
$this->assertEquals('https://tum.sexy/', $router->getTargetOfSub('kjhdsfjkdfsgkjldsfgkjl.tum.sexy'));

// SiteType redirect to moodle
$this->assertStringContainsString('https://www.moodle.tum.de/course/view.php?id=80270', $router->getTargetOfSub('mgbs.tum.sexy'));
$this->assertStringContainsString('https://www.moodle.tum.de/course/view.php?id=100579', $router->getTargetOfSub('mgbs.tum.sexy'));

// Normal redirect still works, even if it has moodle type assigned
$this->assertStringContainsString('https://db.in.tum.de/teaching/ws2223/grundlagen/?lang=de', $router->getTargetOfSub('db.tum.sexy'));
$this->assertStringContainsString('https://www.cs.cit.tum.de/tcs/lehre/sommersemester-2024/theo/', $router->getTargetOfSub('theo.tum.sexy'));
}

public function testJsonOutput() {
Expand Down

0 comments on commit 4ecb903

Please sign in to comment.