Add basic structure

This commit is contained in:
Felix Förtsch
2021-08-01 12:34:14 +02:00
parent 316fec07d9
commit 3ee160c467
9 changed files with 713 additions and 22 deletions

View File

@@ -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()
}
}

View File

@@ -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)
}
}

View File

@@ -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)
}
}

View File

@@ -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)
}
}

View File

@@ -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)
}
}

View File

@@ -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]
}

View File

@@ -11,7 +11,7 @@ import SwiftUI
struct StudyStructureApp: App {
var body: some Scene {
WindowGroup {
ContentView()
MainView()
}
}
}

483
StudyStructure/courses.json Normal file
View File

@@ -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
}
]

View File

@@ -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": []
}
]
}
]
}