fast fertig

This commit is contained in:
darthsandmann 2016-11-17 00:28:30 +01:00
parent d315cd1009
commit 50f239ad08
28 changed files with 553 additions and 71 deletions

Binary file not shown.

View File

@ -35,12 +35,26 @@ class Application_cl(object):
return self.GenerateList(cat) return self.GenerateList(cat)
@cherrypy.expose @cherrypy.expose
#-------------------------------------------------------
def choice(self):
#-------------------------------------------------------
print("Choice \n")
return self.GenerateListChoice()
@cherrypy.expose
#-------------------------------------------------------
def eval(self, cat):
#-------------------------------------------------------
print("Eval \n")
return self.GenerateListEval(cat)
@cherrypy.expose
#------------------------------------------------------- #-------------------------------------------------------
def detail(self, cat=None, id=None): def detail(self, cat=None, id=None):
#------------------------------------------------------- #-------------------------------------------------------
if(cat!=None): if(cat!=None):
if(id!=None): if(id!=None):
print("ID!=None Cat=", cat, " id=", id) print("Cat=", cat, " id=", id)
return self.GenerateDetail(cat, id) return self.GenerateDetail(cat, id)
else: else:
print("ID=None Cat=", cat) print("ID=None Cat=", cat)
@ -49,6 +63,14 @@ class Application_cl(object):
return self.GenerateIndex() return self.GenerateIndex()
@cherrypy.expose @cherrypy.expose
#-------------------------------------------------------
def detailchoice(self, id):
#-------------------------------------------------------
print("id=", id)
return self.GenerateDetailChoice(id)
@cherrypy.expose
#------------------------------------------------------- #-------------------------------------------------------
def save(self, cat=None, **data): def save(self, cat=None, **data):
#------------------------------------------------------- #-------------------------------------------------------
@ -91,29 +113,114 @@ class Application_cl(object):
data['headings'] = {} data['headings'] = {}
data['category'] = category data['category'] = category
data['content'] = self.db.data[category] data['content'] = self.db.data[category]
print(data, "\n")
if(len(data['content']) != 0): if(len(data['content']) != 0):
print(len(data['content'])) print(len(data['content']))
contentFirst = list(data['content'].keys())[0] contentFirst = list(data['content'].keys())[0]
data['headings'] = list(data['content'][contentFirst].keys()) data['headings'] = list(data['content'][contentFirst].keys())
print(data, "\n") print(data)
return self.view.CreateList(data) return self.view.CreateList(data)
#-------------------------------------------------------
def GenerateListChoice(self):
#-------------------------------------------------------
data = {}
data['content'] = {}
offerings = self.db.data['Angebote']
for key, value in offerings.items():
for key2, value2 in value.items():
if(key2 == 'Status'):
if(value2 == 'Angebot'):
data['content'][key] = value
print(data)
return self.view.CreateListChoice(data)
#------------------------------------------------------- #-------------------------------------------------------
def GenerateDetail(self, category, id=None): def GenerateDetail(self, category, id=None):
#------------------------------------------------------- #-------------------------------------------------------
data = {} data = {}
data['category'] = category data['category'] = category
print("Detail",category,id)
if(id != None): if(id != None):
data['id'] = id data['id'] = id
data['content'] = self.db.ReadEntry(category, id) data['content'] = self.db.ReadEntry(category, id)
else: else:
data['id'] = None data['id'] = None
data['content'] = self.db.GetDefault(category) data['content'] = self.db.GetDefault(category)
print(data['content'])
if(category == 'Angebote'):
print("Angebote")
data['Firmen'] = self.db.data['Firmen']
print(data, "\n") print(data, "\n")
return self.view.CreateDetail(data) return self.view.CreateDetail(data)
#-------------------------------------------------------
def GenerateDetailChoice(self, id):
#-------------------------------------------------------
data = {}
data['id'] = id
data = self.db.data['Angebote'][id]
data['Studenten'] = self.db.data['Studenten']
data['Lehrende'] = self.db.data['Lehrende']
print(data, "\n")
return self.view.CreateDetailChoice(data)
#-------------------------------------------------------
def GenerateListEval(self, cat):
#-------------------------------------------------------
data = {}
Studenten = self.db.data['Studenten']
Lehrende = self.db.data['Lehrende']
Firmen = self.db.data['Firmen']
Angebote = self.db.data['Angebote']
data['category'] = cat
if(cat == 'Firmen'):
for keyFirma, valueFirma in Firmen.items():
data[valueFirma['Name']] = {}
data[valueFirma['Name']]['Name'] = valueFirma['Name']
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']
data[valueFirma['Name']]['Angebote'][valueAngebote['Status']][valueAngebote['Name']]['ZeitraumVon'] = valueAngebote['ZeitraumVon']
data[valueFirma['Name']]['Angebote'][valueAngebote['Status']][valueAngebote['Name']]['ZeitraumBis'] = valueAngebote['ZeitraumBis']
elif(cat == 'Studenten'):
for keyStudent, valueStudent in Studenten.items():
data[valueStudent['Name']] = {}
data[valueStudent['Name']]['Name'] = valueStudent['Name']
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[valueLehrende['Name']] = {}
data[valueLehrende['Name']]['Name'] = valueLehrende['Name']
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']
print(data)
return self.view.CreateListEval(data)
#------------------------------------------------------- #-------------------------------------------------------
def GenerateSave(self, dataTmp, category): def GenerateSave(self, dataTmp, category):
#------------------------------------------------------- #-------------------------------------------------------

