diff --git a/StudyStructure/ContentView.swift b/StudyStructure/ContentView.swift deleted file mode 100644 index 4a2b3a4..0000000 --- a/StudyStructure/ContentView.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// ContentView.swift -// StudyStructure -// -// Created by Felix Förtsch on 29.07.21. -// - -import SwiftUI - -struct ContentView: View { - var body: some View { - Text("Hello, world!") - .padding() - } -} - -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - ContentView() - } -} diff --git a/StudyStructure/CourseCatalogView.swift b/StudyStructure/CourseCatalogView.swift new file mode 100644 index 0000000..3b17edd --- /dev/null +++ b/StudyStructure/CourseCatalogView.swift @@ -0,0 +1,39 @@ +// +// CourseCatalogView.swift +// CourseCatalogView +// +// Created by Felix Förtsch on 01.08.21. +// + +import SwiftUI + +struct CourseCatalogView: View { + func parse() -> [Course] { + let url = Bundle.main.url(forResource: "courses", withExtension: "json")! + let data = try! Data(contentsOf: url) + let decoder = JSONDecoder() + let products = try? decoder.decode([Course].self, from: data) + return products! + } + + + var body: some View { + NavigationView { + List{ + ForEach(parse(), id: \.self) { item in + VStack(alignment: .leading, spacing: 0){ + Text("name:\(item.name)") + Text("\(item.description)") + } + } + } + .navigationBarTitle("Courses") + } + } +} + +struct CourseCatalogView_Previews: PreviewProvider { + static var previews: some View { + CourseCatalogView().preferredColorScheme(.dark) + } +} diff --git a/StudyStructure/CurriculumView.swift b/StudyStructure/CurriculumView.swift new file mode 100644 index 0000000..7193f0b --- /dev/null +++ b/StudyStructure/CurriculumView.swift @@ -0,0 +1,26 @@ +// +// CurriculumView.swift +// CurriculumView +// +// Created by Felix Förtsch on 01.08.21. +// + +import SwiftUI + +struct CurriculumView: View { + var body: some View { + NavigationView { + HStack { + Text("My Curriculum") + } + .navigationTitle("My Curriculum") + } + + } +} + +struct CurriculumView_Previews: PreviewProvider { + static var previews: some View { + CurriculumView().preferredColorScheme(.dark) + } +} diff --git a/StudyStructure/MainView.swift b/StudyStructure/MainView.swift new file mode 100644 index 0000000..4df3d37 --- /dev/null +++ b/StudyStructure/MainView.swift @@ -0,0 +1,31 @@ +// +// MainView.swift +// MainView +// +// Created by Felix Förtsch on 01.08.21. +// + +import SwiftUI + +struct MainView: View { + var body: some View { + TabView { + CurriculumView().tabItem { + Label("My Curriculum", systemImage: "graduationcap") + } + CourseCatalogView().tabItem { + Label("Courses", systemImage: "list.bullet.rectangle.portrait") + } + SettingsView().tabItem { + Label("Settings", systemImage: "gear") + } + } + } +} + +struct MainView_Previews: PreviewProvider { + static var previews: some View { + MainView().preferredColorScheme(.dark) + } + +} diff --git a/StudyStructure/SettingsView.swift b/StudyStructure/SettingsView.swift new file mode 100644 index 0000000..e923cdc --- /dev/null +++ b/StudyStructure/SettingsView.swift @@ -0,0 +1,34 @@ +// +// SettingsView.swift +// SettingsView +// +// Created by Felix Förtsch on 01.08.21. +// + +import SwiftUI + +struct SettingsView: View { + var body: some View { + NavigationView { + List { + Section(header: Text("Selected School")) { + Text("Uni Leipzig") + + } + + Section(header: Text("Contribute")) { + Text("Request a School") + Text("Submit a Course") + } + + } + .navigationBarTitle("Settings") + } + } +} + +struct SettingsView_Previews: PreviewProvider { + static var previews: some View { + SettingsView().preferredColorScheme(.dark) + } +} diff --git a/StudyStructure/Structs.swift b/StudyStructure/Structs.swift new file mode 100644 index 0000000..74df9ee --- /dev/null +++ b/StudyStructure/Structs.swift @@ -0,0 +1,35 @@ +// +// Course.swift +// Course +// +// Created by Felix Förtsch on 01.08.21. +// + +import Foundation + +struct Course: Codable, Hashable { + var id: String + var name: String + var description: String + var type: String + var cp: Int +} + +struct SlotTypes: Codable { + var cp: Int + var amount: Int + var type: String +} + +struct Curriculum : Codable { + let id: Int + let name: String + let cp: Int + let publishedDate: Date + var slotTypes: [SlotTypes] +} + +struct School: Codable { + var name: String + var curriculums: [Curriculum] +} diff --git a/StudyStructure/StudyStructureApp.swift b/StudyStructure/StudyStructureApp.swift index 5c05842..129f186 100644 --- a/StudyStructure/StudyStructureApp.swift +++ b/StudyStructure/StudyStructureApp.swift @@ -11,7 +11,7 @@ import SwiftUI struct StudyStructureApp: App { var body: some Scene { WindowGroup { - ContentView() + MainView() } } } diff --git a/StudyStructure/courses.json b/StudyStructure/courses.json new file mode 100644 index 0000000..fa45f75 --- /dev/null +++ b/StudyStructure/courses.json @@ -0,0 +1,483 @@ +[ + { + "id": "09-202-2410", + "name": "Modellierung biologischer und molekularer Systeme", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "09-202-2412", + "name": "Computerassistierte Chirurgie", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "09-202-2413", + "name": "Statistische Aspekte der Analyse molekularbiologischer und genetischer Daten", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "09-202-2415", + "name": "Entwicklung von Medizinprodukten", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "09-INF-BI01", + "name": "Statistisches Lernen", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-201-2501", + "name": "Management", + "type": "Schlüsselqualifikation", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2106", + "name": "Automatentheorie", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2112", + "name": "Komplexitätstheorie", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2114", + "name": "Mobile Peer-to-Peer Systeme", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2126", + "name": "Eingebettete Systeme", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2127", + "name": "Mobile Peer-to-Peer Systeme", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2131", + "name": "Soziale Netzwerke", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2133", + "name": "Künstliche Neuronale Netze, Maschinelles Lernen und Signalverarbeitung", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2136", + "name": "Kryptographie", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2201", + "name": "Wissenschaftliche Visualisierung", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2203", + "name": "Interaktive Visuelle Datenanalyse 2", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2207", + "name": "Sequenzanalyse und Genomik", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2215", + "name": "Moderne Datenbanktechnologien - Kleines Modul", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2216", + "name": "Moderne Datenbanktechnologien", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2217", + "name": "Forschungsseminar Datenbanken", + "type": "Seminarmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2302", + "name": "Wissensrepräsentation", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2314", + "name": "Advanced Information Retrieval", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2323", + "name": "Wissens- und Content Management", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2330", + "name": "Gesellschaftliche Strukturen im digitalen Wandel", + "type": "Seminarmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "07-203-4210", + "name": "Softwaresystemfamilien und -produktlinien", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "09-202-2409", + "name": "Architektur von Informationssystemen im Gesundheitswesen", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "09-202-2411", + "name": "Informationsmanagement in der klinischen Forschung", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "09-202-2414", + "name": "Strukturierte Systeminnovation für die Medizin", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2012", + "name": "Aktuelle Trends der Informatik", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2104", + "name": "Neuroinspirierte Informationsverarbeitung", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2107", + "name": "Angewandte Automatentheorie", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2111A", + "name": "Übersetzung", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2111B", + "name": "Syntaktische Analyse", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2115", + "name": "Automatentheorie", + "type": "Seminarmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2129", + "name": "Rechnernetze und Internetanwendungen II", + "type": "Seminarmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2130", + "name": "Ausgewählte Verfahren mobiler Peer-to-Peer Systeme", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2134", + "name": "Mainframe Internet Integration", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2135", + "name": "Maschinelles Lernen mit empirischen Daten", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2202", + "name": "Seminar Visualisierung", + "type": "Seminarmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2204", + "name": "Medizinische Bildverarbeitung und bildgebende Verfahren in der Medizin", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2205", + "name": "Graphen und biologische Netze", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2208", + "name": "Bioinformatik von RNA- und Proteinstrukturen", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2210", + "name": "Visualisierung für Digital Humanities", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2213", + "name": "Anwendungsbezogene Datenbankkonzepte", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2214", + "name": "Anwendungsbezogene Datenbankkonzepte", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2218", + "name": "Grundlagen Komplexer Systeme", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2220", + "name": "Komplexe Systeme", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2223", + "name": "Zeichnen gerichteter Graphen", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2224", + "name": "Zeichnen ungerichteter Graphen", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2225", + "name": "Zeichnen von Graphen", + "type": "", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2307", + "name": "Anwendungen Linguistische Informatik", + "type": "Seminarmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2308", + "name": "Betriebliche Informationssysteme", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2312", + "name": "Seminarmodul Angewandte Informatik (Master)", + "type": "Seminarmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2322", + "name": "Textdatenbanken", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2501", + "name": "Projektmanagement", + "type": "Schlüsselqualifikation", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-INF-BI04", + "name": "Fortgeschrittene Methoden in der Bioinformatik", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "09-202-2408", + "name": "Management von Informationssystemen im Gesundheitswesen", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2313", + "name": "Algorithmen der Computeralgebra", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-202-2502", + "name": "Informatik in der Praxis: Wirtschaft und Industrie", + "type": "Kernmodul", + "cp": 5, + "description": "", + "duration": 1 + }, + { + "id": "10-INF-BI03", + "name": "Theoretische Biologie", + "type": "Vertiefungsmodul", + "cp": 10, + "description": "", + "duration": 1 + } +] + diff --git a/StudyStructure/curriculums.json b/StudyStructure/curriculums.json new file mode 100644 index 0000000..ed26649 --- /dev/null +++ b/StudyStructure/curriculums.json @@ -0,0 +1,64 @@ +{ + "metadata": { + "responseInfo": { + "status":200, + "developerMessage":"OK", + } + }, + "results": [ + { + "university": "Uni Leipzig", + "publishedDate": + "courses": [ + { + "id": 1, + "name": "MSc Informatik", + "cp": 120, + "slotTypes": [ + { + "cp": 5, + "amount": 4, + "type": "Kernmodul" + }, + { + "cp": 5, + "amount": 4, + "type": "Vertiefungsmodul" + }, + { + "cp": 25, + "amount": 1, + "type": "Masterarbeit" + }, + { + "cp": 5, + "amount": 1, + "type": "Masterseminar" + }, + { + "cp": 10, + "amount": 1, + "type": "Fakultätsinterne Schlüsselqualifikation" + }, + { + "cp": 10, + "amount": 2, + "type": "Ergänzungsfach" + }, + { + "cp": 5, + "amount": 1, + "type": "Seminarmodul" + } + ] + }, + { + "id": 2, + "name": "MSc Bioinformatik", + "cp": 120, + "slotTypes": [] + } + ] + } + ] +}