Generation of certificates, course reports, assignment letters and other documents from ODT template
IMPORTANT: The file must be in .odt format and not .doc, so the use of word is not recommended. Instead, it is highly recommended to use Openoffice
This mini guide on generating certificates, certifications, course reports and other documents from .odt template is divided into the following paragraphs:
- INTRODUCTION
- PLACEHOLDER DEFINITION
- PLACEHOLDER LISTS
- PLACEHOLDERS IN TABLES
- CONDITIONAL BLOCKS
- FILTERS
- LIST OF AVAILABLE PLACE CARDS
- UPLOADING ODT TEMPLATE TO SYSTEM
- 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:
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.Placeholder report
Report dataPlaceholder configuration
Configuration dataPlaceholders actualTeacher course sections
course instructor data course section, valued only if the course is taught by only one instructor or the report is by individual instructor, data taken from lesson planningPlaceholders actualTeachers course sections
Course faculty section data, list, data obtained from lesson planningPlaceholder company course section
client company data course sectionCourse placeholders course section
course data course sectionPlaceholder currentDate
data for the current datePlaceholder judgment course section
student's final judgment, valued only if the report is by individual studentPlaceholders judgments course section
final judgment of the course, listFinalJudgment Placeholders
Final grade data according to the teaching period.The corresponding period is defined by the prefix "firstFinalJudgment" "secondFinalJudgments" "thirdFinalJudgment" "fourthFinalJudgment"
FinalJudgments Placeholders
Final grade data according to the teaching period.The corresponding period is defined by the prefix "firstFinalJudgments" "secondFinalJudgments" "thirdFinalJudgments" "fourthFinalJudgments"
Placeholder lesson course section
course lecture informationPlaceholder lessons section
course lecture information, listlessonsProgresses placeholder courses section
Course Lesson Information (Single Student Report), ListPlaceholder lessonsCounter course section
lesson counterPlaceholder location course section
course location informationPlaceholder model course section
course model information course sectionPlannedTeacher placeholders course sections
course instructor data course section, valued only if the course is taught by only one instructor or the report is by individual instructor, data taken from course schedulePlannedTeachers placeholders course sections
Course faculty data course section, list, data taken from course schedulePlaceholders progresses course section
student progress, grades sorted from oldest to most recent, valued only if report is by individual student, listProtocol placeholders course section
protocol numberPlaceholders subjects course section
course study subjects, valued only if the course parameter "Allocate a specific number of hours for each subject" is selected, listPlaceholders teachersubjects course section
course faculty information, valued only if the course parameter "Allocate a specific number of hours for each subject" is selected, listPlaceholder student course section
course section student data, valued only if the report is by individual studentPlaceholders students course section
course section student data, listPlaceholder studyPlan order section
curriculumTeachingYear placeholders
data for the school yearTeachingYear placeholders (if divided into periods)
Data on the periods into which the school year is dividedPlaceholder vote course section
student's most recent grade, valued only if the report is by individual studentPlaceholder votes course section
most recent course grades, listPlaceholders firstPeriodGrades
Educational period data available if report per individual student, grades per subject in the given period, reported only if courses are part of a Plan of Study, list.The corresponding period is defined by the prefix "firstPeriodGrades" "secondPeriodGrades" "thirdPeriodGrades" "fourthPeriodGrades" etc.
8. MODEL UPLOAD 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 (then entering Edit Report will show other settings):
- Name*: the name of the report (e.g. "Final certificate", "Certificate of attendance", "Progress report", etc.)
- Enabled: Leave checked to enable the report
- Visibility: Set whether the Report is visible to all or only to certain administrators.
- 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 *: Course sheet
- Report/export by individual student: if this checkbox is valorized, the report in question will be exportable per individual student enrolled in the course, so as it is explained a little below, in case of individual courses the report can be exported from the course sheet, and in case of a collective course from the section of students enrolled in the course.
- This is a certificate/attestation, to be issued in an unmodifiable version: If checked we should indicate a protocol number (click here for guidance on protocols)
- Template extension: OpenOffice Write (.odt)
- Report template: upload the template with odt extension of your report
- Enable certificate expiration: If enabled the terms for the expiration of the issued Certificate should be specified (click here for guidance on enabling automatic notifications for certificate deadlines):
- Expiration Type: Select Days, Months or Years
- Number: Number of days, months or years before the due date
- Year type: Item that appears only if Years is chosen in Expiration Type. Choose whether the years to be considered are 365 calendar days or whether the certificate is valid until the end of the expiration year.
- Uses customized communication templates: Allows you to select custom Email templates (click here for guidance on creating a custom Email/SMS Template)
- Enable pre-issuance verification: Parameter reserved for developers.
- Send report via email: Indicate whether the report is emailable directly from the Course.
- Report visible to faculty: If checked, the generated report can be viewed and downloaded by Course Lecturers.
- Select type: select the type of file extension that the report that will be exported should have, 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.
9. USE OF REPORTS
In case it is an individual student report (so if the option "Report/export for individual student"), you will be able to export it for each individual course from the course tab by clicking the button in the upper right corner "Report / Export" and choosing the specific report.
In the case of a group course, on the other hand, you will have to enter the section of students enrolled in the course by clicking the icon on the line of the same and click from the next screen the "Report / Export" present on the line of each enrolled student.
In case of report per collective course (thus leaving the checkbox "Report/export by individual student"), for example, a progress report in which the progress of each individual enrolled in the course is summarized via a table, it will be possible to export the report from the course tab by clicking the button in the upper right-hand corner "Report / Export" and choosing the specific report.