View File

@ -20,14 +20,12 @@ class Database_cl(object):
def __init__(self): def __init__(self):
#------------------------------------------------------- #-------------------------------------------------------
self.data = {} self.data = {}
self.data['students'] = {} self.data['Studenten'] = {}
self.data['teachers'] = {} self.data['Lehrende'] = {}
self.data['companies'] = {} self.data['Firmen'] = {}
self.data['offerings'] = {} self.data['Angebote'] = {}
self.Read('students') self.ReadAll()
self.Read('teachers')
self.Read('companies')
self.Read('offerings')
#------------------------------------------------------- #-------------------------------------------------------
def Read(self, category): def Read(self, category):
@ -43,10 +41,19 @@ class Database_cl(object):
id = fileName[:-5] id = fileName[:-5]
self.data[category][id] = json.loads(fileContent) self.data[category][id] = json.loads(fileContent)
#-------------------------------------------------------
def ReadAll(self):
#-------------------------------------------------------
self.Read('Studenten')
self.Read('Lehrende')
self.Read('Firmen')
self.Read('Angebote')
#------------------------------------------------------- #-------------------------------------------------------
def ReadEntry(self, category = None, id = None): def ReadEntry(self, category = None, id = None):
#------------------------------------------------------- #-------------------------------------------------------
print("ReadEntry: ", category, id) print("ReadEntry: ", category, id)
self.Read(category)
data = None data = None
if id == None: if id == None:
data = self.data data = self.data
@ -68,14 +75,14 @@ class Database_cl(object):
file = codecs.open(os.path.join('data', category, id+'.json'), 'w', 'utf-8') file = codecs.open(os.path.join('data', category, id+'.json'), 'w', 'utf-8')
file.write(json.dumps(data, indent=3, ensure_ascii=True)) file.write(json.dumps(data, indent=3, ensure_ascii=True))
file.close() file.close()
self.data[category][id] = data self.Read(category)
status_b = True status_b = True
else: else:
data['id'] = self.IdNext(category) data['id'] = self.IdNext(category)
file = codecs.open(os.path.join('data', category, data['id']+'.json'), 'w', 'utf-8') file = codecs.open(os.path.join('data', category, data['id']+'.json'), 'w', 'utf-8')
file.write(json.dumps(data, indent=3, ensure_ascii=True)) file.write(json.dumps(data, indent=3, ensure_ascii=True))
file.close() file.close()
self.data[category][id] = data self.Read(category)
status_b = True status_b = True
return status_b return status_b
@ -84,6 +91,22 @@ class Database_cl(object):
def Delete(self, category, id): def Delete(self, category, id):
#------------------------------------------------------- #-------------------------------------------------------
status_b = False status_b = False
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'):
for angebote in self.data['Angebote']:
if(self.data['Angebote'][angebote]['Lehrende'] == id):
os.remove(os.path.join('data', 'Angebote', angebote+'.json'))
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'))
if id in self.data[category]: if id in self.data[category]:
os.remove(os.path.join('data', category, id+'.json')) os.remove(os.path.join('data', category, id+'.json'))
del self.data[category][id] del self.data[category][id]
@ -93,14 +116,14 @@ class Database_cl(object):
#------------------------------------------------------- #-------------------------------------------------------
def GetDefault(self, category): def GetDefault(self, category):
#------------------------------------------------------- #-------------------------------------------------------
if(category == 'students'): if(category == 'Studenten'):
return {'name':'name', 'vorname':'vorname', 'matrikelnummer':'matrikelnummer'} return {'Name':'', 'Vorname':'', 'Matrikelnummer':''}
elif(category == 'teachers'): elif(category == 'Lehrende'):
return {'titel':'titel', 'name':'name', 'vorname':'vorname', 'lehrgebiet':'lehrgebiet'} return {'Titel':'', 'Name':'', 'Vorname':'', 'Lehrgebiet':''}
elif(category == 'companies'): elif(category == 'Firmen'):
return {'name':'name', 'branche':'branche', 'schwerpunkt':'schwerpunkt', 'sitz':'sitz', 'anzahlMitarbeiter':'anzahlMitarbeiter'} return {'Name':'', 'Branche':'', 'Schwerpunkt':'', 'Sitz':'', 'Anzahl Mitarbeiter':''}
elif(category == 'offerings'): elif(category == 'Angebote'):
return {'name':'name', 'company':'company', 'beschreibung':'beschreibung', 'voraussetzungen':'voraussetzungen', 'firmenbetreuer':'firmenbetreuer'} return {'Name':'', 'Firma':'', 'Beschreibung':'', 'Voraussetzungen':'', 'Firmenbetreuer':'', 'Status':'Angebot', 'Lehrender':'', 'ZeitraumVon':'', 'ZeitraumBis':'', 'Student':''}
#------------------------------------------------------- #-------------------------------------------------------
def IdNext(self, category): def IdNext(self, category):

