Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
aSc Timetables application offers powerful school timetabling solution. However its scope is limited just to this area timetabling. Schools typically have other software systems (School Management Systems SMS) for handling student/teacher records, grades, statistics, etc. Some of the data handled in these systems is handled also in aSc Timetables. Purpose of integration is to avoid necessity of duplicate manual input of this data both in SMS and in aSc Timetables. Table of Contents aSc Timetables integration with other systems........................................................................1 Ways of integrating your application/system with aSc Timetables............................................3 API - Integration using aSc Timetables integration API....................................................3 XML - Integration using aSc Timetables XML files..........................................................3 SFF - Special file format - Integration using special SMS file format (or statistics file format) ................................................................................................................................4 DA - Direct access - Integration using direct access of aSc Timetables to your underlying database...............................................................................................................................4 Typical scenarios what to import/export..............................................................................4 Import of basic data.............................................................................................................4 Import of basic data + lessons.............................................................................................4 Export of lessons to SMS....................................................................................................5 Export of timetable to SMS................................................................................................5 Licensing/protection................................................................................................................5 Import/Export data structure.......................................................................................................6 General notes...........................................................................................................................6 ID........................................................................................................................................6 Links between tables, ID and IDS fields.............................................................................6 Expanded ids fields.............................................................................................................7 Required/optional columns.................................................................................................7 Character encoding..............................................................................................................7 Id prefix...............................................................................................................................8 XML file structure..............................................................................................................8 Types...................................................................................................................................9 Options..................................................................................................................................10 Database options...............................................................................................................10 Table options.....................................................................................................................11 Tables........................................................................................................................................12 Basic data..............................................................................................................................12 Global values.....................................................................................................................12 Teachers............................................................................................................................13 Classes...............................................................................................................................14 Subjects.............................................................................................................................15 Classrooms........................................................................................................................16 Students.............................................................................................................................17 Groups...............................................................................................................................18 Days and periods...................................................................................................................20 Days..................................................................................................................................20 Periods...............................................................................................................................20
Lessons..................................................................................................................................21 Lessons..............................................................................................................................22 Group subjects...................................................................................................................24 Class subjects....................................................................................................................25 Timetable..............................................................................................................................26 Cards.................................................................................................................................26 Class timetable..................................................................................................................27 Expanded tables....................................................................................................................28 Group class........................................................................................................................28 Lesson class.......................................................................................................................28 Lesson teacher...................................................................................................................28 Group subject class...........................................................................................................29 Group subject teacher........................................................................................................29
Here user can choose what he wants to do: create new timetable from data in SMS, synchronize timetable data with SMS (e.g. if there was a new teacher added in SMS, it is possible to add it to current timetable), open timetable previously uploaded to SMS and upload current timetable to SMS. Logo on left side and some buttons can be customized. At the moment, we offer API versions for Java, JSP, .NET, ASPX and PHP.
it can be invoked also on already created timetable file in that case, user will be presented with synchronization dialog, where he will see all differences between timetable file and data in XML file and he has some options to resolve these conflicts. For export from aSc Timetables, user will invoke function menu File Export aSc Timetables XML. Then he has to select your XML file exported from your application (this file is needed also for export because it contains information on which data and in which data structure you are interested in). Then aSc Timetables will write data into this XML file (and optionally display synchronization dialog). Now user can invoke Import from aSc Timetables XML function in your SMS application to read this data into your system. To create/read/write aSc Timetables XML you may use aSc Timetables integration API library (available in Java, .NET and PHP).
SFF - Special file format - Integration using special SMS file format (or statistics file format)
This solution is developed by aSc (see note below). This way of integration can be used if there is some standard file format (typically CSV, TXT or XML) used in your SMS or region to transfer required data, or you are willing to develop such as format. In this case, aSc Timetables will contain new command in menu File Import and/or menu File Export to import/export data in this format. To develop this solution, we will need a good description of your file format and also some testing environment (e.g. demo of your application).
DA - Direct access - Integration using direct access of aSc Timetables to your underlying database
This solution is also developed by aSc (see note below). It can be used in situations where it is possible to directly access your database (e.g. MySQL, MSSQL, Access MDB, dBase DBF files, etc...). We will need some testing environment (e.g. demo of your SMS), description of how to connect to your database, documentation on your tables and for export also documentation on how to create new rows in your tables or which rows can be deleted and how. Note to solutions SFF and DA: These solutions may need extensive single purpose development on aSc side, so it is upon us, whether we will decide to develop it. General rule is that there must be at least several hundreds potential (or present) aSc Timetables customers who will use this solution. Please contact us for more details.
instead of in aSc Timetables. In other situations it is recommended to prepare lesson definitions in aSc Timetables and then transfer them back to SMS.
Licensing/protection
Generally, it is possible to run import in any version of aSc Timetables, including unregistered versions. Export is also possible with unregistered versions, but for some tables it is limited to max 10 rows (for testing purposes). To by pass this limit, user needs to have registered version of aSc Timetables and special computer license registration code, which is issued for individual reg. name and computer. Please write to support@asc.sk to get this code.
ID
Some tables (e.g. teachers, subjects ) contain special column called COLUMN_ID. This column is used as unique identifier of a row (single teacher, subject ). ID is typically number, but can contain also letters. Following characters can be used as a part of ID: OK guarantied to work 0-9 a-z, A-Z - (minus character) _ (underscore) Special * (asterisk) - temporarily used during export from aSc Timetables Wrong will not work for sure (space) , (comma) : (colon) ; (semicolon)
Character * has a special role it is used during export to create temporary IDs for newly created rows. IDs for these newly created rows will be *1, *2, *3
Required/optional columns
By default, all columns in tables are optional. If some column is required for some table, it is specified in documentation for that table. See also note below about id columns. Documentation on tables lists only columns that are mapped to some data in aSc Timetables. You may also include some additional columns, that are not mapped to data in aSc Timetables. It might be useful for you in some situations and also it is possible that aSc Timetables will support this column in future. This may include e.g. colors for classes and subjects, id numbers for days/periods, gender for students, etc (These columns are not supported in present version of aSc Timetables (2008), but possibly they will be supported in some future version). Columns not natively supported will be left as they are during import/export (or filled blank for new rows). Special note on id columns: because ids are used to link one table to another, if you wish to get e.g. subjects for lessons, you must include table subjects and you must include column id in this table to obtain subjects for lessons.
Character encoding
aSc Timetables uses 8 bit character encoding. It uses standard code page from Microsoft Windows regional settings to encode characters. If you use integration API in your web server SMS, you should have proper code page configured also on your server.
Id prefix
aSc Timetables internally store your database ids in custom fields of its objects. These custom fields are also visible to user of aSc Timetables (see documentation). You should choose prefix for these custom fields in global options of your database. It is recommended that you use short name of your application as id prefix. Supported characters are the same as for ids, except that space character is also allowed.
Types
Number Color Gender Date You can use either comma or dot as decimal separator, see database options. #RRGGBB (as in HTML) M for male F for female YYYYMMDD Examples 19980101 20061231 H:MM Examples: 8:00 12:05 15:45 day:period,day:period,day:period... Example: 1:2,3:8,4:1 Each day is stored as sequence of characters, one for each period. Periods always start from period 0, even if timetable starts from period 1. Days are separated by commas. Characters: 0 forbidden position 1 OK position ? questionmarked position . unspecified position Example below defines five days, 8 periods each day, no zero periods. Last period is question marked each day and on Friday, last two periods are forbidden. .1111111?,.1111111?,.1111111?,.1111111?,.11111100
Time
Positions Time-off
Options
Note for API: All OPTION_XXX constants are defined as strings. In case option has some parameter, it should be appended to this constant. Examples below are for JAVA and C#, in other languages you need to use proper string concatenation operator (e.g. in PHP it is dot .).
Database options
API name OPTION_IDPREFIX+MyPerfectSMS OPTION_DECIMALSEPARATORCOMMA OPTION_DECIMALSEPARATORDOT OPTION_DAYNUMBERING0 XML name idprefix:MyAppName decimalseparatorcomma decimalseparatordot daynumbering0 Description Id prefix. Use comma , as decimal separator for numbers Use comma . as decimal separator for numbers Start day numbering from 0 (e.g. Monday=0, Tuesday=1, Wednesday=2 for western countries) This is default option. Start day numbering from 1 (e.g. Monday=1, Tuesday=2, Wednesday=3 for western countries) See documentation on TABLE_GROUPS See documentation on TABLE_GROUPS
Table options
API name OPTION_CAN_ADD OPTION_CAN_REMOVE OPTION_CAN_UPDATE OPTION_SILENT Description Table supports adding of new rows. Table supports removing of existing rows. Table supports update of existing rows. Do not show synchronization dialog for this table, just carry on default actions (same as clicking on OK button without making any changes). OPTION_PRIMARYTT Primarytt This table is primarily stored in aSc Timetables. Default actions in synchronization dialog will be prefilled in the way that table in SMS will be overwritten with data from aSc Timetables. OPTION_PRIMARYDB Primarydb This table is primarily stored in SMS. Default actions in synchronization dialog will be pre-filled in the way that table in aSc Timetables will be overwritten with data from SMS. OPTION_DISABLE Disable Disable this table. Useful with OPTION_INEXPORT or OPTION_INIMPORT. OPTION_CUSTOMFIELD_ID+MyID idcf:MyID Custom field name used to store ID for this table. (If not specified, default value is database id prefix+ ID.) OPTION_CUSTOMFIELD1+MyFieldName customfield1:MyFieldName Configure name of custom field, to which columns OPTION_CUSTOMFIELD2+MyFieldName customfield2:MyFieldName COLUMN_CUSTOMFIELD1-3 map to. OPTION_CUSTOMFIELD3+MyFieldName customfield3:MyFieldName OPTION_INEXPORT+other option export:other option Prefix this option before other option to make it valid only for export. E.g. export:silent OPTION_INIMPORT+other option import:other option Prefix this option before other option to make it valid only for import. E.g. import:disable XML name Canadd Canremove Canupdate Silent
Tables
Basic data
Global values
API name TABLE_GLOBALS Columns API name COLUMN_NAME COLUMN_SHORTNAME COLUMN_CUSTOMFIELD1 COLUMN_CUSTOMFIELD2 COLUMN_CUSTOMFIELD3 Note: This table has always exactly one row. XML table name globals XML name Name of school Registration name customfield1 customfield2 customfield3 XML row name global Notes Global custom field values
Teachers
API name TABLE_TEACHERS Columns API name COLUMN_ID COLUMN_NAME or COLUMN_FIRSTNAME COLUMN_LASTNAME COLUMN_SHORTNAME COLUMN_GENDER COLUMN_COLOR COLUMN_TIMEOFF COLUMN_SUBJECT_IDS COLUMN_CUSTOMFIELD1 COLUMN_CUSTOMFIELD2 COLUMN_CUSTOMFIELD3 COLUMN_HTMLEXPORTLINK COLUMN_ASCTTORDER XML table name teachers XML name id name firstname lastname short gender color timeoff subjectids customfield1 customfield2 customfield3 htmlexportlink ascttorder XML row name teacher Notes
Classes
API name TABLE_CLASSES Columns API name
COLUMN_ID COLUMN_NAME COLUMN_SHORTNAME COLUMN_TEACHER_ID COLUMN_CLASSROOM_IDS COLUMN_TIMEOFF ASCDBCOLUMN_CLASSLEVEL COLUMN_CUSTOMFIELD1 COLUMN_CUSTOMFIELD2 COLUMN_CUSTOMFIELD3 COLUMN_HTMLEXPORTLINK COLUMN_ASCTTORDER
Class teacher Home classroom(s) This field is mapped to special custom field.
Subjects
API name TABLE_SUBJECTS Columns API name COLUMN_ID COLUMN_NAME COLUMN_SHORTNAME COLUMN_TIMEOFF COLUMN_CUSTOMFIELD1 COLUMN_CUSTOMFIELD2 COLUMN_CUSTOMFIELD3 COLUMN_ASCTTORDER XML table name subjects XML name id name short timeoff customfield1 customfield2 customfield3 ascttorder XML row name subject Notes
Export only
Classrooms
API name TABLE_CLASSROOMS Columns API name COLUMN_ID COLUMN_NAME COLUMN_SHORTNAME COLUMN_TIMEOFF COLUMN_CUSTOMFIELD1 COLUMN_CUSTOMFIELD2 COLUMN_CUSTOMFIELD3 COLUMN_HTMLEXPORTLINK COLUMN_ASCTTORDER XML table name classrooms XML name id name short timeoff customfield1 customfield2 customfield3 htmlexportlink ascttorder XML row name classroom Notes
Students
API name TABLE_STUDENTS Columns API name COLUMN_ID COLUMN_NAME or COLUMN_FIRSTNAME COLUMN_LASTNAME COLUMN_CLASS_ID COLUMN_CUSTOMFIELD1 COLUMN_CUSTOMFIELD2 COLUMN_CUSTOMFIELD3 XML table name students XML name id name firstname lastname classid customfield1 customfield2 customfield3 XML row name student Notes
Groups
Note: Import/export of groups is generally DISCOURAGED, because there is usually different meaning of group in aSc Timetables and various SMS systems. Usually it is not possible to simply map aSc Timetables groups to SMS groups. However we have implemented some system to handle required conversions here. This system partially works for simple import of SMS data and for export of lessons after that, but if user makes some changes in aSc Timetables to groups, so that manual mapping of aSc Timetables groups to SMS groups is required, it may be too complicated for user to handle it in synchronization dialog. There are two general grouping types supported. You have to specify which type you use in database options. Each group belongs to just one class, there is also group for entire class. One lesson can be linked to multiple groups. GROUPSTYPE2 - Database group can belong to multiple classes. One lesson is linked to exactly one group.
GROUPSTYPE1 -
Notes Stored only for type 1, but used for expanded COLUMN_CLASS_IDS with type 2 Required for type 1 Required for type 2 Can be expanded using TABLE_GROUP_CLASS Group is entire class (Boolean value) This means it contains all students from the class. 0, 1, or blank In case of entire class=1, there can be only one class in ASCDBCOLUMN_CLASS_IDS field. See note 2 below Import only. Optional hint determining division (e.g. your division ID, if you have some). This field is only hint for import. aSc Timetables will place groups from one class with same TAG into one division during import. TAG will not be stored in aSc Timetables. Export only. Similar to DIVISION_TAG, only this is value sent from aSc Timetables to database. Groups from the same division in aSc Timetables will have equal value for this column. See note 3 below. Correct only for type 1
COLUMN_DIVISION_TAG
divisiontag
COLUMN_ASCTTDIVISION
ascttdivision
COLUMN_STUDENT_COUNT
studentcount
Note 1: Instead of using ASCDBCOLUMN_CLASS_IDS to specify classes, you may use ASCDBTABLE_GROUP_CLASS table. Note 2: It is highly recommended to send ENTIRE_CLASS=1 information if possible. Otherwise user will have to link manually entire class groups in aSc Timetables to entire class groups in your database during import. For other groups please send us ENTIRE_CLASS=0 if you are sure that your group does not contains all students from class, or otherwise leave it blank (empty string). Note 3: We plan to change grouping system in aSc Timetables in some of future versions, so this column may not contain correct value in future versions.
Periods
API name TABLE_PERIODS Columns API name
COLUMN_DAY
Notes Optional If not included, aSc Timetables will return periods/bells only for the first day of week. Period number (0, 1, 2)
Note: in case you include ASCDBCOLUMN_DAY, import of bell times is not supported (results will be unpredictable).
Lessons
There are three ways how to get lessons from aSc Timetables: 1. TABLE_LESSONS this is native structure of aSc Timetables. Use this table only of you want to have some low level access to data in aSc Timetables. This table has a disadvantage of the fact, that sometimes there are two rows in this table for the same subject in one class. For example if subject is 3 periods per week in a class, it might be inputted as one double and one single lesson. Then you will get two rows in this table. If you want to have these two rows grouped, use some of tables below. 2. TABLE_GROUPSUBJECTS this table is the same as TABLE_LESSONS, but rows for the same subject, group(s) and teacher(s) are grouped together in one row. 3. TABLE_CLASSSUBJECTS this table is similar to what you see in aSc Timetables Lesson Grid view. It shows how many times subject is taught in one class. Generally it is recommended to use TABLE_CLASSSUBJECTS if you wish to transfer just studying plans for classes (how many periods per week should be subject taught in a class) and TABLE_GROUPSUBJECTS if you wish to transfer more information (like joined classes, etc.).
Lessons
This is native data structure of aSc Timetables. Please use other tables to obtain lessons if you are not interested in such low level access to data. API name TABLE_LESSONS Columns API name
COLUMN_SUBJECT_ID COLUMN_GROUP_ID COLUMN_GROUP_IDS COLUMN_CLASS_ID COLUMN_CLASS_IDS COLUMN_TEACHER_ID COLUMN_TEACHER_IDS COLUMN_CLASSROOM_ID COLUMN_CLASSROOM_IDS COLUMN_PERIODSPERWEEK ASCDBCOLUMN_PERIODSPERCARD ASCDBCOLUMN_WEEKS COLUMN_DIVISION_TAG
Notes Required See note 1 below. See note 1 below. Can be expanded with TABLE_LESSON_CLASS See note 1 below. Can be expanded with TABLE_LESSON_TEACHER Available classroom(s) for this lesson. See note 1 below. If lesson requires more classrooms, options only for first one are reported. Total periods per week. May be a fractional number e.g. if this lesson is only once every other week. 1 single lesson, 2 double lesson, See note 2 below 1 every week, 10 first week, 01 second week... See note 2 below Import only. Optional hint determining division (e.g. your division ID, if you have some). This field is only hint for import. aSc Timetables will place groups from one class with same TAG into one division during import. TAG will not be stored in aSc Timetables.
Note 1: About XXX_ID and XXX_IDS fields please use just one of these fields depending on what you support in your database. E.g. if you support only one teacher per lesson, use ASCDBCOLUMN_TEACHER_ID. But if you support more, use ASCDBCOLUMN_TEACHER_IDS. Note 2: We plan to change our internal structures in future. This change might affect columns PERIODSPERCARD and WEEKS, they may contain blank value in some situations and may be obtained only from CARDS table. Reason is that we plan to support different values for these columns for individual cards from the same lesson.
Group subjects
API name TABLE_GROUPSUBJECTS Columns API name
COLUMN_SUBJECT_ID COLUMN_CLASS_IDS COLUMN_TEACHER_ID COLUMN_TEACHER_IDS COLUMN_PERIODSPERWEEK COLUMN_CLASSROOM_ID COLUMN_CLASSROOM_IDS COLUMN_GROUP_ID COLUMN_GROUP_IDS COLUMN_CLASSLEVEL COLUMN_STUDENT_IDS COLUMN_STUDENT_COUNT COLUMN_ENTIRE_CLASS COLUMN_DIVISION_TAG
Notes Required Can be expanded with TABLE_GROUP_CLASS See note 1 below. Total periods per week. May be a fractional number e.g. if this lesson is only once every other week. Available classroom(s) for this lesson. See note 1 below. If lesson requires more classrooms, options only for first one are reported. For GROUPSTYPE2 For GROUPSTYPE1 Export only If this lesson is joined from classes with different class levels, this field will be left blank. Export only. Will be blank if student count is unknown. Export only 1-if this lesson is for one entire class, otherwise blank. Import only. Optional hint determining division (e.g. your division ID, if you have some). This field is only hint for import. aSc Timetables will place groups from one class with same TAG into one division during import. TAG will not be stored in aSc Timetables.
Note 1: About XXX_ID and XXX_IDS fields please use just one of these fields depending on what you support in your database. E.g. if you support only one teacher per lesson, use ASCDBCOLUMN_TEACHER_ID. But if you support more, use ASCDBCOLUMN_TEACHER_IDS.
Class subjects
This table is equivalent of lesson grid view in application. API name TABLE_CLASSSUBJECTS Columns API name
COLUMN_CLASS_ID COLUMN_SUBJECT_ID COLUMN_TEACHER_ID COLUMN_PERIODSPERWEEK
Notes Required Required Will return correct value only if there is just one teacher for this subject in this class. Total periods per week. May be a fractional number e.g. if this lesson is only once every other week.
Note: Class and subject form primary key for this table: For proper functionality there MUST be max one row with the same class and subject.
Timetable
Cards
API name TABLE_CARDS Columns API name
COLUMN_SUBJECT_ID COLUMN_CLASS_ID COLUMN_CLASS_IDS COLUMN_GROUP_ID COLUMN_GROUP_IDS COLUMN_TEACHER_ID COLUMN_TEACHER_IDS COLUMN_CLASSROOM_ID COLUMN_CLASSROOM_IDS COLUMN_DAY COLUMN_PERIOD COLUMN_DURATION_PERIODS COLUMN_WEEKS COLUMN_LESSON_ID
Notes
Note 1: About XXX_ID and XXX_IDS fields please use just one of these fields depending on what you support in your database. E.g. if you support only one teacher per card, use ASCDBCOLUMN_TEACHER_ID, but if you support more, use ASCDBCOLUMN_TEACHER_IDS. Note 2: If you include column ASCDBCOLUMN_DURATION_PERIODS in table, then aSc Timetables will output double lesson as one row in this table with duration=2. If you do not include this column, aSc Timetables will output two rows for double lesson (with periods P and P+1), three rows for triple, etc... Note 3: This table can be only exported, only limited import possible at the moment.
Class timetable
API name TABLE_CLASSTIMETABLE Columns API name
COLUMN_CLASS_ID COLUMN_DAY COLUMN_PERIOD COLUMN_SUBJECT_ID COLUMN_SUBJECT_IDS COLUMN_TEACHER_ID COLUMN_TEACHER_IDS COLUMN_CLASSROOM_ID COLUMN_CLASSROOM_IDS
Notes
This table is export only. Note: Class, day and period make primary key for this table. That means that there is exactly just one row in this table for the same class+day+period.
Expanded tables
Group class
API name TABLE_GROUP_CLASS Columns API name
ASCDBCOLUMN_GROUP_ID ASCDBCOLUMN_CLASS_ID
Lesson class
API name TABLE_LESSON_CLASS Columns API name
ASCDBCOLUMN_LESSON_ID ASCDBCOLUMN_CLASS_ID
Lesson teacher
API name TABLE_LESSON_TEACHER Columns API name
ASCDBCOLUMN_LESSON_ID ASCDBCOLUMN_TEACHER_ID