Changes for page Per A.Y.

From version 39.1
edited by Andrea Omicini
on 21/01/2022 18:57
Change comment: There is no comment for this version
To version 27.1
edited by Andrea Omicini
on 23/11/2021 01:18
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,5 +1,4 @@
1 -{{include reference="Courses.Environment" excludeFirstHeading="true"/}}{{include reference="Environment" excludeFirstHeading="true"/}}{{velocity}}
2 -#set( $courseMenu = true )
1 +{{include reference="Courses.Environment"/}}{{include reference="Environment"/}}{{velocity}}
3 3  #set( $currentCourseDoc = "" )
4 4  #### get parameters
5 5  ## when
... ... @@ -64,9 +64,7 @@
64 64  ## user takes precedence over both professor and tutor and gets them all
65 65  #if( $userName != "" )#set( $professorName = $userName )#set( $tutorName = $userName )#end
66 66  ##
67 -#if( $firstYearCourse )#set( $firstYear = $firstYearCourse )#end
68 68  #if( $firstYearCou )#set( $firstYear = $firstYearCou )#end
69 -#if( $lastYearCourse )#set( $lastYear = $lastYearCourse )#end
70 70  #if( $lastYearCou )#set( $lastYear = $lastYearCou )#end
71 71  #set( $firstYear1 = $firstYear + 1 )#set( $firstAYear = $firstYear + "/" + $firstYear1 )
72 72  #set( $lastYear1 = $lastYear + 1 )#set( $lastAYear = $lastYear + "/" + $lastYear1 )
... ... @@ -104,6 +104,7 @@
104 104   #set($aYear = $year + "/" + $year1 )
105 105   #end
106 106  #end
104 +
107 107  >{{stringEngIta eng = "Courses" ita = "Corsi"/}} / **#if( $oneYear )$aYear#else$firstAYear**–**$lastAYear#end**#if( $userName != "" ) / $userFirstName $userLastName#elseif( $professorName != "" ) / $professorFirstName $professorLastName#elseif( $tutorName != "" ) / $tutorFirstName $tutorLastName (tutor)#end{{id name="top"/}}
108 108  ##
109 109  #if( !$oneYear )
... ... @@ -110,11 +110,10 @@
110 110  (% style="font-size: smaller; padding:1em 1.5em 0.25em 1.5em; background-color:$theme.highlightColor" %)(((#foreach ($yearr in $yearList)#set($yearr1 = $yearr + 1)#set($ayearr = "$yearr/$yearr1")#if( $velocityCount > 1 ) | #end[[$ayearr>>$doc||anchor=$yearr]]#end)))
111 111  #end
112 112  ##
113 -#if( $xcontext.language== "it" )#set( $sortField = "ita")#else#set( $sortField = "eng")#end
114 114  #set( $courseNo = 0 )
115 115  #foreach( $yearr in $yearList)#set($yearr1 = $yearr + 1)#set($ayearr = $yearr + "/" + $yearr1 )
116 - #set ($sql = ", BaseObject as obj, StringProperty as prop, LargeStringProperty as prop1, LargeStringProperty as prop2, LargeStringProperty as prop3, StringProperty as prop4
117 - where obj.name = doc.fullName and obj.className = 'Courses.CourseClass' and obj.name <> 'Courses.CourseTemplate' and prop.id.id = obj.id and prop1.id.id = obj.id and prop2.id.id = obj.id and prop3.id.id = obj.id and prop4.id.id = obj.id and prop.name = 'ay' and prop1.name = 'professor' and prop2.name = 'otherProfessors' and prop3.name = 'tutors' and prop4.name = '$sortField' and prop.value = '$ayearr' and ( prop1.value like '%$professorName%' or prop2.value like '%$professorName%' or prop3.value like '%$tutorName%' ) order by prop4.value asc ")
113 + #set ($sql = ", BaseObject as obj, StringProperty as prop, LargeStringProperty as prop1, LargeStringProperty as prop2, LargeStringProperty as prop3
114 + where obj.name = doc.fullName and obj.className = 'Courses.CourseClass' and obj.name <> 'Courses.CourseTemplate' and prop.id.id = obj.id and prop1.id.id = obj.id and prop2.id.id = obj.id and prop3.id.id = obj.id and prop.name = 'aY' and prop1.name = 'professor' and prop2.name = 'otherProfessors' and prop3.name = 'tutors' and prop.value like '%$yearr%' and ( prop1.value like '%$professorName%' or prop2.value like '%$professorName%' or prop3.value like '%$tutorName%' ) order by prop.value desc ")
118 118   #set( $courseFound = $xwiki.searchDocuments($sql) )
119 119   #set( $courseYearNo = $courseFound.size() )
120 120   #if( $$courseYearNo >0 )
... ... @@ -123,7 +123,9 @@
123 123  (% style="border-style:solid hidden hidden solid; border-color:$theme.borderColor; text-align:left; font-style:oblique" %)|{{id name='$yearr'/}}[[$ayearr>>$doc||queryString='year=$yearr#if( $userName != "" )&user=$userName#elseif( $professorName != "" )&professor=$professorName#elseif( $tutorName != "" )&tutor=$tutorName#end']]
124 124   #end
125 125   #foreach( $courseDoc in $courseFound )
126 -* {{courseName}}$courseDoc{{/courseName}}
123 + #set( $name = $xwiki.getDocument($courseDoc).display("courseName"))
124 + #set( $nome = $xwiki.getDocument($courseDoc).display("nomeCorso"))
125 +* [[#if( $nome == "" )$name#elseif( $name == "" )$nome#elseif( $context.language.contains('it') )$nome#else$name#end>>$courseDoc]]
127 127   #end
128 128  (% style="#if( !$oneYear )border-style:hidden solid solid hidden; border-color:$theme.borderColor;#end text-align:right; font-style:oblique; font-size:smaller" %)|($courseYearNo #if( $courseYearNo == 1 ){{stringEngIta eng='course in' ita='corso nel'/}}#else{{stringEngIta eng='courses in' ita='corsi nel'/}}#end $ayearr) [[[{{stringEngIta eng='top' ita='in cima'/}}]>>||anchor="top"]] [[[{{stringEngIta eng='bottom' ita='in fondo'/}}]>>||anchor="bottom"]]
129 129   #end