View File

@ -31,7 +31,22 @@ class View_cl(object):
#------------------------------------------------------- #-------------------------------------------------------
return self.Create('list.tpl', data) return self.Create('list.tpl', data)
#-------------------------------------------------------
def CreateListChoice(self, data):
#-------------------------------------------------------
return self.Create('listChoice.tpl', data)
#-------------------------------------------------------
def CreateListEval(self, data):
#-------------------------------------------------------
return self.Create('listEval.tpl', data)
#------------------------------------------------------- #-------------------------------------------------------
def CreateDetail(self, data): def CreateDetail(self, data):
#------------------------------------------------------- #-------------------------------------------------------
return self.Create('detail.tpl', data) return self.Create('detail.tpl', data)
#-------------------------------------------------------
def CreateDetailChoice(self, data):
#-------------------------------------------------------
return self.Create('detailChoice.tpl', data)

View File

@ -0,0 +1,13 @@
{
"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"
}

View File

@ -0,0 +1 @@
10

View File

@ -0,0 +1,8 @@
{
"Sitz": "Sitz",
"Name": "Name",
"id": "2",
"Anzahl Mitarbeiter": "10",
"Schwerpunkt": "Schwerpunkt",
"Branche": "Branche"
}

View File

@ -0,0 +1 @@
2

View File

@ -0,0 +1,7 @@
{
"id": "2",
"Name": "Name",
"Lehrgebiet": "Lehrgebiet",
"Titel": "Titel",
"Vorname": "Vorname"
}

View File

@ -0,0 +1 @@
2

View File

@ -0,0 +1,6 @@
{
"Name": "Name",
"id": "2",
"Matrikelnummer": "1234",
"Vorname": "Vorname"
}

View File

@ -0,0 +1 @@
2

View File

