Do you have a question?

Enter one or more keywords and find the answer!

Generating Teacher Report or Unique Letter of Assignment via ODT template.

This mini-guide on generating reports from teacher master records via .odt template is divided into the following paragraphs:

  1. INTRODUCTION
  2. PLACEHOLDER DEFINITION
  3. PLACEHOLDER LISTS
  4. PLACEHOLDERS IN TABLES
  5. CONDITIONAL BLOCKS
  6. FILTERS
  7. LIST OF AVAILABLE PLACE CARDS
  8. UPLOADING ODT TEMPLATE TO SYSTEM
  9. USE OF THE CONTRACT TEMPLATE


1. INTRODUCTION

In the direction of allowing the individual school autonomous management of certificates, certificates, reports and other documents, the system allows for the preparation and activation of documents in total autonomy, which will then be exportable for each course and for each student enrolled in the courses.
The report will have to be a template in .odt format, i.e., OpenOffice, the content will be able to integrate dynamic content through the use of placeholders responsive to a predefined syntax, being able to choose from an extensive list of entities and attributes that will allow documents of various types to be generated.
The system will also allow access to custom fields of courses and users, or to insert tables to list enrollees, with a rather simple syntax, allowing rather rich documents to be generated.

The generation of a report from odt template enables the generation of documents in Open Document Text format (ODF text document, .odt extension), containing dynamic information, using an .odt file, called a template, in which appropriate placeholders are inserted, which, in the final generated document, will be replaced by the value indicated by the placeholder.

WARNING: template refers, in the context of this documentation, to a normal .odt file containing placeholders, the file must be in ODF text document format, extension .odt.

The template for generating the final document, to be uploaded when setting up the report, is a normal odt document, and where there is text, a placeholder can be inserted there, within the normal text flow, even within a table.

This type of report can be linked to a course, to a student in a course, or to a teacher in a course and allows for the generation of certificates, certificates, and reports on the course; it can also be linked to a student in the student registry to generate enrollment forms, for example, or to a teacher in the teacher registry to generate a letter of assignment; another possible use is as a contract template, to be used in order management.

2. DEFINITION OF PLACEHOLDERS

La sintassi per definire un segnaposto è {oggetto.attributo}, il nome dell’oggetto è la parte del nome a sinistra del punto, il nome dell’attributo è la parte a destra del punto; quindi, ad esempio, per mostrare nel documento finale il nome del corso si usa {course.name}, per mostrare la sede del corso si usa {location.location}.

If the name of the object is plural, in English, it means that it is a list of values, which can be used within a table or to create a list of values in the final document, using an appropriate syntax to indicate the beginning and end of the list; the list of placeholders below indicates when a placeholder is a list.

Some placeholders, e.g. course, students, students, teachers, possess an attribute that has a different behavior, the customfields attribute, the syntax of which is {object.customfields[code]}, which is used to show the value of a custom field, e.g., to show the value of the custom field of the course with code _LEVEL, we use {course.customfields[LEVEL]}.

To summarize, if we wanted to show the name, code, location, and custom field LEVEL, of the course:

{course.name}

{course.code}

{location.location}

{course.customfields[_LEVEL]}

3. LISTS OF PLACEHOLDERS

The syntax for using a list of values, involves indicating where the list begins and where it ends; in the block of text enclosed between the two markers, placeholders are inserted to show the values of each list item, for example, to list the full names and email address of each student in the course:

[!-- BEGIN students --]

{students.fullName} {students.email}

[!-- END students --]

the line between [!-- BEGIN students --] e [!-- END students --] will be repeated for each student, in the final document.

Two special placeholders are available for each list item, _position, the position of the item in the list, and _total, the total number of items in the list.

4. PLACEHOLDERS IN TABLES

The syntax for using a list of values within a table involves indicating where the table row begins and where it ends; in the block of text enclosed between the two markers, placeholders are inserted to show the values of each item in the list, e.g., to list the full names, email address, and mobile phone of each student in the course, within a table:

[!-- BEGIN row.students --]

{students.fullName}
{students.email}
{students.mobile}

[!-- END row.students --]

the table row between [!-- BEGIN row.students --] e [!-- END row.students --] will be repeated for each student, in the table of the final document.

5. CONDITIONAL BLOCKS

The conditional block is a part of the document, delimited by appropriate markers, with which a condition is associated, which can be true or false; if true, the contents of the block are included in the final document; if false, the contents of the block are removed from the final document.

One of the defined custom fields or the conditions given in the CONDITION section of the list of available placeholders can be used as a condition for the block.
The condition using a custom field is true if the field is valorized, it is false if it is empty.

The syntax for defining the conditional block involves stating the beginning and end of the block, indicating the associated condition, e.g., to define a conditional block to be shown only if the order is discounted:

[!-- IF order.isDiscounted --]

Sconto: {order.discount}

[!-- ENDIF order.isDiscounted --]

order.isDiscounted is the condition, if it is true the order is discounted and the discount applied is shown, if it is false the order is not discounted and the discount line will not be included in the final document.

You can reverse the condition check by adding NOT to the syntax to define the conditional block, for example, to define a conditional block to be shown only if the order is not discounted:

[!-- IF NOT order.isDiscounted --]
Discount not applicable.
[!-- ENDIF NOT order.isDiscounted --]

order.isDiscounted is the condition, if it is true the order is discounted and the text "Discount not applicable" will not be shown in the final document, if it is false the order is not discounted and therefore the text "Discount not applicable" will be shown in the final document.

To use a custom field as a condition use the following syntax:

[!-- IF student.customfields[CERTIFICAZIONI] --]
Certifications: {student.customfields[CERTIFICATIONS]}
[!-- ENDIF student.customfields[CERTIFICAZIONI] --]

the row within the block will be shown only the student's certifications have been indicated, that is, if the custom field with code CERTIFICATIONS of the student is not empty.

6. FILTERS

Filters allow an operation to be performed that changes the value of the individual placeholder entered in the document and are available for any type of odt report, regardless of section.

The available filters are as follows:

  • cut allows us to limit the length of a text within the given value, for example to limit the length of the course name to a maximum of 5 characters we can use the placeholder {course.name|cut[5]}
  • daysbefore allows us to compute a date earlier than the date of the valorized placeholder, e.g. if we want to get the date corresponding to 2 weeks before the start of the course we can use the placeholder {course.startDate|daysbefore[14]}
  • daysafter allows us to compute a date later than the date of the valorized placeholder, for example if we want to get the date corresponding to 1 week after the start of the course we can use the placeholder {course.startDate|daysafter[7]}
  • lowercase changes the value of the placeholder to lowercase, for example to show the course name all in lowercase use the placeholder {course.name|lowercase}
  • uppercase changes the value of the placeholder to uppercase, e.g. to show the course name all in uppercase use the placeholder {course.name|uppercase}
  • uppercasefirst changes the value of the placeholder by capitalizing the first letter, e.g. to show the course name with the first letter capitalized use the placeholder {course.name|uppercasefirst}

If two versions of the same placeholder are needed in the document, one filtered and one unfiltered, simply add a _ (underscore) to the second occurrence of the placeholder, e.g., use {course.name|cut[5]} to show the abbreviated course name and {course_.name} to show the full course name later.

7. LIST OF AVAILABLE PLACEHOLDERS

Branch placeholders

Data related to the School branch, for management systems that manage more than one branch.
SIGNAGEVALUENOTES
{branch.code}branch code
{branch.description}branch description
{branch.name}branch name

Placeholder report

Report data
SIGNAGEVALUENOTES
{report.parameters[name]}possible parameter of the report

Placeholder configuration

Configuration data
SIGNAGEVALUENOTES
{configuration.settinga[name]}configuration parameter value

Placeholder currentDate

data for the current date
SIGNAGEVALUENOTES
{currentDate.date}current date
{currentDate.day}current day01 to 31
{currentDate.year}current year
{currentDate.month}current month1 to 12
{currentDate.monthName}current month name
{currentDate.weekDay}day of the week

Teacher placeholder master data

Teacher data available in the teacher master data section
SIGNAGE
VALUE
NOTES
{teacher.address}
address
{teacher.birthdate}
date of birth
{teacher.birthday}birthday
{teacher.birthplace}place of birth
{teacher.birthprovince}province of birth
{teacher.cap}zip code
{teacher.city}city
{teacher.country}country
{teacher.countryCode}country iso code
{teacher.citizenship}citizenship
{teacher.passport}passport
{teacher.profession}profession
{teacher.qualification}qualification
{teacher.customfields[]}
custom fieldThe custom field code should be indicated between the square brackets
{teacher.email}
email
{teacher.fullName}
call sign
{teacher.gender}
genre
{teacher.maritalstatus}marital status
{teacher.id}
identifier
{teacher.mobile}mobile phone
{teacher.pec}certified e-mail address
{teacher.phone}
landline
{teacher.province}
province
{teacher.name}
name
{teacher.surname}
surname
{teacher.alias}AliasIf present in teacher master data
{teacher.taxcode}
tax code
{teacher.vatnumber}
VAT number
{teacher.cardnumber}
number of the card, if any
{teacher.notes}notes
CONDITIONVALUENOTES
teacher.isAdulttrue if the teacher is of age, false otherwise
teacher.isNotAdulttrue if the teacher is a minor, false otherwise
{teacher.subjects}concatenated list of the teacher's planned subjectsExample:
Math, Italian, English Language

TeachingYear placeholders

data for the school year
SIGNAGEVALUENOTES
{teachingYear.endDate}final date
{teachingYear.firstLesson}first lesson date
{teachingYear.lastLesson}last lecture date
{teachingYear.name}name academic year
{teachingYear.startDate}start date

TeachingYear placeholders (if divided into periods)

