Changes for page Per A.Y.
From version 46.1
edited by Andrea Omicini
on 20/07/2023 10:17
on 20/07/2023 10:17
Change comment:
There is no comment for this version
To version 48.3
edited by Andrea Omicini
on 20/07/2023 10:26
on 20/07/2023 10:26
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -7,7 +7,7 @@ 7 7 ## years / personal 8 8 #if( $isUserSpace ) 9 9 #set( $query = ", BaseObject as objPersonalCourse, LargeStringProperty as propUser 10 - where objPersonalCourse.name = doc.fullName and objPersonalCourse.className = '${ objectSpace}.Class' and propUser.id.id = objPersonalCourse.id and propUser.name = 'user' and propUser.value = '$userName' " )10 + where objPersonalCourse.name = doc.fullName and objPersonalCourse.className = '${mainSpace}.Personal.Class' and propUser.id.id = objPersonalCourse.id and propUser.name = 'user' and propUser.value = '$userName' " ) 11 11 #set( $personalCourseDocs = $xwiki.searchDocuments($query) ) 12 12 #if( $personalCourseDocs.size() > 0 ) 13 13 #set( $personalCourseDoc = $xwiki.getDocument($personalCourseDocs[0]) ) ... ... @@ -37,7 +37,7 @@ 37 37 #set( $year1 = $year + 1 ) 38 38 #set( $ayear = $year + "/" + $year1 ) 39 39 #set( $query = ", BaseObject as objCourse, StringProperty as propYear, LargeStringProperty as propProfessor, LargeStringProperty as propOtherprofessors, LargeStringProperty as propTutors 40 - where obj.name = doc.fullName and obj.className = '${ objectSpace}.${objectClass}' and obj.name <> '${objectSpace}.${objectTemplate}' and propYear.id.id = obj.id and propProfessor.id.id = obj.id and propOtherprofessors.id.id = obj.id and propTutors.id.id = obj.id and propYear.name = 'ay' and propProfessor.name = 'professor' and propOtherprofessors.name = 'otherProfessors' and propTutors.name = 'tutors' and propYear.value = '$ayear' #if( $oneUser )and ( propProfessor.value like '%$userName%' or propOtherprofessors.value like '%$userName%' or propTutors.value like '%$userName%' )#end ")40 + where objCourse.name = doc.fullName and objCourse.className = '${mainSpace}.Class' and objCourse.name <> '${objectPool}.Template' and propYear.id.id = objCourse.id and propProfessor.id.id = objCourse.id and propOtherprofessors.id.id = objCourse.id and propTutors.id.id = objCourse.id and propYear.name = 'ay' and propProfessor.name = 'professor' and propOtherprofessors.name = 'otherProfessors' and propTutors.name = 'tutors' and propYear.value = '$ayear' #if( $oneUser )and ( propProfessor.value like '%$userName%' or propOtherprofessors.value like '%$userName%' or propTutors.value like '%$userName%' )#end ") 41 41 ## execute query 42 42 #set( $itemFound = $xwiki.searchDocuments($query) ) 43 43 ## set counters ... ... @@ -60,7 +60,9 @@ 60 60 #end 61 61 <span class="textsecondary"> / </span> 62 62 #if( $oneYear ) 63 - $year 63 + #set( $year1 = $year + 1 ) 64 + #set( $ayear = $year + "/" + $year1 ) 65 + $ayear 64 64 #else 65 65 $firstYear–$lastYear 66 66 #end