@ -1 +0,0 @@
0

View File

@ -1 +0,0 @@
0

View File

@ -1 +0,0 @@
35

View File

@ -1 +0,0 @@
0

View File

@ -0,0 +1,36 @@
# Web-Praktikum Gruppe K
## Kai Wansart und Felix Hoster
### 16.11.2016
## Beschreibung der Lösung
### Aufgabe der Anwendung:
Die Praktikumsaufgabe war, eine Ünterstützung der Betreuung von Praxisphasen mit einer Web-Anwendung zu erstellen. Praxisphasen werden
von externen Partnern (Firmen) angeboten, Studenten können diese Angebote nutzen, wenn sie einen Lehrenden als Betreuer
finden
#### Übersicht der fachlichen Funktion
- Datenpflege Studenten: Eine Liste mit allen erstellten Studenten (Name, Vorname, Matrikelnummer)
- Datenpflege Lehrende: Eine Übersicht mit allen Lehrenden (Name, Titel, Lehrgebiet)
- Datenpflege Firmenverzeichniss: Eine Liste mit einer kleinen Übersicht über einzelne Firmen (Schwerpunkt, Sitz, Name, Branche, Mitarbeiteranzahl)
- Datenpflege Praxisphase: Erhält man eine kurze Übersicht über Angebote für die Studenten (Firmenbetreuer, Beschreibung, Name, Voraussetzung, Firma)
- Auswahl Praxisphasen: Dort können die Studenten mit einem Professor sich eine Praxisphase aussuchen
- Auswertung Firma: Hier werden die Firmen bewertet, die ein Angebot für die Praxisphase bewertet
- Auswertung Praxisphasen nach Studenten: Hier sieht man die Bewertung der Studenten über die einzelnen Angebote
- Auswertung Praxisphase nach Betreuern: Hier sieht man die Bewertung der Praxisphasen - Betreuer
## Beschreibung des Servers
#### Zweck
#### Aufbau (Bestandteile der Komponente)
#### Zusammenwirken mit anderen Komponenten
#### API (Programmierschnittstellen), die die Leistung der Komponente anbieten
## Datenablage
Die Daten werden mittels der Kategorie abgespeichert, die als Variable behandelt wird. Mit dieser Variable wird die Datei immer wieder neu gespeichert, wenn etwas gelöscht bzw. geändert wird. Das Format der Datei ist eine JSON-Datei, die im Ordner 'Data' und der darauffolgenden Kategorie abgespeichert wird.
## Konfiguration
## Durchführung und Ergebnis der geforderten Prüfungen

View File

@ -11,10 +11,10 @@ function select(category, mode) {
} }
else else
{ {
if(mode == 0){ if(mode == 0) {
window.location.href = '/detail/?cat=' + category + '&id=' + id; window.location.href = '/detail/?cat=' + category + '&id=' + id;
} }
else { if(mode == 1) {
var result = confirm("Sind Sie sicher, dass der Eintrag gelöscht werden soll?"); var result = confirm("Sind Sie sicher, dass der Eintrag gelöscht werden soll?");
if(result) { if(result) {
window.location.href = '/delete/?cat=' + category + '&id=' + id; window.location.href = '/delete/?cat=' + category + '&id=' + id;
@ -24,6 +24,16 @@ function select(category, mode) {
return false; return false;
} }
} }
if(mode == 2) {
var result = confirm("Sind Sie sicher, dass das Angebot angenommen werden soll?");
if(result) {
window.location.href = '/detailchoice/?id=' + id;
return true;
}
else {
return false;
}
}
} }
} }

View File

@ -188,4 +188,11 @@ body {
left: 250px; left: 250px;
width: 250px; width: 250px;
} }
.clFormRow select {
position: absolute;
top: 0;
left: 250px;
width: 250px;
}
/* EOF */ /* EOF */

View File

