Course, Examination, Student Sectioning, Event, and Administration Reports pages are used to create custom reports that are computed using HQL (Hibernate Query Language) to directly query the database. The creation of such reports requires a working knowledge of UniTime’s database structure and the Hibernate model. There is currently no comprehensive documentation of the database structure, except for the source code. The Hibernate model (i.e., the *.hbm.xml files in the JavaSource folder) is a good starting point. Please contact us at support@unitime.org if you need help with the development of a particular report.
An HQL report can have one or more parameters (such as the current academic session, a department, or a list of subject areas), which the user can specify in the Filter section. A report can be accessed directly from the web page or exported to a CSV (Comma-Separated Values) text file.
Each report, based on its nature, can appear on one or more of the HQL report pages, and requires the appropriate permission to run:
HQLReports Courses
permissionHQLReports Examinations
permissionHQLReports Students
permissionHQLReports Events
permissionHQLReports Administration
permissionIf there are no courses, examinations, student sectioning, or event reports, the appropriate Course, Examination, Student Sectioning, or Event Reports page does not appear in the menu. The Administration Reports page always appears in the menu (if the user has the required permissions). This allows administrative users to create new reports where none exist.
Users with HQLReports Add / Edit / Delete
permissions can create new reports, edit existing reports, or delete them. Some reports may also be available to administrators despite their appearance (they require HQLReports Admin Only permission).
When a report is being created or edited (click the Add New button or Edit when the appropriate report is selected), the following dialog appears.
A report consists of a name, a description, a query, and several flags. It may also contain additional parameters. The flags determine which page the report will be available on and whether it will be accessible to all users who can open the page (those with the appropriate HQLReports
permission) or only to administrators (i.e., users with the HQLReports Admin Only
permission). The query is in the standard HQL format with a few additions:
The query can be parametrized by the current academic session (of the user working with the page) and/or a selected room(s), building(s), subject area(s), and department(s). See the following section for more details.
In column names, _ translates to a space. The first column can contain a unique ID of a class, a scheduling subpart, an instructional offering, a location, an instructor, an examination, or an event. This can make each line clickable, leading to the corresponding detail page.
Additional parameters can be provided.
The parameter %SESSION% is automatically replaced with the unique id of the academic session that the user is working with. If the following parameters are used in the query, the appropriate drop-down will appear on the page, and the ID of the selected item will replace the parameter.
If the plural variant of the parameter is used (i.e., %BUILDINGS%, %ROOMS%, %DEPARTMENTS%, or %SUBJECTS%), a multi-select drop-down is used, and a list of the selected unique IDs replaces the parameter. There is no plural for %PITD%, it is only possible to choose a single point in time data snapshot.
If a user has a department-dependent role (e.g., departmental schedule manager), only associated departments, subject areas, rooms, and buildings will be available in the drop-downs.
Example:
from Department d where d.session.uniqueId = %SESSION% and d.uniqueId in %DEPARTMENTS%
Single value parameters (i.e., %SESSION%, %BUILDING%, %ROOM%, %DEPARTMENT%, and %SUBJECT%) are replaced by the unique id of the selected item, multi value parameters (i.e., %BUILDINGS%, %ROOMS%, %DEPARTMENTS%, and %SUBJECTS%) are replaced by a list (id1, id2, … idn).
The report can also be parameterized by additional parameters. The parameter name is used in the query prefixed with a colon (e.g., :date for a parameter named date). The parameters can be of various types. Basic types are string, boolean, int, long, double, float, short, byte, date, and time. Time is represented as an integer time slot, counted in five-minute increments since midnight.
Report lines can be made clickable, leading to the appropriate detail page. To do so, the first column must return a unique ID with the following label. Such a unique ID column is not displayed in the report.
The reports can be exported to CSV, XLS, or JSON. Besides of the provided Export CSV and Export XLS buttons, the Export API can be used to get the data programmatically.
Back to UniTime Online Documentation | © UniTime 2025 | Content available under GNU Free Documentation License 1.3 |