Changes for page Spotlight
From version 2.1
edited by Andrea Omicini
on 12/11/2021 10:34
on 12/11/2021 10:34
Change comment:
There is no comment for this version
To version 3.1
edited by Andrea Omicini
on 02/01/2022 01:51
on 02/01/2022 01:51
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,0 @@ 1 -Course Headline - Content
-
... ... @@ -1,3 +1,50 @@ 1 -{{velocity}} 2 -(% style='border-style: hidden solid solid hidden; border-color:$theme.borderColor' %)!!{{english}}Teaching in academia nowadays cannot be kept separated from scientific activity. Linking and relating teaching activities (courses, thesis, …) with the products of scientific activities (publications, projects, …) can work as an expressive and powerful tool to seamlessly connect and empower both teaching and research. Accordingly, this [[Courses>>Courses.WebHome]] space in {{apice/}} aims at providing both students and teachers with a general entry point to university-level courses, as well as a teaching tool for academic researchers.{{/english}}{{italiano}}La didattica universitaria è oggi strettamente connessa con le attività scientifiche. Collegare e correlare attività didattiche (corsi, tesi, …) con i prodotti dell'attività scientifica (pubblicationi, progetti, …) può risultare uno strumento assai espressivo e potente per connetere e potenziare sia la didattica sia la ricerca. Questo spazio dei [[corsi>>Courses.WebHome]] in {{apice/}} intende quindi rispondere a tale esigenza, fornendo un punto d'ingresso generale per studenti e docenti, e al contempo uno strumento per il supporto della didattica per ricercatori universitari.{{/italiano}} 1 += {{italiano}}Spotlight corsi{{/italiano}}{{english}}Course Spotlight{{/english}} = 2 + 3 +{{include reference="Courses.Environment" excludeFirstHeading="true"/}}{{include reference="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 where obj.name = doc.fullName and obj.className = 'Courses.CourseClass' and obj.name <> 'Courses.CourseTemplate' and prop.id.id = obj.id and prop.name = 'ay' order by prop.value desc") 14 + #set( $courseFound = $xwiki.searchDocuments($sql) ) 15 + #set( $courseFoundNo = $courseFound.size() ) 16 + #if( $courseFoundNo > 0 ) 17 + #if( $courseFoundNo > $spotCourseNo ) 18 + #set( $n = $spotCourseNo - 1 ) 19 + #else 20 + #set( $n = $courseFoundNo - 1 ) 21 + #end 22 +(% style='border-style:hidden solid solid hidden; border-color:$theme.borderColor' %)#foreach( $i in [0..$n] )|{{course linked='title'}}$courseFound.get($i){{/course}}#end(%%) 23 + #end 24 + #end 25 +#### END GENERAL SPOTLIGHT 26 +#else 27 +#### START USER SPOTLIGHT 28 +## 29 + #if( $spotCourses && $spotCourses != [] ) 30 +(% style='border-style:hidden solid solid hidden; border-color:$theme.borderColor' %)#foreach( $course in $spotCourses )#if( $xwiki.exists( "Courses.$course") && ($velocityCount <= $maxCourseSpot) )|{{course linked='title'}}$course{{/course}}#end#end(%%) 31 + #elseif( $spotCourseNo && $spotCourseNo > 0 ) 32 + #if( $spotCourseNo > $maxCourseSpot ) 33 + #set( $spotCourseNo = $maxCourseSpot ) 34 + #end 35 + #set ($sql = ", BaseObject as obj, DateProperty as prop0, StringProperty as prop1, LargeStringProperty as prop2, LargeStringProperty as prop3, LargeStringProperty as prop4 36 + where obj.name = doc.fullName and obj.className = 'Courses.CourseClass' and obj.name <> 'Courses.CourseTemplate' and prop0.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 prop0.name = 'endDate' and prop1.name = 'status' and prop2.name = 'supervisors' and prop3.name = 'cosupervisors' and prop4.name = 'contacts' and prop1.value = 'Completed' and ( prop2.value like '%$userName%' or prop3.value like '%$userName%' or prop4.value like '%$userName%' ) order by prop0.value desc") 37 + #set( $courseFound = $xwiki.searchDocuments($sql) ) 38 + #set( $courseFoundNo = $courseFound.size() ) 39 + #if( $courseFoundNo > 0 ) 40 + #if( $courseFoundNo > $spotCourseNo ) 41 + #set( $n = $spotCourseNo - 1 ) 42 + #else 43 + #set( $n = $courseFoundNo - 1 ) 44 + #end 45 +(% style='border-style:hidden solid solid hidden; border-color:$theme.borderColor' %)#foreach( $i in [0..$n] )|{{course linked='title'}}$courseFound.get($i){{/course}}#end(%%) 46 + #end 47 + #end 48 +#### END USER SPOTLIGHT 49 +#end 3 3 {{/velocity}}