Configuring the enrollment contract via 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 configuring the school enrollment contract 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
- EXAMPLES OF USE
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.
If it becomes necessary to insert two identical lists within the same document, it will be possible to do so by inserting an underscore ( _ ) in the placeholder of the second list
[!-- BEGIN students_ --]
{students_.fullName} {students_.email}
[!-- END students_ --]
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.
If it becomes necessary to insert two identical lists within the same document, it will be possible to do so by inserting an underscore ( _ ) in the placeholder of the second list
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 PLACEHOLDERS AVAILABLE FOR CONTRACT TEMPLATES.
Branch placeholders
Data related to the School branch, for management systems that manage more than one branch.Placeholder report
Report dataPlaceholder configuration
Configuration dataPlaceholder company order section
Data of the company issuing the invoice. The companies in question are those configured in the management system under Tax Management → Tax SettingsPlaceholder contractor order section
contractor data available in the order section, if the student is an adult the contractor information is enhanced with the student's data, if the student is a minor the contractor information is enhanced with the parent/guardian's data.Placeholder course order section
course related data order section, placeholder valued only if there is only one course in the order, if there is a course template in the order the data is retrieved from the course templatePlaceholder coursePackets order section
course package data order section, listCourses placeholders order section
course data order section, if course templates are present in the order the data are retrieved from the course templates, listPlaceholder currentDate
data for the current datePlaceholder customerCompany orders section
customer company data order sectionPlaceholder details order section
elements (rows) of the order section, listPlaceholder downPayment orders section
down paymentPlaceholder goodsServices order section
goods/services of the order sections orders, listPlaceholders installments order section
installment payments order section, listPlaceholder lessonPackets order section
class packages of the order sections, listPlaceholder membership order section
order sections membership cardPlaceholder model order section
course template of the order sections, valued if there is only one course template in the orderPlaceholder models order section
course templates of the order sections, list, valued only if there are multiple course templates in the orderPlaceholder order section
order data order sectionsPlaceholder payments order section
payments related to the order sections orders, listPlaceholder packageOffers orders section
cumulative offerings of the order sections, listParentTutor Placeholders
parent/guardian data in the order section, valued only if there is only one student in the order linked to one parent/guardianPlaceholders parentsTutors
data of parents/guardians of the order section, listPlaceholder student order section
order section student data, valued only if there is only one student in the orderSegnaposto students sezione ordini
dati degli studenti dell'ordine sezione ordini, listaPlaceholder 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 divided8. UPLOADING THE CONTRACT TEMPLATE TO THE SYSTEM
To enter the enrollment contract 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 (e.g. "Standard contract", "Summer course contract", "Language course contract", etc.)
- Description: any description of the enrollment contract
- Report type: choose the option "Contract Template" to be able to upload your own template
- Section in which to show the report *: Orders
- Template extension: OpenOffice Write (.odt)
- Report template: upload the contract template in ODT format.
- Select type: select the type of file extension that the contract should have when downloading or sending to the client, 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 line of the uploaded template, to enable the administrative accounts that will be able to use the entered template, either when enrolling or when downloading or sending the contract to the client.
9. USE OF THE MODEL CONTRACT
During the student's enrollment, very simply, it will be possible to choose which contract template to use from those entered and enabled, and then proceed with the ordinary issuance of the order.
Next, navigate to the menu item Financial Management → Order Management, under "Contract Model", the system will indicate the contract template that was chosen when the student was enrolled.
It will then be possible to download the issued order file (in the format chosen during contract template configuration) or send it by email by clicking the icon .
Now, from the next pop-up shown by the system, it will be possible:
- Contract Template: choose to download/send the enrollment contract to the client, using a different template than the one chosen during enrollment, via the relevant drop-down menu. By default, the system pre-selects the contract template chosen during enrollment
- Download: download the membership contract file (in the extension that was chosen during setup, so PDF or ODT)
- Send to client: send the client the enrollment contract via email
10. EXAMPLES OF USE
1. Sample standard contract template