@ -16,27 +16,52 @@
<form id="idForm" class="clContent" action="/save/?cat=${data['category']}" method="POST"> <form id="idForm" class="clContent" action="/save/?cat=${data['category']}" method="POST">
<h2 id="idContentHeader" class="clContentHeader"> <h2 id="idContentHeader" class="clContentHeader">
% if data['category'] == 'students': ${data['category']}: Ihre Daten
Studenten: Ihre Daten
% elif data['category'] == 'teachers':
Lehrende: Ihre Daten
% elif data['category'] == 'companies':
Firmen: Ihre Daten
% elif data['category'] == 'offerings':
Angebote: Ihre Daten
% endif
</h2> </h2>
<div id="idContentArea" class="clContentArea"> <div id="idContentArea" class="clContentArea">
<input type="hidden" value="${data['id']}" id="id" name="id" /> <input type="hidden" value="${data['id']}" id="id" name="id" />
% if data['category'] != 'Angebote':
% for field in data['content']: % for field in data['content']:
% if field!='id': % if field!='id' and field!='Status':
<div class="clFormRow"> <div class="clFormRow">
<label for="${field}">${field}</label> <label for="${field}">${field}</label>
<input type="text" value="${data['content'][field]}" id="${field}" name="${field}" /> <input type="text" value=
% if data['content'][field] != field:
"${data['content'][field]}" id="${field}" name="${field}" />
% else:
"" id="${field}" name="${field}" />
% endif
</div> </div>
% endif % endif
% endfor % endfor
% else:
<input type="hidden" value="Angebot" id="Status" name="Status" />
<input type="hidden" value="" id="Zeitraum" name="ZeitraumVon" />
<input type="hidden" value="" id="Zeitraum" name="ZeitraumBis" />
<input type="hidden" value="" id="Student" name="Student" />
% 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">
<label for="${field}">${field}</label>
% if field!='Firma':
<input type="text" value=
% if data['content'][field] != field:
"${data['content'][field]}" id="${field}" name="${field}" />
% else:
"" id="${field}" name="${field}" />
% endif
% else:
<select name="Firma" form="idForm">
% for option in data['Firmen']:
<option value="${data['Firmen'][option]['Name']}">${data['Firmen'][option]['Name']}</option>
% endfor
</select>
% endif
</div>
% endif
% endfor
% endif
<div id="idButtonArea" class="clButtonArea"> <div id="idButtonArea" class="clButtonArea">
<a href="/index" title="Zur&uumlck zur Startseite">Zur&uumlck zur Startseite</a> <a href="/index" title="Zur&uumlck zur Startseite">Zur&uumlck zur Startseite</a>

View File

@ -0,0 +1,68 @@
<!DOCTYPE html>
<html>
<head>
<title>
Praxisphasenmanager (PPM)
</title>
<meta charset="UTF-8" />
<style type="text/css">
@import url("/style.css");
</style>
</head>
<body>
<h1 id="idSiteHeader" class="clSiteHeader">
<a href="/index" title="Zur&uumlck zur Startseite">Praxisphasenmanager (PPM)</a>
</h1>
<form id="idForm" class="clContent" action="/save/?cat=Angebote" method="POST">
<h2 id="idContentHeader" class="clContentHeader">
Praxisphasenangebots Auswahl
</h2>
<div id="idContentArea" class="clContentArea">
<input type="hidden" value="${data['id']}" id="id" name="id" />
<input type="hidden" value="${data['Name']}" id="Name" name="Name" />
<input type="hidden" value="${data['Firma']}" id="Firma" name="Firma" />
<input type="hidden" value="${data['Beschreibung']}" id="Beschreibung" name="Beschreibung" />
<input type="hidden" value="${data['Voraussetzungen']}" id="Voraussetzungen" name="Voraussetzungen" />
<input type="hidden" value="${data['Firmenbetreuer']}" id="Firmenbetreuer" name="Firmenbetreuer" />
<input type="hidden" value="aktuell" id="Status" name="Status" />
<div class="clFormRow">
<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
% 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>
% endfor
</select>
</div>
<div class="clFormRow">
<label for="ZeitraumVon">Zeitraum: Von</label>
<input type="text" value="" id="ZeitraumVon" name="ZeitraumVon" />
</div>
<div class="clFormRow">
<label for="ZeitraumBis">Zeitraum: Bis</label>
<input type="text" value="" id="ZeitraumBis" name="ZeitraumBis" />
</div>
<div id="idButtonArea" class="clButtonArea">
<a href="/index" title="Zur&uumlck zur Startseite">Zur&uumlck zur Startseite</a>
<a href="/choice" title="Zur&uumlck zur &uumlbersicht">Zur&uumlck zur &uumlbersicht</a>
<input type="submit" value="Speichern" />
</div>
</div>
</form>
</body>
</html>

