Commit 705d3c9c authored by Ådne Karstad's avatar Ådne Karstad
Browse files

feat(T2M): Add styling to tables

parent 0e20f038
......@@ -2,51 +2,26 @@
[module studyplan2TextGenerator('platform:/plugin/tdt4250.spp.model/model/spp.ecore', 'http://www.eclipse.org/emf/2002/Ecore')]
[template public studyplan2TextGenerator(uni : University)]
[template public studyplan2TextGenerator(university : University)]
[comment @main/]
[file (uni.name.concat('.html'), false, 'UTF-8')]
[file (university.name.concat('.html'), false, 'UTF-8')]
<html>
<head>
<title>[uni.name/]</title>
<title>[university.name/]</title>
<meta charset="utf-8"/>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>[uni.name/]</h1>
<h1>[university.name/]</h1>
<label for="programs">Choose program:</label>
<select name="programs" id="programs">
[for (program : Program | uni.programs)]
<option value="[nameToId(program.name)/]">[program.name/]</option>
[/for]
</select>
[generateProgramSelection(university)/]
[for (program : Program | uni.programs)]
<div id="[nameToId(program.name)/]" class="spp-table">
<h2>[program.name/]</h2
<p>[program.name/] is taken over [program.numberOfSemesters/] semesters.</p>
[for (semester : Semester | program.semesters)]
<h3>Semester [semester.semester/]</h3>
<table style="width=80%">
[for (course : Course | semester.selectedCourses)]
<tr>
<th>[course.code/]</th>
<th>[course.name/]</th>
<th>[course.credits/]</th>
<th>[course.level/]</th>
</tr>
[/for]
</table>
[/for]
</div>
[/for]
[for (program : Program | university.programs)]
[generateStudyPlans(program)/]
[/for]
<script src="index.js"></script>
</body>
......@@ -58,3 +33,41 @@
[template public nameToId(name : String)]
[name.trim().toLower().replaceAll(' ', '-')/]
[/template]
[template public generateProgramSelection(university : University)]
<label for="programs">Choose program:</label>
<select name="programs" id="programs">
[for (program : Program | university.programs)]
<option value="[nameToId(program.name)/]">[program.name/]</option>
[/for]
</select>
[/template]
[template public generateStudyPlans(program : Program)]
<div id="[nameToId(program.name)/]" class="spp-table">
<h2>[program.name/]</h2
<p>[program.name/] is taken over [program.numberOfSemesters/] semesters.</p>
[for (semester : Semester | program.semesters)]
<h3>Semester [semester.semester/]</h3>
<table style="width=80%">
<tr>
<th>Code</th>
<th>Name</th>
<th>Credits</th>
<th>Level</th>
</tr>
[for (course : Course | semester.selectedCourses)]
<tr>
<td>[course.code/]</td>
<td>[course.name/]</td>
<td>[course.credits/]</td>
<td>[course.level/]</td>
</tr>
[/for]
</table>
[/for]
</div>
[/template]
......@@ -31,7 +31,8 @@
courses="//@institutes.0/@courses.1 //@institutes.0/@courses.2 //@institutes.0/@courses.6 //@institutes.1/@courses.3 //@institutes.1/@courses.4 //@institutes.1/@courses.5"/>
</programs>
<programs
name="Lektor i Realfag">
name="Lektor i Realfag"
duration="IntegratedMasters">
<semesters
selectedCourses="//@institutes.0/@courses.0 //@institutes.1/@courses.0 //@institutes.1/@courses.3 //@institutes.1/@courses.4"/>
<semesters
......
......@@ -9,412 +9,505 @@
<h1>NTNU</h1>
<label for="programs">Choose program:</label>
<select name="programs" id="programs">
<option value="bachelor-in-it">Bachelor in IT</option>
<option value="lektor-i-realfag">Lektor i Realfag</option>
</select>
<label for="programs">Choose program:</label>
<select name="programs" id="programs">
<option value="bachelor-in-it">Bachelor in IT</option>
<option value="lektor-i-realfag">Lektor i Realfag</option>
</select>
<div id="bachelor-in-it" class="spp-table">
<h2>Bachelor in IT</h2
<p>Bachelor in IT is taken over 6 semesters.</p>
<h3>Semester 1</h3>
<table style="width=80%">
<tr>
<th>TDT4110</th>
<th>Informasjonsteknologi, grunnkurs</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
<tr>
<th>IT2805</th>
<th>Webteknologi</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
</table>
<div id="bachelor-in-it" class="spp-table">
<h2>Bachelor in IT</h2
<p>Bachelor in IT is taken over 6 semesters.</p>
<h3>Semester 2</h3>
<table style="width=80%">
<tr>
<th>TDT4100</th>
<th>Objektorientert programmering</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
<tr>
<th>MA1103</th>
<th>Flerdimensjonal analyse</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
</table>
<h3>Semester 1</h3>
<table style="width=80%">
<tr>
<th>Code</th>
<th>Name</th>
<th>Credits</th>
<th>Level</th>
</tr>
<tr>
<td>TDT4110</td>
<td>Informasjonsteknologi, grunnkurs</td>
<td>7.5</td>
<td>FoundationCourse</td>
</tr>
<tr>
<td>IT2805</td>
<td>Webteknologi</td>
<td>7.5</td>
<td>FoundationCourse</td>
</tr>
</table>
<h3>Semester 3</h3>
<table style="width=80%">
<tr>
<th>TDT4120</th>
<th>Algoritmer og datastrukturer</th>
<th>7.5</th>
<th>IntermediateCourse</th>
</tr>
<tr>
<th>TMA4135</th>
<th>Matematikk 4D</th>
<th>7.5</th>
<th>ThirdYearCourse</th>
</tr>
</table>
<h3>Semester 4</h3>
<table style="width=80%">
</table>
<h3>Semester 2</h3>
<table style="width=80%">
<tr>
<th>Code</th>
<th>Name</th>
<th>Credits</th>
<th>Level</th>
</tr>
<tr>
<td>TDT4100</td>
<td>Objektorientert programmering</td>
<td>7.5</td>
<td>FoundationCourse</td>
</tr>
<tr>
<td>MA1103</td>
<td>Flerdimensjonal analyse</td>
<td>7.5</td>
<td>FoundationCourse</td>
</tr>
</table>
<h3>Semester 5</h3>
<table style="width=80%">
</table>
<h3>Semester 6</h3>
<table style="width=80%">
</table>
<h3>Semester 3</h3>
<table style="width=80%">
<tr>
<th>Code</th>
<th>Name</th>
<th>Credits</th>
<th>Level</th>
</tr>
<tr>
<td>TDT4120</td>
<td>Algoritmer og datastrukturer</td>
<td>7.5</td>
<td>IntermediateCourse</td>
</tr>
<tr>
<td>TMA4135</td>
<td>Matematikk 4D</td>
<td>7.5</td>
<td>ThirdYearCourse</td>
</tr>
</table>
</div>
<div id="lektor-i-realfag" class="spp-table">
<h2>Lektor i Realfag</h2
<p>Lektor i Realfag is taken over 6 semesters.</p>
<h3>Semester 1</h3>
<table style="width=80%">
<tr>
<th>TDT4110</th>
<th>Informasjonsteknologi, grunnkurs</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
<tr>
<th>MA1101</th>
<th>Grunnkurs i analyse I</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
<tr>
<th>TMA4140</th>
<th>Diskret matematikk</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
<tr>
<th>MA1201</th>
<th>Lineær algebra og geometri</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
</table>
<h3>Semester 4</h3>
<table style="width=80%">
<tr>
<th>Code</th>
<th>Name</th>
<th>Credits</th>
<th>Level</th>
</tr>
</table>
<h3>Semester 2</h3>
<table style="width=80%">
<tr>
<th>TDT4100</th>
<th>Objektorientert programmering</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
<tr>
<th>MA1103</th>
<th>Flerdimensjonal analyse</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
<tr>
<th>PPU4601 </th>
<th>Pedagogikk 1</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
<tr>
<th>PPU4611</th>
<th>Praksis 1</th>
<th>0.0</th>
<th>FoundationCourse</th>
</tr>
<tr>
<th>MA1102</th>
<th>Grunnkurs i analyse II</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
</table>
<h3>Semester 3</h3>
<table style="width=80%">
<tr>
<th>TDT4120</th>
<th>Algoritmer og datastrukturer</th>
<th>7.5</th>
<th>IntermediateCourse</th>
</tr>
<tr>
<th>PPU4612</th>
<th>Pedagogikk 2</th>
<th>7.5</th>
<th>IntermediateCourse</th>
</tr>
<tr>
<th>PPU4602</th>
<th>Praksis 2</th>
<th>0.0</th>
<th>IntermediateCourse</th>
</tr>
<tr>
<th>TDT4160</th>
<th>Datamaskiner og digitalteknikk</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
<tr>
<th>TMA4240</th>
<th>Statistikk</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
</table>
<h3>Semester 5</h3>
<table style="width=80%">
<tr>
<th>Code</th>
<th>Name</th>
<th>Credits</th>
<th>Level</th>
</tr>
</table>
<h3>Semester 4</h3>
<table style="width=80%">
<tr>
<th>MA2401</th>
<th>Geometri</th>
<th>7.5</th>
<th>IntermediateCourse</th>
</tr>
<tr>
<th>TDT4145</th>
<th>Datamodellering og databasesystemer</th>
<th>7.5</th>
<th>IntermediateCourse</th>
</tr>
<tr>
<th>TDT4180</th>
<th>Menneskemaskin interkasjon</th>
<th>7.5</th>
<th>IntermediateCourse</th>
</tr>
<tr>
<th>TDT4140</th>
<th>Programvareutvikling</th>
<th>7.5</th>
<th>IntermediateCourse</th>
</tr>
</table>
<h3>Semester 5</h3>
<table style="width=80%">
<tr>
<th>IT1901</th>
<th>Informatikk prosjektarbeid I</th>
<th>7.5</th>
<th>IntermediateCourse</th>
</tr>
<tr>
<th>PPU4613</th>
<th>Praksis 3</th>
<th>0.0</th>
<th>ThirdYearCourse</th>
</tr>
<tr>
<th>PPU4624</th>
<th>Fagdidaktikk - informatikk</th>
<th>7.5</th>
<th>ThirdYearCourse</th>
</tr>
<tr>
<th>PPU4628</th>
<th>Fagdidaktikk - matematikk</th>
<th>7.5</th>
<th>ThirdYearCourse</th>
</tr>
<tr>
<th>TMA4120</th>
<th>Matematikk 4K</th>
<th>7.5</th>
<th>ThirdYearCourse</th>
</tr>
</table>
<h3>Semester 6</h3>
<table style="width=80%">
<tr>
<th>Code</th>
<th>Name</th>
<th>Credits</th>
<th>Level</th>
</tr>
</table>
<h3>Semester 6</h3>
<table style="width=80%">
<tr>
<th>TDT4186</th>
<th>Operativssystemer</th>
<th>7.5</th>
<th>ThirdYearCourse</th>
</tr>
<tr>
<th>IT2901</th>
<th>Informatikk prosjektarbeid II</th>
<th>7.5</th>
<th>ThirdYearCourse</th>
</tr>
<tr>
<th>TDT4240</th>
<th>Programvarearkitektur</th>
<th>7.5</th>
<th>ThirdYearCourse</th>
</tr>
<tr>
<th>TDT4242</th>
<th>Avansert programvareutvikling</th>
<th>7.5</th>
<th>SecoundDegreeCourse</th>
</tr>
</table>
</div>
<div id="lektor-i-realfag" class="spp-table">
<h2>Lektor i Realfag</h2
<p>Lektor i Realfag is taken over 10 semesters.</p>
<h3>Semester 7</h3>
<table style="width=80%">
<tr>
<th>EXPH0300</th>
<th>Examen philosophicum for naturvitenskap og teknologi</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
<tr>
<th>IT2810</th>
<th>Webutvikling</th>
<th>7.5</th>
<th>IntermediateCourse</th>
</tr>
<tr>
<th>IT2805</th>
<th>Webteknologi</th>
<th>7.5</th>
<th>FoundationCourse</th>
</tr>
<tr>
<th>TDT4175</th>
<th>Informasjonssystemer</th>
<th>7.5</th>
<th>ThirdYearCourse</th>
</tr>
<tr>
<th>TDT4117</th>
<th>Informasjonsgjenfinning</th>
<th>7.5</th>
<th>ThirdYearCourse</th>
</tr>
<tr>
<th>TDT4165</th>
<th>Programmeringsspråk</th>
<th>7.5</th>
<th>ThirdYearCourse</th>
</tr>
<tr>
<th>TDT4237</th>
<th>Programvaresikkerhet og personvern</th>
<th>7.5</th>
<th>SecoundDegreeCourse</th>
</tr>
<tr>
<th>TDT4245</th>
<th>Samhandlingsteknologi og sosiale medier</th>
<th>7.5</th>
<th>SecoundDegreeCourse</th>
</tr>
<tr>
<th>TDT4136</th>
<th>Introduksjon til kunstig intelligens</th>
<th>7.5</th>
<th>ThirdYearCourse</th>
</tr>
</table>
<h3>Semester 1</h3>
<table style="width=80%">
<tr>
<th>Code</th>
<th>Name</th>
<th>Credits</th>
<th>Level</th>
</tr>
<tr>
<td>TDT4110</td>
<td>Informasjonsteknologi, grunnkurs</td>
<td>7.5</td>
<td>FoundationCourse</td>
</tr>
<tr>
<td>MA1101</td>
<td>Grunnkurs i analyse I</td>
<td>7.5</td>
<td>FoundationCourse</td>
</tr>
<tr>
<td>TMA4140</td>
<td>Diskret matematikk</td>
<td>7.5</td>
<td>FoundationCourse</td>
</tr>
<tr>
<td>MA1201</td>
<td>Lineær algebra og geometri</td>
<td>7.5</td>
<td>FoundationCourse</td>
</tr>
</table>
<h3>Semester 8</h3>
<table style="width=80%">
<tr>
<th>PPU4614</th>
<th>Praksis 4</th>
<th>0.0</th>
<th>SecoundDegreeCourse</th>
</tr>
<tr>
<th>PPU4603</th>
<th>Pedagogikk</th>
<th>15.0</th>
<th>FoundationCourse</th>
</tr>
<tr>
<th>PPU4614</th>
<th>PPU4625</th>
<th>0.0</th>
<th>SecoundDegreeCourse</th>
</tr>
<tr>
<th>PPU4625</th>
<th>Fagdidaktikk 2 - informatikk</th>
<th>7.5</th>
<th>SecoundDegreeCourse</th>
</tr>
<tr>