Data on the periods into which the school year is divided
SIGNAGEVALUENOTES
{teachingYear.firstPeriod}first period name
{teachingYear.firstPeriodStartDate}starting date first period
{teachingYear.firstPeriodEndDate}end date first period
{teachingYear.secondPeriod}second period name
{teachingYear.secondPeriodStartDate}starting date second period
{teachingYear.secondPeriodEndDate}final date second period
{teachingYear.thirdPeriod}third period name
{teachingYear.thirdPeriodStartDate}starting date third period
{teachingYear.thirdPeriodEndDate}final date third period
{teachingYear.fourthPeriod}name fourth period
{teachingYear.fourthPeriodStartDate}starting date fourth period
{teachingYear.fourthPeriodEndDate}final date fourth period

Engclasses placeholders

Data on the courses selected for sending the unique teacher assignment letter. List
SIGNAGEVALUENOTES
{engclasses.booksTitleList}textbookseach title is separated by comma from the next, not valued if course model
{engclasses.code}course code
{engclasses.customfields[]}custom fieldin square brackets should be the custom field code, valorized only if it is a course, not valorized in case of course template
{engclasses.endDate}end datenot valued if course model
{engclasses.hours}total lecture hours of the course
{engclasses.lessons}number of lessons
{engclasses.name}course name
{engclasses.startDate}course start datenot valued if course model
{engclasses.subject}course subjectvalued only if single subject course
{engclasses.teachingYear}academic yearnot valued if course model
{engclasses.courseTeacherHourlyFee}Lecturer's compensation in the courseFee set in the Course tab.
{engclasses.internalStartLevel}Internal starting level of the courseValued if level entered in course outline
{engclasses.internalStartLevelFirstPart}Internal starting level of the course first partEx A1.1 - Beginner. The part before the line is returned - : "A1.1"
{engclasses.internalStartLevelSecondPart}Internal starting level of the course second partEx A1.1 - Beginner. The second part after the line - : "Beginner" is returned.
{engclasses.internalStartLevelDescription}description of the internal level of initiation
{engclasses.internalEndLevel}Internal arrival level of the courseValued if level entered in course outline
{engclasses.internalEndLevelFirstPart}Internal end-of-course level first partEx A1.1 - Beginner. The part before the line is returned - : "A1.1"
{engclasses.internalEndLevelSecondPart}Internal end-of-course level second partEx A1.1 - Beginner. The second part after the line - : "Beginner" is returned.
{engclasses.internalEndLevelDescription}description of the internal arrival level
{engclasses.certificateStartLevel}Certified starting course levelValued if level entered in course outline
{engclasses.certificateEndLevel}Certified course arrival levelValued if level entered in course outline
{engclasses.studentsFullNameList}student list, the separator is the comma
{engclasses.enrolledStudents}number of students enrolled
{engclasses.plannedHours}planned class hours
{engclasses.lessonsPerWeek}number of lessons per week, set only if regular course
{engclasses.lessonsWeekDay}day of class week, set only if regular course and 1 class per week
{engclasses.lessonsWeekSchedule}classes, days of the week and scheduleValued if more than one class per week, not valued if course model
{engclasses.lessonsStartTime}class start time, set only if regular course
{engclasses.lessonsEndTime}class end time, set only if regular course
{engclasses.locationName}name of the venue where the course is held
{engclasses.locationCompleteAddress}Address of the venue where the course is held
{engclasses.cost}course cost
{engclasses.costIfInstallments}cost in case of payment in installments
{engclasses.installmentsNumber}Number of installments under the installment plan, if any
{engclasses.firstInstallmentAmount}First installment amount of any installment plan
{engclasses.firstInstallmentDate}first installment date of any installment plan
{engclasses.firstInstallmentDay}day first installment of any installment plan
{engclasses.firstInstallmentMonth}month first installment of any installment plan
{engclasses.installmentsAdvanceAmount}amount paid in advance
{engclasses.model}template name used to create the course
{engclasses.lessonsDuration}lesson duration, set only if regular course, in minutes
{engclasses.courseTeacherTotalHours}Hours of classes for which the Lecturer has been assigned.

8. UPLOADING ODT TEMPLATE TO SYSTEM

To enter the report template into the system navigate to Configuration → Reports and click the "Add Report".
From the next screen fill in the following fields:

  • Name*: the name of the report
  • Description: any description of the report
  • Report type: choose the "From odt template" option to be able to upload your own template
  • Section in which to show the report *: Teachers
  • Template extension: OpenOffice Write (.odt)
  • Report template: upload the template with odt extension of your report
  • Select type: select the type of file extension that the report should have when exporting it, being able to choose from:
    • OpenOffice Write (.odt)
    • Portable Document Format (.pdf)
  • Order *: the order in which the reports are listed (e.g. 1, 2, 3, etc.)

Click the "Add report" to save the operation.

After uploading the template, go into editing the template (by clicking the icon with the edit stick) and check the "Enabled" to enable the export of the report from the courses and click one of the two buttons at the bottom of the page to save the operation.

Finally, click the icon on the row of the uploaded template to enable administrative accounts that will be able to view and export the report from courses or enrolled students.

9. USE OF REPORTS

To export a teacher's report, navigate to the menu item Master Data → Teachers and click on the name of the master record.

From the next pop-up shown by the system, choose the report via its drop-down menu (in case more than one report has been uploaded) and click the "Download" button to perform the export.

Leave a comment

You must be logged in to leave a comment.