View File

@ -16,21 +16,21 @@
<div class="clContent"> <div class="clContent">
<h2 id="idContentHeader" class="clContentHeader">Module</h2> <h2 id="idContentHeader" class="clContentHeader">Module</h2>
<div class="clContentArea"> <div class="clContentArea">
<a href="/category/?cat=students" class="clNavButton">Datenpflege: Studenten</a> <a href="/category/?cat=Studenten" class="clNavButton">Datenpflege: Studenten</a>
<a href="/category/?cat=teachers" class="clNavButton">Datenpflege: Lehrende</a> <a href="/category/?cat=Lehrende" class="clNavButton">Datenpflege: Lehrende</a>
<a href="/category/?cat=companies" class="clNavButton">Datenpflege: Firmenverzeichnis</a> <a href="/category/?cat=Firmen" class="clNavButton">Datenpflege: Firmenverzeichnis</a>
<a href="/category/?cat=offerings" class="clNavButton">Datenpflege: Praxisphasen</a> <a href="/category/?cat=Angebote" class="clNavButton">Datenpflege: Praxisphasen</a>
<a href="/category/?cat=offeringchoice" class="clNavButton">Auswahl: Praxisphasen</a> <a href="/choice" class="clNavButton">Auswahl: Praxisphasen</a>
<a href="/category/?cat=evalcompanies" class="clNavButton">Auswertung: Firmen</a> <a href="/eval/?cat=Studenten" class="clNavButton">Auswertung: Studenten</a>
<a href="/category/?cat=evalphasestud" class="clNavButton">Auswertung: Praxisphasen nach Studenten</a> <a href="/eval/?cat=Lehrende" class="clNavButton">Auswertung: Lehrenden</a>
<a href="/category/?cat=evalphasetut" class="clNavButton">Auswertung: Praxisphasen nach Betreuern</a> <a href="/eval/?cat=Firmen" class="clNavButton">Auswertung: Firmen</a>
</div> </div>
</div> </div>
</body> </body>
<footer> <footer>
<script type="text/javascript" src="/functions.js"></script> <!--<script type="text/javascript" src="/functions.js"></script>-->
</footer> </footer>
</html> </html>

View File

@ -16,16 +16,7 @@
</h1> </h1>
<div id="idContent" class="clContent"> <div id="idContent" class="clContent">
<h2 id="idContentHeader" class="clContentHeader"> <h2 id="idContentHeader" class="clContentHeader">
&Uumlbersicht &Uumlbersicht: ${data['category']}
% if data['category'] == 'students':
Studenten
% elif data['category'] == 'teachers':
Lehrende
% elif data['category'] == 'companies':
Firmen
% elif data['category'] == 'offerings':
Angebote
% endif
</h2> </h2>
<div id="idContentArea" class="clContentArea"> <div id="idContentArea" class="clContentArea">
@ -33,7 +24,7 @@
<tr> <tr>
% if data['content']!= None: % if data['content']!= None:
% for heading in data['headings']: % for heading in data['headings']:
% if heading!='id': % if heading!='id' and heading!='Status' and heading!='ZeitraumVon' and heading!='ZeitraumBis' and heading!='Student' and heading!='Lehrende':
<th>${heading}</th> <th>${heading}</th>
% endif % endif
% endfor % endfor
@ -45,11 +36,13 @@
% for entries in data['content']: % for entries in data['content']:
<tr id=${entries}> <tr id=${entries}>
% if data['category'] == 'Angebote' and data['content'][entries]['Status'] == 'Angebot':
% for entry in data['content'][entries]: % for entry in data['content'][entries]:
% if entry!='id': % if entry!='id' and entry!='Status' and entry!='ZeitraumVon' and entry!='ZeitraumBis' and entry!='Student' and entry!='Lehrende':
<td id=${entries}>${data['content'][entries][entry]}</td> <td id=${entries}>${data['content'][entries][entry]}</td>
% endif % endif
% endfor % endfor
% endif
</tr id=${entries}> </tr id=${entries}>
% endfor % endfor

