Vorlage:Course list entry: Unterschied zwischen den Versionen
Aus International Center for Computational Logic
Markus Krötzsch (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „<noinclude> This template is used to format entries in a list of courses. It creates headlines based on terms/years whenever it encounters a change in term/yea…“) |
Maximilian Marx (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
(19 dazwischenliegende Versionen von 4 Benutzern werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
<noinclude> | <noinclude> | ||
This template is used to format entries in a list of courses. It creates headlines based on terms/years whenever it encounters a change in term/year. This is only useful, obviously, if the data is sorted by term/year in some way. | This template is used to format entries in a list of courses. It creates headlines based on terms/years whenever it encounters a change in term/year. This is only useful, obviously, if the data is sorted by term/year in some way. | ||
The template uses a table layout and has to be terminated by </table> after the last item (which cannot know that it will be last, obviously). | |||
Usage: | Usage: | ||
Zeile 10: | Zeile 12: | ||
| 4 = year | | 4 = year | ||
| 5 = list of modules (separated by ,) | | 5 = list of modules (separated by ,) | ||
| 6 = | | 6 = lecturers (separated by ,) | ||
| 7 = SWS for lectures in this course | | 7 = SWS for lectures in this course | ||
| 8 = SWS for exercises in this course | | 8 = SWS for exercises in this course | ||
| 9 = SWS for practicals in this course | | 9 = SWS for practicals in this course | ||
| #userparam= "/en" (English) or empty (German) | |||
}} | }} | ||
</pre> | </pre> | ||
</noinclude><includeonly> | Example: | ||
{{#ifeq:{{{3}}}{{{4}}}|{{#var:CurrentTerm}}{{#var:CurrentYear}}||<h3>{{{3}}} {{{4}}}</h3>{{#vardefine:CurrentTerm|{{{3}}} }}{{#vardefine:CurrentYear|{{{4}}} }}}} | |||
{{Course list entry | |||
| 1 = page | |||
| 2 = title0 | |||
| 3 = WS | |||
| 4 = 2014 | |||
| 5 = MOD1 | |||
| 6 = Long Cheng | |||
| 7 = 2 | |||
| 8 = 1 | |||
| 9 = 0 | |||
}} | |||
{{Course list entry | |||
| 1 = page | |||
| 2 = title1 | |||
| 3 = WS | |||
| 4 = 2014 | |||
| 5 = MOD1,MOD2,MOD3 | |||
| 6 = Long Cheng | |||
| 7 = 2 | |||
| 8 = 1 | |||
| 9 = 0 | |||
}}{{Course list entry | |||
| 1 = page | |||
| 2 = title2 | |||
| 3 = WS | |||
| 4 = 2014 | |||
| 5 = MOD1,MOD2,MOD3 | |||
| 6 = Long Cheng | |||
| 7 = 2 | |||
| 8 = 1 | |||
| 9 = 0 | |||
}}{{Course list entry | |||
| 1 = page | |||
| 2 = title3 | |||
| 3 = SS | |||
| 4 = 2014 | |||
| 5 = MOD1,MOD2,MOD3 | |||
| 6 = Long Cheng | |||
| 7 = 2 | |||
| 8 = 1 | |||
| 9 = 0 | |||
}}{{Course list entry | |||
| 1 = page | |||
| 2 = title4 | |||
| 3 = SS | |||
| 4 = 2015 | |||
| 5 = MOD1,MOD2,MOD3 | |||
| 6 = Long Cheng | |||
| 7 = 2 | |||
| 8 = 1 | |||
| 9 = 0 | |||
|#userparam=/en | |||
}}{{Course list entry | |||
| 1 = page | |||
| 2 = title5 | |||
| 3 = SS | |||
| 4 = 2015 | |||
| 5 = MOD1,MOD2,MOD3 | |||
| 6 = Long Cheng | |||
| 7 = 2 | |||
| 8 = 1 | |||
| 9 = 0 | |||
}} | |||
</table> | |||
</noinclude><includeonly>{{#ifeq:{{{3}}}{{{4}}}|{{#var:CurrentTerm}}{{#var:CurrentYear}}||{{#ifeq:{{#var:InTable}}|1|</table>|}} | |||
<h3>{{MediaWiki:Portal_label_Semester_{{{3}}}{{{#userparam|}}}}} {{{4}}}</h3>{{#vardefine:CurrentTerm|{{{3}}}}}{{#vardefine:CurrentYear|{{{4}}} }}{{#vardefine:InTable|1}} | |||
| |||
<table class="table"><tr><th>{{MediaWiki:Portal_label_Titel{{{#userparam|}}}}}</th><th>{{MediaWiki:Portal_label_Dozent{{{#userparam|}}}}}</th><th>{{MediaWiki:Portal_label_SWS_Umfang{{{#userparam|}}}}}</th><th>{{MediaWiki:Portal_label_Module{{{#userparam|}}}}}</th></tr>}} | |||
<tr><td>[[{{{1}}}{{{#userparam|}}}|{{{2}}}]]</td><td>{{#arraymap:{{{6}}}|,|@@@|[[@@@{{{#userparam|}}}|@@@]]|, }}</td><td>{{{7}}}/{{{8}}}/{{{9}}}</td><td style="width: 40%;"><small>{{{5}}}</small></td></tr> | |||
</includeonly> | </includeonly> |
Aktuelle Version vom 8. April 2022, 21:30 Uhr
This template is used to format entries in a list of courses. It creates headlines based on terms/years whenever it encounters a change in term/year. This is only useful, obviously, if the data is sorted by term/year in some way.
The template uses a table layout and has to be terminated by after the last item (which cannot know that it will be last, obviously).
Usage:
{{Course list entry | 1 = page name of the course | 2 = course title | 3 = term (WS or SS) | 4 = year | 5 = list of modules (separated by ,) | 6 = lecturers (separated by ,) | 7 = SWS for lectures in this course | 8 = SWS for exercises in this course | 9 = SWS for practicals in this course | #userparam= "/en" (English) or empty (German) }}
Example:
Wintersemester 2014
Titel | Dozent | Umfang (SWS) | Module |
---|---|---|---|
title0 | Long Cheng | 2/1/0 | MOD1 |
title1 | Long Cheng | 2/1/0 | MOD1,MOD2,MOD3 |
title2 | Long Cheng | 2/1/0 | MOD1,MOD2,MOD3 |
Sommersemester 2014
Titel | Dozent | Umfang (SWS) | Module |
---|---|---|---|
title3 | Long Cheng | 2/1/0 | MOD1,MOD2,MOD3 |
Summer term 2015
Title | Lecturer | SWS | Modules |
---|---|---|---|
title4 | Long Cheng | 2/1/0 | MOD1,MOD2,MOD3 |
title5 | Long Cheng | 2/1/0 | MOD1,MOD2,MOD3 |