Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update routes.php #327

Merged
merged 12 commits into from
Sep 22, 2024
93 changes: 43 additions & 50 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,10 +193,10 @@ 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' => [
'dsolver' => [
'description' => 'DSolver',
'target' => 'https://www.dsolver.de/',
],
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,22 +401,26 @@ 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',
],
'lambda' => [
'description' => 'Lambda Calculus',
'target' => 'https://www21.in.tum.de/teaching/lambda/WS22/index.html',
'lambda' => [
'description' => 'Lambda Calculus',
'target' => 'https://www21.in.tum.de/teaching/lambda/WS22/index.html',
'moodle_id' => '80136',
],
],
'langenacht' => [
'description' => 'Lange Nacht der Univeristäten',
'target' => 'https://www.facebook.com/events/2681178088623650/',
],
'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 @@ -477,7 +480,7 @@ class Route {
'description' => 'Modellbildung und Simulation',
'moodle_id' => '63516',
],
'moodle-zips' => [
'moodle-zips' => [
'description' => 'Download Zips on Moodle, then sort by pattern',
'target' => 'https://github.com/pczern/tum-get',
],
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 @@ -732,18 +731,14 @@ class Route {
'description' => 'Transaction Systems',
'target' => 'https://db.in.tum.de/teaching/ss23/transactions/',
],
'tumenu' => [
'tumenu' => [
'description' => 'The place, where you can find daily menus for some student places in Munich',
'target' => 'https://menu.tum.sexy/',
],
'tval' => [
'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 @@ -833,7 +829,6 @@ class Route {
'tex' => 'sharelatex',
'ticket' => 'semesterticket',
'tumi' => 'esn',
'uebanal' => 'uanal',
'uml' => 'apollon',
'urban-mobility' => 'ecarus',
'wahlomat' => 'walomat',
Expand All @@ -847,36 +842,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 @@ -921,7 +914,7 @@ class Route {
'springer',
'statista',
'streams',
'tumenu',
'tumenu',
'tval',
'vorkurs',
'wahl',
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/enrol/index.php?id=100579', $router->getTargetOfSub('mgbs.tum.sexy'));
laxerhd marked this conversation as resolved.
Show resolved Hide resolved

// 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
Loading