Show last authors
1 = {{italiano}}Spotlight{{/italiano}}{{english}}Spotlight{{/english}} =
2
3 {{include reference="Courses.Environment" excludeFirstHeading="true"/}}{{velocity}}
4 #set( $courseMenu = true )
5 ## $spotCourseNo has to be an integer
6 #if( $spotCourseNo )
7 #set( $spotCourseNo = $util.parseInt($spotCourseNo) )
8 #end
9 ## user or general spotlight?
10 #if( !$userName || $userName == "" || !$userSpace || $userSpace == "" || !$userFullname || $userFullname == "" )
11 #### START GENERAL SHOWCASE
12 #if( $spotCourseNo && $spotCourseNo > 0 )
13 #set ($sql = ", BaseObject as obj, StringProperty as prop
14 where obj.name = doc.fullName and obj.className = '${objectSpace}.${objectClass}' and obj.name <> '${objectSpace}.${objectTemplate}' and prop.id.id = obj.id and prop.name = 'ay' order by prop.value desc")
15 #set( $courseFound = $xwiki.searchDocuments($sql) )
16 #set( $courseFoundNo = $courseFound.size() )
17 #if( $courseFoundNo > 0 )
18 #if( $courseFoundNo > $spotCourseNo )
19 #set( $n = $spotCourseNo - 1 )
20 #else
21 #set( $n = $courseFoundNo - 1 )
22 #end
23 (% style='border-style:hidden solid solid hidden; border-color:$theme.borderColor' %)#foreach( $i in [0..$n] )|{{course linked='title'}}$courseFound.get($i){{/course}}#end(%%)
24 #end
25 #end
26 #### END GENERAL SPOTLIGHT
27 #else
28 #### START USER SPOTLIGHT
29 ##
30 #if( $spotCourses && $spotCourses != [] )
31 (% style='border-style:hidden solid solid hidden; border-color:$theme.borderColor' %)#foreach( $course in $spotCourses )#if( ( $xwiki.exists("${objectSpace}.$course") || $xwiki.exists("${objectSpace}.${course}.WebHome") ) && ( $foreach.count <= $maxCourseSpot ) )|{{course linked='title'}}$course{{/course}}#end#end(%%)
32 #elseif( $spotCourseNo && $spotCourseNo > 0 )
33 #if( $spotCourseNo > $maxCourseSpot )
34 #set( $spotCourseNo = $maxCourseSpot )
35 #end
36 #set ($sql = ", BaseObject as obj, StringProperty as prop0, LargeStringProperty as prop1
37 where obj.name = doc.fullName and obj.className = '${objectSpace}.${objectClass}' and obj.name <> '${objectSpace}.${objectTemplate}' and prop0.id.id = obj.id and prop1.id.id = obj.id and prop0.name = 'ay' and prop1.name = 'professor' and prop1.value like '%$userName%' order by prop0.value desc")
38 #set( $courseFound = $xwiki.searchDocuments($sql) )
39 #set( $courseFoundNo = $courseFound.size() )
40 #if( $courseFoundNo > 0 )
41 #if( $courseFoundNo > $spotCourseNo )
42 #set( $n = $spotCourseNo - 1 )
43 #else
44 #set( $n = $courseFoundNo - 1 )
45 #end
46 (% style='border-style:hidden solid solid hidden; border-color:$theme.borderColor' %)#foreach( $i in [0..$n] )|{{course linked='title'}}$courseFound.get($i){{/course}}#end(%%)
47 #end
48 #end
49 #### END USER SPOTLIGHT
50 #end
51 {{/velocity}}

Partita IVA: 01131710376 - Copyright © 2008-2022 APICe@DISI Research Group - PRIVACY