fast fertig
This commit is contained in:
parent
50f239ad08
commit
f804e2bacd
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,6 +1,9 @@
|
||||
import cherrypy
|
||||
from .database import Database_cl
|
||||
from .view import View_cl
|
||||
import collections
|
||||
orderedDict = collections.OrderedDict()
|
||||
from collections import OrderedDict
|
||||
|
||||
#----------------------------------------------------------
|
||||
class Application_cl(object):
|
||||
@ -29,6 +32,7 @@ class Application_cl(object):
|
||||
def category(self, cat=None):
|
||||
#-------------------------------------------------------
|
||||
print("Category: ", cat, "\n")
|
||||
self.db.ReadAll()
|
||||
if(cat==None):
|
||||
return self.GenerateIndex()
|
||||
else:
|
||||
@ -39,6 +43,7 @@ class Application_cl(object):
|
||||
def choice(self):
|
||||
#-------------------------------------------------------
|
||||
print("Choice \n")
|
||||
self.db.ReadAll()
|
||||
return self.GenerateListChoice()
|
||||
@cherrypy.expose
|
||||
|
||||
@ -46,6 +51,8 @@ class Application_cl(object):
|
||||
def eval(self, cat):
|
||||
#-------------------------------------------------------
|
||||
print("Eval \n")
|
||||
self.db.ReadAll()
|
||||
self.db.CheckDates()
|
||||
return self.GenerateListEval(cat)
|
||||
@cherrypy.expose
|
||||
|
||||
@ -79,6 +86,14 @@ class Application_cl(object):
|
||||
return self.GenerateSave(dataTmp, cat)
|
||||
@cherrypy.expose
|
||||
|
||||
#-------------------------------------------------------
|
||||
def saveChoice(self, **data):
|
||||
#-------------------------------------------------------
|
||||
print("Save: Choice")
|
||||
dataTmp = data
|
||||
return self.GenerateSaveChoice(dataTmp)
|
||||
@cherrypy.expose
|
||||
|
||||
#-------------------------------------------------------
|
||||
def delete(self, cat=None, id=None):
|
||||
#-------------------------------------------------------
|
||||
@ -161,7 +176,7 @@ class Application_cl(object):
|
||||
data['id'] = id
|
||||
data = self.db.data['Angebote'][id]
|
||||
data['Studenten'] = self.db.data['Studenten']
|
||||
data['Lehrende'] = self.db.data['Lehrende']
|
||||
data['Lehrender'] = self.db.data['Lehrender']
|
||||
print(data, "\n")
|
||||
return self.view.CreateDetailChoice(data)
|
||||
|
||||
@ -170,54 +185,68 @@ class Application_cl(object):
|
||||
#-------------------------------------------------------
|
||||
data = {}
|
||||
Studenten = self.db.data['Studenten']
|
||||
Lehrende = self.db.data['Lehrende']
|
||||
Lehrender = self.db.data['Lehrender']
|
||||
Firmen = self.db.data['Firmen']
|
||||
Angebote = self.db.data['Angebote']
|
||||
|
||||
data['category'] = cat
|
||||
if(cat == 'Firmen'):
|
||||
for keyFirma, valueFirma in Firmen.items():
|
||||
for keyFirma, valueFirma in sorted(Firmen.items()):
|
||||
data[valueFirma['Name']] = {}
|
||||
data[valueFirma['Name']]['Name'] = valueFirma['Name']
|
||||
data[valueFirma['Name']]['Angebote'] = {}
|
||||
data[valueFirma['Name']]['Angebote']['Angebot'] = {}
|
||||
data[valueFirma['Name']]['Angebote']['aktuell'] = {}
|
||||
data[valueFirma['Name']]['Angebote']['abgeschlossen'] = {}
|
||||
for keyAngebote, valueAngebote in Angebote.items():
|
||||
data[valueFirma['Name']]['Angebote'] = {}
|
||||
data[valueFirma['Name']]['Angebote']['Angebot'] = {}
|
||||
data[valueFirma['Name']]['Angebote']['aktuell'] = {}
|
||||
data[valueFirma['Name']]['Angebote']['abgeschlossen'] = {}
|
||||
|
||||
if(valueAngebote['Firma'] == valueFirma['Name']):
|
||||
data[valueFirma['Name']]['Angebote'][valueAngebote['Status']][valueAngebote['Name']] = {}
|
||||
data[valueFirma['Name']]['Angebote'][valueAngebote['Status']][valueAngebote['Name']]['Name'] = valueAngebote['Name']
|
||||
data[valueFirma['Name']]['Angebote'][valueAngebote['Status']][valueAngebote['Name']]['Student'] = Studenten[valueAngebote['Student']]['Name']
|
||||
data[valueFirma['Name']]['Angebote'][valueAngebote['Status']][valueAngebote['Name']]['Lehrende'] = Lehrende[valueAngebote['Lehrende']]['Name']
|
||||
if(valueAngebote['Student'] != ''):
|
||||
data[valueFirma['Name']]['Angebote'][valueAngebote['Status']][valueAngebote['Name']]['Student'] = Studenten[valueAngebote['Student']]['Name']
|
||||
else:
|
||||
data[valueFirma['Name']]['Angebote'][valueAngebote['Status']][valueAngebote['Name']]['Student'] = ''
|
||||
if(valueAngebote['Lehrender'] != ''):
|
||||
data[valueFirma['Name']]['Angebote'][valueAngebote['Status']][valueAngebote['Name']]['Lehrender'] = Lehrender[valueAngebote['Lehrender']]['Name']
|
||||
else:
|
||||
data[valueFirma['Name']]['Angebote'][valueAngebote['Status']][valueAngebote['Name']]['Lehrender'] = ''
|
||||
data[valueFirma['Name']]['Angebote'][valueAngebote['Status']][valueAngebote['Name']]['ZeitraumVon'] = valueAngebote['ZeitraumVon']
|
||||
data[valueFirma['Name']]['Angebote'][valueAngebote['Status']][valueAngebote['Name']]['ZeitraumBis'] = valueAngebote['ZeitraumBis']
|
||||
print(data)
|
||||
return self.view.CreateListEval(data)
|
||||
elif(cat == 'Studenten'):
|
||||
for keyStudent, valueStudent in Studenten.items():
|
||||
data[valueStudent['Name']] = {}
|
||||
data[valueStudent['Name']]['Name'] = valueStudent['Name']
|
||||
data[valueStudent['Name']]['Angebote'] = {}
|
||||
data[valueStudent['Name']]['Angebote']['Angebot'] = {}
|
||||
data[valueStudent['Name']]['Angebote']['aktuell'] = {}
|
||||
data[valueStudent['Name']]['Angebote']['abgeschlossen'] = {}
|
||||
for keyAngebot, valueAngebot in Angebote.items():
|
||||
if(valueAngebot['Student'] == valueStudent['id']):
|
||||
data[valueStudent['Name']]['Lehrende'] = Lehrende[valueAngebot['Lehrende']]['Name']
|
||||
data[valueStudent['Name']]['Status'] = valueAngebot['Status']
|
||||
data[valueStudent['Name']]['Praxisphase'] = valueAngebot['Name']
|
||||
data[valueStudent['Name']]['Firma'] = valueAngebot['Firma']
|
||||
data[valueStudent['Name']]['ZeitraumVon'] = valueAngebot['ZeitraumVon']
|
||||
data[valueStudent['Name']]['ZeitraumBis'] = valueAngebot['ZeitraumBis']
|
||||
elif(cat == 'Lehrende'):
|
||||
for keyLehrende, valueLehrende in Lehrende.items():
|
||||
data[valueStudent['Name']]['Angebote'][valueAngebot['Status']][keyAngebot] = {}
|
||||
data[valueStudent['Name']]['Angebote'][valueAngebot['Status']][keyAngebot]['Lehrender'] = Lehrender[valueAngebot['Lehrender']]['Name']
|
||||
data[valueStudent['Name']]['Angebote'][valueAngebot['Status']][keyAngebot]['Status'] = valueAngebot['Status']
|
||||
data[valueStudent['Name']]['Angebote'][valueAngebot['Status']][keyAngebot]['Praxisphase'] = valueAngebot['Name']
|
||||
data[valueStudent['Name']]['Angebote'][valueAngebot['Status']][keyAngebot]['Firma'] = valueAngebot['Firma']
|
||||
data[valueStudent['Name']]['Angebote'][valueAngebot['Status']][keyAngebot]['ZeitraumVon'] = valueAngebot['ZeitraumVon']
|
||||
data[valueStudent['Name']]['Angebote'][valueAngebot['Status']][keyAngebot]['ZeitraumBis'] = valueAngebot['ZeitraumBis']
|
||||
elif(cat == 'Lehrender'):
|
||||
for keyLehrende, valueLehrende in Lehrender.items():
|
||||
data[valueLehrende['Name']] = {}
|
||||
data[valueLehrende['Name']]['Name'] = valueLehrende['Name']
|
||||
data[valueLehrende['Name']]['Angebote'] = {}
|
||||
data[valueLehrende['Name']]['Angebote']['Angebot'] = {}
|
||||
data[valueLehrende['Name']]['Angebote']['aktuell'] = {}
|
||||
data[valueLehrende['Name']]['Angebote']['abgeschlossen'] = {}
|
||||
for keyAngebot, valueAngebot in Angebote.items():
|
||||
if(valueAngebot['Lehrende'] == valueLehrende['id']):
|
||||
data[valueLehrende['Name']]['Student'] = Studenten[valueAngebot['Student']]['Name']
|
||||
data[valueLehrende['Name']]['Status'] = valueAngebot['Status']
|
||||
data[valueLehrende['Name']]['Praxisphase'] = valueAngebot['Name']
|
||||
data[valueLehrende['Name']]['Firma'] = valueAngebot['Firma']
|
||||
data[valueLehrende['Name']]['ZeitraumVon'] = valueAngebot['ZeitraumVon']
|
||||
data[valueLehrende['Name']]['ZeitraumBis'] = valueAngebot['ZeitraumBis']
|
||||
if(valueAngebot['Lehrender'] == valueLehrende['id']):
|
||||
data[valueLehrende['Name']]['Angebote'][valueAngebot['Status']][keyAngebot] = {}
|
||||
data[valueLehrende['Name']]['Angebote'][valueAngebot['Status']][keyAngebot]['Student'] = Studenten[valueAngebot['Student']]['Name']
|
||||
data[valueLehrende['Name']]['Angebote'][valueAngebot['Status']][keyAngebot]['Status'] = valueAngebot['Status']
|
||||
data[valueLehrende['Name']]['Angebote'][valueAngebot['Status']][keyAngebot]['Praxisphase'] = valueAngebot['Name']
|
||||
data[valueLehrende['Name']]['Angebote'][valueAngebot['Status']][keyAngebot]['Firma'] = valueAngebot['Firma']
|
||||
data[valueLehrende['Name']]['Angebote'][valueAngebot['Status']][keyAngebot]['ZeitraumVon'] = valueAngebot['ZeitraumVon']
|
||||
data[valueLehrende['Name']]['Angebote'][valueAngebot['Status']][keyAngebot]['ZeitraumBis'] = valueAngebot['ZeitraumBis']
|
||||
|
||||
print(data)
|
||||
return self.view.CreateListEval(data)
|
||||
|
||||
|
||||
@ -230,6 +259,17 @@ class Application_cl(object):
|
||||
self.db.Save(dataTmp, category)
|
||||
return self.GenerateList(category)
|
||||
|
||||
#-------------------------------------------------------
|
||||
def GenerateSaveChoice(self, dataTmp):
|
||||
#-------------------------------------------------------
|
||||
if(dataTmp['Student'] != ''):
|
||||
angebote = self.db.CheckOfferings(dataTmp['Student'])
|
||||
print(angebote)
|
||||
if(angebote == 0):
|
||||
print("Save")
|
||||
self.db.Save(dataTmp, 'Angebote')
|
||||
return self.GenerateListChoice()
|
||||
|
||||
#-------------------------------------------------------
|
||||
def GenerateDelete(self, category, id):
|
||||
#-------------------------------------------------------
|
||||
|
@ -4,6 +4,7 @@ import os
|
||||
import os.path
|
||||
import codecs
|
||||
import json
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
#----------------------------------------------------------
|
||||
class Database_cl(object):
|
||||
@ -21,7 +22,7 @@ class Database_cl(object):
|
||||
#-------------------------------------------------------
|
||||
self.data = {}
|
||||
self.data['Studenten'] = {}
|
||||
self.data['Lehrende'] = {}
|
||||
self.data['Lehrender'] = {}
|
||||
self.data['Firmen'] = {}
|
||||
self.data['Angebote'] = {}
|
||||
self.ReadAll()
|
||||
@ -45,7 +46,7 @@ class Database_cl(object):
|
||||
def ReadAll(self):
|
||||
#-------------------------------------------------------
|
||||
self.Read('Studenten')
|
||||
self.Read('Lehrende')
|
||||
self.Read('Lehrender')
|
||||
self.Read('Firmen')
|
||||
self.Read('Angebote')
|
||||
|
||||
@ -94,18 +95,27 @@ class Database_cl(object):
|
||||
if(category == 'Studenten'):
|
||||
for angebote in self.data['Angebote']:
|
||||
if(self.data['Angebote'][angebote]['Student'] == id):
|
||||
os.remove(os.path.join('data', 'Angebote', angebote+'.json'))
|
||||
elif(category == 'Lehrende'):
|
||||
try:
|
||||
os.remove(os.path.join('data', 'Angebote', angebote+'.json'))
|
||||
except OSError:
|
||||
pass
|
||||
elif(category == 'Lehrender'):
|
||||
for angebote in self.data['Angebote']:
|
||||
if(self.data['Angebote'][angebote]['Lehrende'] == id):
|
||||
os.remove(os.path.join('data', 'Angebote', angebote+'.json'))
|
||||
if(self.data['Angebote'][angebote]['Lehrender'] == id):
|
||||
try:
|
||||
os.remove(os.path.join('data', 'Angebote', angebote+'.json'))
|
||||
except OSError:
|
||||
pass
|
||||
elif(category == 'Firmen'):
|
||||
for firmen in self.data['Firmen']:
|
||||
if(firmen == id):
|
||||
fn = self.data['Firmen'][firmen]['Name']
|
||||
for angebote in self.data['Angebote']:
|
||||
if(self.data['Angebote'][angebote]['Firma'] == fn):
|
||||
os.remove(os.path.join('data', 'Angebote', angebote+'.json'))
|
||||
try:
|
||||
os.remove(os.path.join('data', 'Angebote', angebote+'.json'))
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
if id in self.data[category]:
|
||||
os.remove(os.path.join('data', category, id+'.json'))
|
||||
@ -113,12 +123,45 @@ class Database_cl(object):
|
||||
|
||||
return status_b
|
||||
|
||||
#-------------------------------------------------------
|
||||
def CheckOfferings(self, id):
|
||||
#-------------------------------------------------------
|
||||
print("Offerings: ", id)
|
||||
for offerings in self.data['Angebote']:
|
||||
if(self.data['Angebote'][offerings]['Student'] != id):
|
||||
return 0
|
||||
else:
|
||||
return 1
|
||||
|
||||
#-------------------------------------------------------
|
||||
def CheckDates(self):
|
||||
#-------------------------------------------------------
|
||||
now = datetime.now()
|
||||
for offerings in self.data['Angebote']:
|
||||
if(self.data['Angebote'][offerings]['ZeitraumBis'] != ''):
|
||||
zeitraumBis = datetime.strptime(self.data['Angebote'][offerings]['ZeitraumBis'], "%d.%m.%Y")
|
||||
if(zeitraumBis <= now):
|
||||
self.data['Angebote'][offerings]['Status'] = 'abgeschlossen'
|
||||
data = {}
|
||||
data['Status'] = 'abgeschlossen'
|
||||
data['id'] = offerings
|
||||
data['Name'] = self.data['Angebote'][offerings]['Name']
|
||||
data['Firma'] = self.data['Angebote'][offerings]['Firma']
|
||||
data['Beschreibung'] = self.data['Angebote'][offerings]['Beschreibung']
|
||||
data['Voraussetzungen'] = self.data['Angebote'][offerings]['Voraussetzungen']
|
||||
data['Firmenbetreuer'] = self.data['Angebote'][offerings]['Firmenbetreuer']
|
||||
data['Lehrender'] = self.data['Angebote'][offerings]['Lehrender']
|
||||
data['ZeitraumVon'] = self.data['Angebote'][offerings]['ZeitraumVon']
|
||||
data['ZeitraumBis'] = self.data['Angebote'][offerings]['ZeitraumBis']
|
||||
data['Student'] = self.data['Angebote'][offerings]['Student']
|
||||
self.Save(data, 'Angebote')
|
||||
|
||||
#-------------------------------------------------------
|
||||
def GetDefault(self, category):
|
||||
#-------------------------------------------------------
|
||||
if(category == 'Studenten'):
|
||||
return {'Name':'', 'Vorname':'', 'Matrikelnummer':''}
|
||||
elif(category == 'Lehrende'):
|
||||
elif(category == 'Lehrender'):
|
||||
return {'Titel':'', 'Name':'', 'Vorname':'', 'Lehrgebiet':''}
|
||||
elif(category == 'Firmen'):
|
||||
return {'Name':'', 'Branche':'', 'Schwerpunkt':'', 'Sitz':'', 'Anzahl Mitarbeiter':''}
|
||||
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
"ZeitraumVon": "01.01.2000",
|
||||
"Beschreibung": "Beschreibung",
|
||||
"Voraussetzungen": "Voraussetzungen",
|
||||
"id": "10",
|
||||
"Firmenbetreuer": "Firmenbetreuer",
|
||||
"ZeitraumBis": "02.02.2000",
|
||||
"Student": "2",
|
||||
"Name": "Name",
|
||||
"Status": "aktuell",
|
||||
"Lehrende": "2",
|
||||
"Firma": "Name"
|
||||
}
|
13
Praktikum2/ppm1/data/Angebote/23.json
Normal file
13
Praktikum2/ppm1/data/Angebote/23.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"Name": "Angebot IBM 1",
|
||||
"ZeitraumBis": "01.01.2018",
|
||||
"id": "23",
|
||||
"Firmenbetreuer": "Sepp Meine",
|
||||
"Firma": "IBM",
|
||||
"Voraussetzungen": "Keine",
|
||||
"Lehrender": "7",
|
||||
"Status": "aktuell",
|
||||
"Beschreibung": "Praxisphasenplatz bei IBM",
|
||||
"ZeitraumVon": "01.01.2017",
|
||||
"Student": "9"
|
||||
}
|
@ -1 +1 @@
|
||||
10
|
||||
25
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"Sitz": "Sitz",
|
||||
"Name": "Name",
|
||||
"id": "2",
|
||||
"Anzahl Mitarbeiter": "10",
|
||||
"Schwerpunkt": "Schwerpunkt",
|
||||
"Branche": "Branche"
|
||||
}
|
8
Praktikum2/ppm1/data/Firmen/4.json
Normal file
8
Praktikum2/ppm1/data/Firmen/4.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "4",
|
||||
"Branche": "IT",
|
||||
"Sitz": "Cupertino",
|
||||
"Schwerpunkt": "Informatik",
|
||||
"Anzahl Mitarbeiter": "110000",
|
||||
"Name": "Apple"
|
||||
}
|
8
Praktikum2/ppm1/data/Firmen/5.json
Normal file
8
Praktikum2/ppm1/data/Firmen/5.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "5",
|
||||
"Branche": "IT",
|
||||
"Sitz": "Redmond",
|
||||
"Schwerpunkt": "Informatik",
|
||||
"Anzahl Mitarbeiter": "114000",
|
||||
"Name": "Microsoft"
|
||||
}
|
8
Praktikum2/ppm1/data/Firmen/6.json
Normal file
8
Praktikum2/ppm1/data/Firmen/6.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "6",
|
||||
"Branche": "IT",
|
||||
"Sitz": "Armonk",
|
||||
"Schwerpunkt": "Elektrotechnik",
|
||||
"Anzahl Mitarbeiter": "377000",
|
||||
"Name": "IBM"
|
||||
}
|
@ -1 +1 @@
|
||||
2
|
||||
6
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"id": "2",
|
||||
"Name": "Name",
|
||||
"Lehrgebiet": "Lehrgebiet",
|
||||
"Titel": "Titel",
|
||||
"Vorname": "Vorname"
|
||||
}
|
@ -1 +0,0 @@
|
||||
2
|
7
Praktikum2/ppm1/data/Lehrender/5.json
Normal file
7
Praktikum2/ppm1/data/Lehrender/5.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"Titel": "Prof",
|
||||
"id": "5",
|
||||
"Lehrgebiet": "Informatik",
|
||||
"Name": "Heiner",
|
||||
"Vorname": "Theodor"
|
||||
}
|
7
Praktikum2/ppm1/data/Lehrender/6.json
Normal file
7
Praktikum2/ppm1/data/Lehrender/6.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"Titel": "Prof Dr",
|
||||
"id": "6",
|
||||
"Lehrgebiet": "Elektrotechnik",
|
||||
"Name": "Anton",
|
||||
"Vorname": "Emanuel"
|
||||
}
|
7
Praktikum2/ppm1/data/Lehrender/7.json
Normal file
7
Praktikum2/ppm1/data/Lehrender/7.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"Titel": "Prof",
|
||||
"id": "7",
|
||||
"Lehrgebiet": "Informatik",
|
||||
"Name": "Adalbert",
|
||||
"Vorname": "Bastian"
|
||||
}
|
7
Praktikum2/ppm1/data/Lehrender/8.json
Normal file
7
Praktikum2/ppm1/data/Lehrender/8.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"Titel": "Dr",
|
||||
"id": "8",
|
||||
"Lehrgebiet": "Elektrotechnik",
|
||||
"Name": "Leberecht",
|
||||
"Vorname": "Egon"
|
||||
}
|
1
Praktikum2/ppm1/data/Lehrender/last.json
Normal file
1
Praktikum2/ppm1/data/Lehrender/last.json
Normal file
@ -0,0 +1 @@
|
||||
8
|
6
Praktikum2/ppm1/data/Studenten/10.json
Normal file
6
Praktikum2/ppm1/data/Studenten/10.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"Vorname": "Timo",
|
||||
"Name": "Ben",
|
||||
"Matrikelnummer": "3",
|
||||
"id": "10"
|
||||
}
|
6
Praktikum2/ppm1/data/Studenten/11.json
Normal file
6
Praktikum2/ppm1/data/Studenten/11.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"Vorname": "Korbinian",
|
||||
"Name": "Moritz",
|
||||
"Matrikelnummer": "6",
|
||||
"id": "11"
|
||||
}
|
6
Praktikum2/ppm1/data/Studenten/12.json
Normal file
6
Praktikum2/ppm1/data/Studenten/12.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"Vorname": "Alfons",
|
||||
"Name": "Meine",
|
||||
"Matrikelnummer": "4",
|
||||
"id": "12"
|
||||
}
|
6
Praktikum2/ppm1/data/Studenten/13.json
Normal file
6
Praktikum2/ppm1/data/Studenten/13.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"id": "13",
|
||||
"Name": "Edmund",
|
||||
"Vorname": "Adalbert",
|
||||
"Matrikelnummer": "1"
|
||||
}
|
6
Praktikum2/ppm1/data/Studenten/14.json
Normal file
6
Praktikum2/ppm1/data/Studenten/14.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"id": "14",
|
||||
"Name": "test",
|
||||
"Vorname": "test",
|
||||
"Matrikelnummer": "2"
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"Name": "Name",
|
||||
"id": "2",
|
||||
"Matrikelnummer": "1234",
|
||||
"Vorname": "Vorname"
|
||||
}
|
6
Praktikum2/ppm1/data/Studenten/9.json
Normal file
6
Praktikum2/ppm1/data/Studenten/9.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"Vorname": "Gregor",
|
||||
"Name": "Klemens",
|
||||
"Matrikelnummer": "2",
|
||||
"id": "9"
|
||||
}
|
@ -1 +1 @@
|
||||
2
|
||||
14
|
@ -40,6 +40,7 @@
|
||||
<input type="hidden" value="" id="Zeitraum" name="ZeitraumVon" />
|
||||
<input type="hidden" value="" id="Zeitraum" name="ZeitraumBis" />
|
||||
<input type="hidden" value="" id="Student" name="Student" />
|
||||
<input type="hidden" value="" id="Lehrender" name="Lehrender" />
|
||||
% for field in data['content']:
|
||||
% if field!='id' and field!='Status' and field!='ZeitraumVon' and field!='ZeitraumBis' and field!='Lehrender' and field!='Student':
|
||||
<div class="clFormRow">
|
||||
|
@ -14,7 +14,7 @@
|
||||
<a href="/index" title="Zurück zur Startseite">Praxisphasenmanager (PPM)</a>
|
||||
</h1>
|
||||
|
||||
<form id="idForm" class="clContent" action="/save/?cat=Angebote" method="POST">
|
||||
<form id="idForm" class="clContent" action="/saveChoice" method="POST">
|
||||
<h2 id="idContentHeader" class="clContentHeader">
|
||||
Praxisphasenangebots Auswahl
|
||||
</h2>
|
||||
@ -31,29 +31,27 @@
|
||||
<label for="Student">Student</label>
|
||||
<select name="Student" form="idForm">
|
||||
% for option in data['Studenten']:
|
||||
% if data['Studenten'][option]['Angebote'] == '0':
|
||||
<option value="${data['Studenten'][option]['id']}">${data['Studenten'][option]['Name']}</option>
|
||||
% endif
|
||||
<option value="${data['Studenten'][option]['id']}">${data['Studenten'][option]['Name']}</option>
|
||||
% endfor
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="clFormRow">
|
||||
<label for="Lehrender">Lehrender</label>
|
||||
<select name="Lehrende" form="idForm">
|
||||
% for option in data['Lehrende']:
|
||||
<option value="${data['Lehrende'][option]['id']}">${data['Lehrende'][option]['Name']}</option>
|
||||
<select name="Lehrender" form="idForm">
|
||||
% for option in data['Lehrender']:
|
||||
<option value="${data['Lehrender'][option]['id']}">${data['Lehrender'][option]['Name']}</option>
|
||||
% endfor
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="clFormRow">
|
||||
<label for="ZeitraumVon">Zeitraum: Von</label>
|
||||
<label for="ZeitraumVon">Zeitraum: Von (D.M.Y)</label>
|
||||
<input type="text" value="" id="ZeitraumVon" name="ZeitraumVon" />
|
||||
</div>
|
||||
|
||||
<div class="clFormRow">
|
||||
<label for="ZeitraumBis">Zeitraum: Bis</label>
|
||||
<label for="ZeitraumBis">Zeitraum: Bis (D.M.Y)</label>
|
||||
<input type="text" value="" id="ZeitraumBis" name="ZeitraumBis" />
|
||||
</div>
|
||||
|
||||
|
@ -17,14 +17,14 @@
|
||||
<h2 id="idContentHeader" class="clContentHeader">Module</h2>
|
||||
<div class="clContentArea">
|
||||
<a href="/category/?cat=Studenten" class="clNavButton">Datenpflege: Studenten</a>
|
||||
<a href="/category/?cat=Lehrende" class="clNavButton">Datenpflege: Lehrende</a>
|
||||
<a href="/category/?cat=Lehrender" class="clNavButton">Datenpflege: Lehrender</a>
|
||||
<a href="/category/?cat=Firmen" class="clNavButton">Datenpflege: Firmenverzeichnis</a>
|
||||
<a href="/category/?cat=Angebote" class="clNavButton">Datenpflege: Praxisphasen</a>
|
||||
|
||||
<a href="/choice" class="clNavButton">Auswahl: Praxisphasen</a>
|
||||
|
||||
<a href="/eval/?cat=Studenten" class="clNavButton">Auswertung: Studenten</a>
|
||||
<a href="/eval/?cat=Lehrende" class="clNavButton">Auswertung: Lehrenden</a>
|
||||
<a href="/eval/?cat=Lehrender" class="clNavButton">Auswertung: Lehrenden</a>
|
||||
<a href="/eval/?cat=Firmen" class="clNavButton">Auswertung: Firmen</a>
|
||||
|
||||
</div>
|
||||
|
@ -24,7 +24,7 @@
|
||||
<tr>
|
||||
% if data['content']!= None:
|
||||
% for heading in data['headings']:
|
||||
% if heading!='id' and heading!='Status' and heading!='ZeitraumVon' and heading!='ZeitraumBis' and heading!='Student' and heading!='Lehrende':
|
||||
% if heading!='id' and heading!='Status' and heading!='ZeitraumVon' and heading!='ZeitraumBis' and heading!='Student' and heading!='Lehrender':
|
||||
<th>${heading}</th>
|
||||
% endif
|
||||
% endfor
|
||||
@ -36,9 +36,17 @@
|
||||
|
||||
% for entries in data['content']:
|
||||
<tr id=${entries}>
|
||||
% if data['category'] == 'Angebote' and data['content'][entries]['Status'] == 'Angebot':
|
||||
% if data['category'] == 'Angebote':
|
||||
% if data['content'][entries]['Status'] == 'Angebot':
|
||||
% for entry in data['content'][entries]:
|
||||
% if entry!='id' and entry!='Status' and entry!='ZeitraumVon' and entry!='ZeitraumBis' and entry!='Student' and entry!='Lehrender':
|
||||
<td id=${entries}>${data['content'][entries][entry]}</td>
|
||||
% endif
|
||||
% endfor
|
||||
% endif
|
||||
% else:
|
||||
% for entry in data['content'][entries]:
|
||||
% if entry!='id' and entry!='Status' and entry!='ZeitraumVon' and entry!='ZeitraumBis' and entry!='Student' and entry!='Lehrende':
|
||||
% if entry!='id':
|
||||
<td id=${entries}>${data['content'][entries][entry]}</td>
|
||||
% endif
|
||||
% endfor
|
||||
|
@ -32,11 +32,22 @@
|
||||
<th>Zeitraum: Bis</th>
|
||||
</tr>
|
||||
% for aktuell in data[firmen]['Angebote']['aktuell']:
|
||||
<td>Aktuell</td>
|
||||
<td>${data[firmen]['Angebote']['aktuell'][aktuell]['Student']}</td>
|
||||
<td>${data[firmen]['Angebote']['aktuell'][aktuell]['Lehrende']}</td>
|
||||
<td>${data[firmen]['Angebote']['aktuell'][aktuell]['ZeitraumVon']}</td>
|
||||
<td>${data[firmen]['Angebote']['aktuell'][aktuell]['ZeitraumBis']}</td>
|
||||
<tr>
|
||||
<td>Aktuell</td>
|
||||
<td>${data[firmen]['Angebote']['aktuell'][aktuell]['Student']}</td>
|
||||
<td>${data[firmen]['Angebote']['aktuell'][aktuell]['Lehrender']}</td>
|
||||
<td>${data[firmen]['Angebote']['aktuell'][aktuell]['ZeitraumVon']}</td>
|
||||
<td>${data[firmen]['Angebote']['aktuell'][aktuell]['ZeitraumBis']}</td>
|
||||
</tr>
|
||||
% endfor
|
||||
% for abgeschlossen in data[firmen]['Angebote']['abgeschlossen']:
|
||||
<tr>
|
||||
<td>Abgeschlossen</td>
|
||||
<td>${data[firmen]['Angebote']['abgeschlossen'][abgeschlossen]['Student']}</td>
|
||||
<td>${data[firmen]['Angebote']['abgeschlossen'][abgeschlossen]['Lehrender']}</td>
|
||||
<td>${data[firmen]['Angebote']['abgeschlossen'][abgeschlossen]['ZeitraumVon']}</td>
|
||||
<td>${data[firmen]['Angebote']['abgeschlossen'][abgeschlossen]['ZeitraumBis']}</td>
|
||||
</tr>
|
||||
% endfor
|
||||
</table>
|
||||
% endif
|
||||
@ -56,22 +67,37 @@
|
||||
<th>Zeitraum: Von</th>
|
||||
<th>Zeitraum: Bis</th>
|
||||
</tr>
|
||||
% for angebote in data[studenten]['Angebote']['aktuell']:
|
||||
<tr>
|
||||
<td>${data[studenten]['Lehrende']}</td>
|
||||
<td>${data[studenten]['Firma']}</td>
|
||||
<td>${data[studenten]['Praxisphase']}</td>
|
||||
<td>${data[studenten]['Status']}</td>
|
||||
<td>${data[studenten]['ZeitraumVon']}</td>
|
||||
<td>${data[studenten]['ZeitraumBis']}</td>
|
||||
<td>${data[studenten]['Angebote']['aktuell'][angebote]['Lehrender']}</td>
|
||||
<td>${data[studenten]['Angebote']['aktuell'][angebote]['Firma']}</td>
|
||||
<td>${data[studenten]['Angebote']['aktuell'][angebote]['Praxisphase']}</td>
|
||||
<td>${data[studenten]['Angebote']['aktuell'][angebote]['Status']}</td>
|
||||
<td>${data[studenten]['Angebote']['aktuell'][angebote]['ZeitraumVon']}</td>
|
||||
<td>${data[studenten]['Angebote']['aktuell'][angebote]['ZeitraumBis']}</td>
|
||||
</tr>
|
||||
% endfor
|
||||
% for angebote in data[studenten]['Angebote']['abgeschlossen']:
|
||||
<tr>
|
||||
<td>${data[studenten]['Angebote']['abgeschlossen'][angebote]['Lehrender']}</td>
|
||||
<td>${data[studenten]['Angebote']['abgeschlossen'][angebote]['Firma']}</td>
|
||||
<td>${data[studenten]['Angebote']['abgeschlossen'][angebote]['Praxisphase']}</td>
|
||||
<td>${data[studenten]['Angebote']['abgeschlossen'][angebote]['Status']}</td>
|
||||
<td>${data[studenten]['Angebote']['abgeschlossen'][angebote]['ZeitraumVon']}</td>
|
||||
<td>${data[studenten]['Angebote']['abgeschlossen'][angebote]['ZeitraumBis']}</td>
|
||||
</tr>
|
||||
% endfor
|
||||
|
||||
|
||||
</table>
|
||||
% endif
|
||||
% endfor
|
||||
% endif
|
||||
|
||||
% if data['category'] == 'Lehrende':
|
||||
% for lehrende in data:
|
||||
% if lehrende != 'category':
|
||||
<h3>${lehrende}</h3>
|
||||
% if data['category'] == 'Lehrender':
|
||||
% for Lehrender in data:
|
||||
% if Lehrender != 'category':
|
||||
<h3>${Lehrender}</h3>
|
||||
<table id="idList">
|
||||
<tr>
|
||||
<th>Student</th>
|
||||
@ -81,15 +107,27 @@
|
||||
<th>Zeitraum: Von</th>
|
||||
<th>Zeitraum: Bis</th>
|
||||
</tr>
|
||||
% if data[lehrende] != NULL:
|
||||
<tr>
|
||||
<td>${data[lehrende]['Student']}</td>
|
||||
<td>${data[lehrende]['Firma']}</td>
|
||||
<td>${data[lehrende]['Praxisphase']}</td>
|
||||
<td>${data[lehrende]['Status']}</td>
|
||||
<td>${data[lehrende]['ZeitraumVon']}</td>
|
||||
<td>${data[lehrende]['ZeitraumBis']}</td>
|
||||
</tr>
|
||||
% if data[Lehrender] != NULL:
|
||||
% for angebote in data[Lehrender]['Angebote']['aktuell']:
|
||||
<tr>
|
||||
<td>${data[Lehrender]['Angebote']['aktuell'][angebote]['Student']}</td>
|
||||
<td>${data[Lehrender]['Angebote']['aktuell'][angebote]['Firma']}</td>
|
||||
<td>${data[Lehrender]['Angebote']['aktuell'][angebote]['Praxisphase']}</td>
|
||||
<td>${data[Lehrender]['Angebote']['aktuell'][angebote]['Status']}</td>
|
||||
<td>${data[Lehrender]['Angebote']['aktuell'][angebote]['ZeitraumVon']}</td>
|
||||
<td>${data[Lehrender]['Angebote']['aktuell'][angebote]['ZeitraumBis']}</td>
|
||||
</tr>
|
||||
% endfor
|
||||
% for angebote in data[Lehrender]['Angebote']['abgeschlossen']:
|
||||
<tr>
|
||||
<td>${data[Lehrender]['Angebote']['abgeschlossen'][angebote]['Student']}</td>
|
||||
<td>${data[Lehrender]['Angebote']['abgeschlossen'][angebote]['Firma']}</td>
|
||||
<td>${data[Lehrender]['Angebote']['abgeschlossen'][angebote]['Praxisphase']}</td>
|
||||
<td>${data[Lehrender]['Angebote']['abgeschlossen'][angebote]['Status']}</td>
|
||||
<td>${data[Lehrender]['Angebote']['abgeschlossen'][angebote]['ZeitraumVon']}</td>
|
||||
<td>${data[Lehrender]['Angebote']['abgeschlossen'][angebote]['ZeitraumBis']}</td>
|
||||
</tr>
|
||||
% endfor
|
||||
% endif
|
||||
</table>
|
||||
% endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user