Wiki-Quellcode von Checks
Version 7.1 von Holger Engels am 2023/12/16 15:38
Zeige letzte Bearbeiter
author | version | line-number | content |
---|---|---|---|
1 | {{velocity}} | ||
2 | #set($c = 0) | ||
3 | #set($noID = []) | ||
4 | #set($noLoesung = []) | ||
5 | #set($noKompetenzen = []) | ||
6 | #set($noQuelle = []) | ||
7 | #set($noLizenz = []) | ||
8 | #set($noZeit = []) | ||
9 | #set($reference = $services.model.resolveDocument('Main.WebHome')) | ||
10 | #set($referenceWithLocale = $services.model.createDocumentReference($reference, $xcontext.locale)) | ||
11 | #set($page = $xwiki.getDocument($referenceWithLocale)) | ||
12 | #foreach( $m in $page.getXDOM().getBlocks('class:MacroBlock', 'DESCENDANT')) | ||
13 | #if($m.getId() == "bpe" || $m.getId() == "aufgabenseite") | ||
14 | #if($m.getId() == "bpe") | ||
15 | #set($id = $m.parameters.nummer.replace(".", "_")) | ||
16 | #set($link = $m.parameters.ordner + ".BPE_" + $id + ".WebHome") | ||
17 | #else | ||
18 | #set($id = $m.parameters.seite) | ||
19 | #set($link = $m.parameters.ordner + "." + $id + ".WebHome") | ||
20 | #end | ||
21 | #set($doc = $xwiki.getDocument($link)) | ||
22 | #foreach($m in $doc.getXDOM().getBlocks('class:MacroBlock', 'DESCENDANT')) | ||
23 | #if($m.getId() == "aufgabe") | ||
24 | #set($c = $c + 1) | ||
25 | #if(!$m.parameters.id)#set($lala=$noID.add({'page': $link})) | ||
26 | #else | ||
27 | #set($ll = $doc.space + ".Lösung " + $m.parameters.id + ".WebHome") | ||
28 | #if($xwiki.getDocument($ll).isNew())#set($lala=$noLoesung.add({'page': $link, 'id' : $m.parameters.id}))#end | ||
29 | #end | ||
30 | #if(!$m.parameters.kompetenzen)#set($lala=$noKompetenzen.add({'page': $link, 'id' : $m.parameters.id}))#end | ||
31 | #if(!$m.parameters.quelle)#set($lala=$noQuelle.add({'page': $link, 'id' : $m.parameters.id}))#end | ||
32 | #if(!$m.parameters.lizenz && !$m.parameters.cc)#set($lala=$noLizenz.add({'page': $link, 'id' : $m.parameters.id}))#end | ||
33 | #if(!$m.parameters.zeit && !$m.parameters.cc)#set($lala=$noZeit.add({'page': $link, 'id' : $m.parameters.id}))#end | ||
34 | #end | ||
35 | #end | ||
36 | #end | ||
37 | #end | ||
38 | **Anzahl Aufgaben** $c | ||
39 | |||
40 | **Keine ID** ($noID.size()) | ||
41 | #if($noID.size() != 0) | ||
42 | #set($first=true) | ||
43 | #foreach($l in $noID)#if(!$first),#else#set($first=false)#end [[$l.page]]#end | ||
44 | #else - #end | ||
45 | |||
46 | **Keine Lösung** ($noLoesung.size()) | ||
47 | #if($noLoesung.size() != 0) | ||
48 | #set($first=true) | ||
49 | #foreach($l in $noLoesung)#if(!$first),#else#set($first=false)#end [[$l.id>>$l.page||anchor="$l.id"]]#end | ||
50 | #else - #end | ||
51 | |||
52 | **Keine Kompetenzen** ($noKompetenzen.size()) | ||
53 | #if($noKompetenzen.size() != 0) | ||
54 | #set($first=true) | ||
55 | #foreach($l in $noKompetenzen)#if(!$first),#else#set($first=false)#end [[$l.id>>$l.page||anchor="$l.id"]]#end | ||
56 | #else - #end | ||
57 | |||
58 | **Keine Quelle** ($noQuelle.size()) | ||
59 | #if($noQuelle.size() != 0) | ||
60 | #set($first=true) | ||
61 | #foreach($l in $noQuelle)#if(!$first),#else#set($first=false)#end [[$l.id>>$l.page||anchor="$l.id"]]#end | ||
62 | #else - #end | ||
63 | |||
64 | **Keine Lizenz** ($noLizenz.size()) | ||
65 | #if($noLizenz.size() != 0) | ||
66 | #set($first=true) | ||
67 | #foreach($l in $noLizenz)#if(!$first),#else#set($first=false)#end [[$l.id>>$l.page||anchor="$l.id"]]#end | ||
68 | #else - #end | ||
69 | |||
70 | **Keine Bearbeitungszeit** ($noZeit.size()) | ||
71 | #if($noZeit.size() != 0) | ||
72 | #set($first=true) | ||
73 | #foreach($l in $noZeit)#if(!$first),#else#set($first=false)#end [[$l.id>>$l.page||anchor="$l.id"]]#end | ||
74 | #else - #end | ||
75 | {{/velocity}} |