View File

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html>
<head>
<title>
Praxisphasenmanager (PPM)
</title>
<meta charset="UTF-8" />
<style type="text/css">
@import url("/style.css");
</style>
</head>
<body>
<h1 id="idSiteHeader" class="clSiteHeader">
<a href="/index" title="Zur&uumlck zur Startseite">Praxisphasenmanager (PPM)</a>
</h1>
<div id="idContent" class="clContent">
<h2 id="idContentHeader" class="clContentHeader">
&Uumlbersicht Praxisphasen Auswahl
</h2>
<div id="idContentArea" class="clContentArea">
<table id="idList">
<tr>
<th>Name</th>
<th>Firma</th>
<th>Beschreibung</th>
<th>Voraussetzungen</th>
<th>Firmenbetreuer</th>
</tr>
% if data['content']!= None:
% for entries in data['content']:
<tr id=${entries}>
<td id=${entries}>${data['content'][entries]['Name']}</td>
<td id=${entries}>${data['content'][entries]['Firma']}</td>
<td id=${entries}>${data['content'][entries]['Beschreibung']}</td>
<td id=${entries}>${data['content'][entries]['Voraussetzungen']}</td>
<td id=${entries}>${data['content'][entries]['Firmenbetreuer']}</td>
</tr id=${entries}>
% endfor
% endif
</table>
</div>
<div id="idButtonArea" class="clButtonArea">
<a href="/index" class="clButton">Startseite</a>
<a class="clButton" onclick="select('', 2)">Annehmen</a>
</div>
</div>
</body>
<footer>
<script src="/functions.js" type="text/javascript"></script>
</footer>
</html>

View File

@ -0,0 +1,108 @@
<!DOCTYPE html>
<html>
<head>
<title>
Praxisphasenmanager (PPM)
</title>
<meta charset="UTF-8" />
<style type="text/css">
@import url("/style.css");
</style>
</head>
<body>
<h1 id="idSiteHeader" class="clSiteHeader">
<a href="/index" title="Zur&uumlck zur Startseite">Praxisphasenmanager (PPM)</a>
</h1>
<div id="idContent" class="clContent">
<h2 id="idContentHeader" class="clContentHeader">
&Uumlbersicht: ${data['category']}
</h2>
<div id="idContentArea" class="clContentArea">
% if data['category'] == 'Firmen':
% for firmen in data:
% if firmen != 'category':
<h3>${firmen}</h3>
<table id="idList">
<tr>
<th>Status</th>
<th>Student</th>
<th>Lehrender</th>
<th>Zeitraum: Von</th>
<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>
% endfor
</table>
% endif
% endfor
% endif
% if data['category'] == 'Studenten':
% for studenten in data:
% if studenten != 'category':
<h3>${studenten}</h3>
<table id="idList">
<tr>
<th>Lehrender</th>
<th>Firma</th>
<th>Praxisphase</th>
<th>Status</th>
<th>Zeitraum: Von</th>
<th>Zeitraum: Bis</th>
</tr>
<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>
</table>
% endif
% endfor
% endif
% if data['category'] == 'Lehrende':
% for lehrende in data:
% if lehrende != 'category':
<h3>${lehrende}</h3>
<table id="idList">
<tr>
<th>Student</th>
<th>Firma</th>
<th>Praxisphase</th>
<th>Status</th>
<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>
% endif
</table>
% endif
% endfor
% endif
</div>
<div id="idButtonArea" class="clButtonArea">
<a href="/index" class="clButton">Startseite</a>
</div>
</div>
</body>
<footer>
<!--<script src="/functions.js" type="text/javascript"></script>-->
</footer>
</html>