asc

34
aSc Timetables – integration with other systems 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

Upload: eye-ice

Post on 31-Oct-2014

175 views

Category:

Documents


12 download

DESCRIPTION

time

TRANSCRIPT

Page 1: asc

aSc Timetables – integration with other systemsaSc 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........................................................................1Ways of integrating your application/system with aSc Timetables............................................3

API - Integration using aSc Timetables integration API....................................................3XML - Integration using aSc Timetables XML files..........................................................3SFF - Special file format - Integration using special SMS file format (or statistics file format).................................................................................................................................4DA - Direct access - Integration using direct access of aSc Timetables to your underlying database...............................................................................................................................4

Typical scenarios – what to import/export..............................................................................4Import of basic data............................................................................................................4Import of basic data + lessons.............................................................................................4Export of lessons to SMS....................................................................................................5Export of timetable to SMS................................................................................................5

Licensing/protection...............................................................................................................5Import/Export data structure.......................................................................................................6

General notes..........................................................................................................................6ID........................................................................................................................................6Links between tables, ID and IDS fields............................................................................6Expanded ids fields.............................................................................................................7Required/optional columns.................................................................................................7Character encoding.............................................................................................................7Id prefix...............................................................................................................................8XML file structure..............................................................................................................8Types...................................................................................................................................9

Options..................................................................................................................................10Database options...............................................................................................................10Table options.....................................................................................................................11

Tables........................................................................................................................................12Basic data..............................................................................................................................12

Teachers............................................................................................................................12Classes...............................................................................................................................13Subjects.............................................................................................................................14Classrooms........................................................................................................................15Students.............................................................................................................................16Groups...............................................................................................................................17

Days and periods...................................................................................................................19Days..................................................................................................................................19Periods...............................................................................................................................19

Lessons..................................................................................................................................20

Page 2: asc

Lessons..............................................................................................................................21Group subjects..................................................................................................................23Class subjects....................................................................................................................24

Timetable..............................................................................................................................25Cards.................................................................................................................................25Class timetable..................................................................................................................26

Expanded tables....................................................................................................................27Group class........................................................................................................................27Lesson class......................................................................................................................27Lesson teacher...................................................................................................................27Group subject class...........................................................................................................28Group subject teacher.......................................................................................................28

Page 3: asc

Ways of integrating your application/system with aSc Timetables

Generally there are four ways how aSc Timetables can be integrated with other systems. They differ in available functionality, ease for user and on whether integration is developed by author of SMS or by aSc.

API - Integration using aSc Timetables integration APIThis is the most powerful solution. You will add aSc Timetables integration API library into your SMS (can be a standalone application or web server solution) and implement few functions in this API. These functions give integration API access to underlying data stored in SMS. They are also called to handle various other tasks – authentication (login), storing timetable file in SMS and its retrieving (for web solutions). With this solution, aSc Timetables will contain new menu item in File submenu (called e.g. “Access to MyPerfectSMS system”). When user invokes this function, aSc Timetables will connect to SMS, handle optional authentication and present user with following dialog:

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.

XML - Integration using aSc Timetables XML filesIn this case, data will be transferred manually using XML file. In your SMS, you will add new function “Export to aSc Timetables XML”. In this file you will write all data that you wish to transfer to aSc Timetables and you will also include information about which data you are interested to get from aSc Timetables. Then user can import this data in aSc Timetables using menu – File – Import – aSc Timetables XML. This import function is “synchronizing”, that is,

Page 4: asc

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.

Typical scenarios – what to import/exportHere are some typical scenarios what might be imported/exported to/from aSc Timetables

Import of basic dataThis means import of teachers, classes, subjects, classrooms, students. This is the simplest integration. We recommend that you start your development with this.

Import of basic data + lessonsSame as previous, but also some lesson information is provided. The lesson information must include at least which classes have which subjects, but may include more information as well, like how many times per week lesson should be, which teacher is teaching this lesson, etc.This might be useful if users are for some reason required to input this data in SMS before they start their work on timetable, or there is a good reason to prepare this data in SMS

Page 5: asc

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.

Export of lessons to SMSIf you need to store some lesson information in your SMS (e.g. for statistical purposes or for some other reason), you may wish to get them from aSc Timetables.

Export of timetable to SMSYou can also get actual timetable that user has created to your SMS. Timetable is available in several formats (class timetables, teacher timetables, cards, positions for lessons …)

Licensing/protectionGenerally, 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 [email protected] to get this code.

Page 6: asc

Import/Export data structure

General notesaSc Timetables integration uses special “adaptive” data structure. It is based on standard concept of tables, columns and ids (identification numbers). Purpose of “adaptiveness” of this structure is to minimize required data conversion during development of integration. For example, aSc Timetables internally store names of teachers in single column called name. However, your SMS might store teacher names internally in two columns: first name and last name. So to make things easier, aSc Timetables integration structure supports storing names both as single column (COLUMN_NAME), or as two columns (COLUMN_FIRSTNAME and COLUMN_LASTNAME). Other conversions, especially those regarding lessons and cards (actual timetable) are even more complex.It is upon you to choose which tables and which columns in these tables you wish to transfer between your SMS and aSc Timetables. Also you have to specify some options for tables and for the whole database. These options specify which tables are for import, which for export, what options should be offered for user during synchronization dialog and some structure related information (e.g. decimal separator).

IDSome 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 Special Wrong – will not work for sure

0-9a-z, A-Z- (minus character)_ (underscore)

* (asterisk) - temporarily used during export from aSc Timetables

(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 …

Links between tables, ID and IDS fieldsSome tables refer to rows of other tables. For example table of lessons refers to table of subjects and teachers. These references are typically stored as id numbers of referred tables in columns named by name of referred table. In our example it will be stored in columns SUBJECTS_ID and TEACHER_IDS. Note the difference between _ID and _IDS. aSc Timetables support just one subject per lesson, but any number of teachers per lesson. If table links to just single row of other table, it is stored as single id number in _ID column. If it can possibly refer to multiple rows, it is stored in _IDS column as multiple id numbers separated by commas (e.g. “234,456,222”). If there is no row to link to, _ID or _IDS field should be left blank (=empty string).

Note about adaptation: If your database supports just one teacher per lesson, you should use TEACHER_ID column to store this teacher (even though natively it stored in TEACHER_IDS column). aSc Timetables will adapt to this situation and export just ID of first teacher into this column.

Page 7: asc

Expanded ids fieldsFor some tables, it is possible to expand IDS field to another table. For example field TEACHER_IDS in table TABLE_LESSONS can be expanded using TABLE_LESSON_TEACHER. In this case, you should not include TEACHER_IDS column in your lesson table, but you should add table TABLE_LESSON_TEACHER with columns LESSON_ID and TEACHER_ID. By this table you can link teachers to lessons.

Example in XML:

<lessons …> <lesson id=”10” teacher_ids=”12,23” subject_id=”2” …></lessons>

Can be expanded as:

<lessons …> <lesson id=”10” subject_id=”2” …></lessons><lessonteachers …> <lessonteacher lesson_id=”10” teacher_id=”12”/> <lessonteacher lesson_id=”10” teacher_id=”23”/></lessonteachers>

This expanding is useful if you store IDS field in your SMS in another table (it is typical for database based SMS systems).

Required/optional columnsBy 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 encodingaSc 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.

Page 8: asc

Id prefixaSc 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.

XML file structureFor XML integration, XML file should have following structure:

<timetable importtype="database" options="database_options"> <table_name options="table_options" columns="table_columns "> <row_name column_name1="value1" column_name2=”value2” … /> <row_name column_name1="value1" column_name2=”value2” … /> … </ table_name > <table_name options="table_options" columns="table_columns "> … </ table_name > …</timetable>

Options and columns are stored as comma separated lists, e.g.:

options="idprefix:MyApp,decimalseparatorcomma"

columns="id,name,short,gender,color"

Page 9: asc

Types

Number You can use either comma or dot as decimal separator, see database options.Color #RRGGBB (as in HTML)Gender M for male

F for femaleDate YYYYMMDD

Examples1998010120061231

Time H:MMExamples:8:0012:0515:45

Positions day:period,day:period,day:period...Example:1:2,3:8,4:1

Time-off 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 position1 – 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

Page 10: asc

OptionsNote 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 optionsAPI name XML name DescriptionOPTION_IDPREFIX+”MyPerfectSMS” idprefix:MyAppName Id prefix.OPTION_DECIMALSEPARATORCOMMA decimalseparatorcomma Use comma “,” as decimal separator for

numbersOPTION_DECIMALSEPARATORDOT decimalseparatordot Use comma “.” as decimal separator for

numbersOPTION_DAYNUMBERING0 daynumbering0 Start day numbering from 0 (e.g. Monday=0,

Tuesday=1, Wednesday=2… for western countries)This is default option.

OPTION_DAYNUMBERING1 daynumbering1 Start day numbering from 1 (e.g. Monday=1, Tuesday=2, Wednesday=3… for western countries)

OPTION_GROUPSTYPE1 groupstype1 See documentation on TABLE_GROUPSOPTION_GROUPSTYPE2 groupstype2 See documentation on TABLE_GROUPS

Page 11: asc

Table optionsAPI name XML name DescriptionOPTION_CAN_ADD Canadd Table supports adding of new rows.OPTION_CAN_REMOVE Canremove Table supports removing of existing rows.OPTION_CAN_UPDATE Canupdate Table supports update of existing rows.OPTION_SILENT Silent 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 pre-filled 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”OPTION_CUSTOMFIELD2+”MyFieldName”OPTION_CUSTOMFIELD3+”MyFieldName”

customfield1:MyFieldNamecustomfield2:MyFieldNamecustomfield3:MyFieldName

Configure name of custom field, to which columns COLUMN_CUSTOMFIELD1-3 map to.

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

Page 12: asc

Tables

Basic data

Global valuesAPI name XML table name XML row nameTABLE_GLOBALS globals global

ColumnsAPI name XML name NotesCOLUMN_NAME Name of schoolCOLUMN_SHORTNAME Registration nameCOLUMN_CUSTOMFIELD1COLUMN_CUSTOMFIELD2COLUMN_CUSTOMFIELD3

customfield1customfield2customfield3

Global custom field values

Note: This table has always exactly one row.

Page 13: asc

TeachersAPI name XML table name XML row nameTABLE_TEACHERS teachers teacher

ColumnsAPI name XML name NotesCOLUMN_ID idCOLUMN_NAMEorCOLUMN_FIRSTNAMECOLUMN_LASTNAME

name

firstnamelastname

COLUMN_SHORTNAME shortCOLUMN_GENDER genderCOLUMN_COLOR colorCOLUMN_TIMEOFF timeoffCOLUMN_SUBJECT_IDS subjectidsCOLUMN_CUSTOMFIELD1COLUMN_CUSTOMFIELD2COLUMN_CUSTOMFIELD3

customfield1customfield2customfield3

COLUMN_HTMLEXPORTLINK htmlexportlink Export onlyCOLUMN_ASCTTORDER ascttorder Export only

Page 14: asc

ClassesAPI name XML table name XML row nameTABLE_CLASSES classes Class

ColumnsAPI name XML name NotesCOLUMN_ID idCOLUMN_NAME nameCOLUMN_SHORTNAME shortCOLUMN_TEACHER_ID teacherid Class teacherCOLUMN_CLASSROOM_IDS classroomids Home classroom(s)COLUMN_TIMEOFF timeoffASCDBCOLUMN_CLASSLEVEL classlevel This field is mapped to special custom field.COLUMN_CUSTOMFIELD1COLUMN_CUSTOMFIELD2COLUMN_CUSTOMFIELD3

customfield1customfield2customfield3

COLUMN_HTMLEXPORTLINK htmlexportlink Export onlyCOLUMN_ASCTTORDER ascttorder Export only

Page 15: asc

SubjectsAPI name XML table name XML row nameTABLE_SUBJECTS subjects subject

ColumnsAPI name XML name NotesCOLUMN_ID idCOLUMN_NAME nameCOLUMN_SHORTNAME shortCOLUMN_TIMEOFF timeoffCOLUMN_CUSTOMFIELD1COLUMN_CUSTOMFIELD2COLUMN_CUSTOMFIELD3

customfield1customfield2customfield3

COLUMN_ASCTTORDER ascttorder Export only

Page 16: asc

ClassroomsAPI name XML table name XML row nameTABLE_CLASSROOMS classrooms classroom

ColumnsAPI name XML name NotesCOLUMN_ID idCOLUMN_NAME nameCOLUMN_SHORTNAME shortCOLUMN_TIMEOFF timeoffCOLUMN_CUSTOMFIELD1COLUMN_CUSTOMFIELD2COLUMN_CUSTOMFIELD3

customfield1customfield2customfield3

COLUMN_HTMLEXPORTLINK htmlexportlink Export onlyCOLUMN_ASCTTORDER ascttorder Export only

Page 17: asc

StudentsAPI name XML table name XML row nameTABLE_STUDENTS students student

ColumnsAPI name XML name NotesCOLUMN_ID idCOLUMN_NAMEorCOLUMN_FIRSTNAMECOLUMN_LASTNAME

name

firstnamelastname

COLUMN_CLASS_ID classid Required. Student must be linked to some class.

COLUMN_CUSTOMFIELD1COLUMN_CUSTOMFIELD2COLUMN_CUSTOMFIELD3

customfield1customfield2customfield3

Page 18: asc

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.

GROUPSTYPE1 - 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.

Page 19: asc

API name XML table name XML row nameTABLE_GROUPS groups group

ColumnsAPI name XML name NotesCOLUMN_ID id Stored only for type 1, but used for expanded COLUMN_CLASS_IDS with type 2COLUMN_NAME nameCOLUMN_CLASS_ID classid Required for type 1COLUMN_CLASS_IDS classids Required for type 2

Can be expanded using TABLE_GROUP_CLASSCOLUMN_ENTIRE_CLASS entireclass Group is entire class (Boolean value)

This means it contains all students from the class.0, 1, or blankIn case of entire class=1, there can be only one class in ASCDBCOLUMN_CLASS_IDS field.See note 2 below

COLUMN_DIVISION_TAG divisiontag 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.

COLUMN_ASCTTDIVISION ascttdivision 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.

COLUMN_STUDENT_COUNT studentcount Correct only for type 1

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.

Page 20: asc

Days and periods

DaysAPI name XML table name XML row nameTABLE_DAYS days day

ColumnsAPI name XML name NotesCOLUMN_DAY day Day number. See documentation on OPTION_DAYNUMBERING.COLUMN_NAME nameCOLUMN_SHORTNAME short

PeriodsAPI name XML table name XML row nameTABLE_PERIODS periods period

ColumnsAPI name XML name NotesCOLUMN_DAY day Optional

If not included, aSc Timetables will return periods/bells only for the first day of week.

COLUMN_PERIOD period Period number (0, 1, 2…)COLUMN_NAME nameCOLUMN_SHORTNAME shortCOLUMN_START_TIME starttimeCOLUMN_END_TIME endtime

Note: in case you include ASCDBCOLUMN_DAY, import of bell times is not supported (results will be unpredictable).

Page 21: asc

LessonsThere 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.).

Page 22: asc

LessonsThis 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 XML table name XML row nameTABLE_LESSONS lessons Lesson

ColumnsAPI name XML name NotesCOLUMN_SUBJECT_ID subjectid RequiredCOLUMN_GROUP_IDCOLUMN_GROUP_IDS

groupidgroupids

See note 1 below.

COLUMN_CLASS_IDCOLUMN_CLASS_IDS

classidclassids

See note 1 below.Can be expanded with TABLE_LESSON_CLASS

COLUMN_TEACHER_IDCOLUMN_TEACHER_IDS

teacheridteacherids

See note 1 below.Can be expanded with TABLE_LESSON_TEACHER

COLUMN_CLASSROOM_IDCOLUMN_CLASSROOM_IDS

classroomidclassroomids

Available classroom(s) for this lesson.See note 1 below.If lesson requires more classrooms, options only for first one are reported.

COLUMN_PERIODSPERWEEK periodsperweek Total periods per week.May be a fractional number e.g. if this lesson is only once every other week.

ASCDBCOLUMN_PERIODSPERCARD periodspercard 1 – single lesson, 2 – double lesson, …See note 2 below

ASCDBCOLUMN_WEEKS weeks 1 – every week, 10 – first week, 01 – second week...See note 2 below

COLUMN_DIVISION_TAG divisiontag 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.

Page 23: asc

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.

Page 24: asc

Group subjectsAPI name XML table name XML row nameTABLE_GROUPSUBJECTS groupsubjects groupsubject

ColumnsAPI name XML name NotesCOLUMN_SUBJECT_ID Subjectid RequiredCOLUMN_CLASS_IDS Classids Can be expanded with TABLE_GROUP_CLASSCOLUMN_TEACHER_IDCOLUMN_TEACHER_IDS

TeacheridTeacherids

See note 1 below.

COLUMN_PERIODSPERWEEK periodsperweek Total periods per week.May be a fractional number e.g. if this lesson is only once every other week.

COLUMN_CLASSROOM_IDCOLUMN_CLASSROOM_IDS

ClassroomidClassroomids

Available classroom(s) for this lesson.See note 1 below.If lesson requires more classrooms, options only for first one are reported.

COLUMN_GROUP_ID Groupid For GROUPSTYPE2COLUMN_GROUP_IDS Groupids For GROUPSTYPE1COLUMN_CLASSLEVEL Classlevel Export only

If this lesson is joined from classes with different class levels, this field will be left blank.COLUMN_STUDENT_IDS StudentidsCOLUMN_STUDENT_COUNT Studentcount Export only.

Will be blank if student count is unknown.COLUMN_ENTIRE_CLASS Entireclass Export only

1-if this lesson is for one entire class, otherwise blank.COLUMN_DIVISION_TAG divisiontag 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.

Page 25: asc

Class subjectsThis table is equivalent of lesson grid view in application.

API name XML table name XML row nameTABLE_CLASSSUBJECTS classsubjects classsubject

ColumnsAPI name XML name NotesCOLUMN_CLASS_ID Classid RequiredCOLUMN_SUBJECT_ID Subjectid RequiredCOLUMN_TEACHER_ID Teacherid Will return correct value only if there is just one teacher for this subject in this

class.COLUMN_PERIODSPERWEEK Periodsperweek 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.

Page 26: asc

Timetable

CardsAPI name XML table name XML row nameTABLE_CARDS cards card

ColumnsAPI name XML name NotesCOLUMN_SUBJECT_ID subjectidCOLUMN_CLASS_IDCOLUMN_CLASS_IDS

classidclassids

COLUMN_GROUP_IDCOLUMN_GROUP_IDS

groupidgroupids

COLUMN_TEACHER_IDCOLUMN_TEACHER_IDS

teacheridteacherids

COLUMN_CLASSROOM_IDCOLUMN_CLASSROOM_IDS

classroomidclassroomids

COLUMN_DAY dayCOLUMN_PERIOD periodCOLUMN_DURATION_PERIODS durationperiods 1 – single lesson, 2 – double lesson, …COLUMN_WEEKS weeksCOLUMN_LESSON_ID lessonid

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.

Page 27: asc

Class timetableAPI name XML table name XML row nameTABLE_CLASSTIMETABLE classtimetables classtimetable

ColumnsAPI name XML name NotesCOLUMN_CLASS_ID classidCOLUMN_DAY dayCOLUMN_PERIOD periodCOLUMN_SUBJECT_IDCOLUMN_SUBJECT_IDS

subjectidsubjectids

COLUMN_TEACHER_IDCOLUMN_TEACHER_IDS

teacheridteacherids

COLUMN_CLASSROOM_IDCOLUMN_CLASSROOM_IDS

classroomidclassroomids

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.

Page 28: asc

Expanded tables

Group classAPI name XML table name XML row nameTABLE_GROUP_CLASS groupclasses groupclassColumnsAPI name XML name NotesASCDBCOLUMN_GROUP_ID groupidASCDBCOLUMN_CLASS_ID classid

Lesson classAPI name XML table name XML row nameTABLE_LESSON_CLASS lessonclasses lessonclassColumnsAPI name XML name NotesASCDBCOLUMN_LESSON_ID lessonidASCDBCOLUMN_CLASS_ID classid

Lesson teacherAPI name XML table name XML row nameTABLE_LESSON_TEACHER lessonteachers lessonteacherColumnsAPI name XML name NotesASCDBCOLUMN_LESSON_ID lessonidASCDBCOLUMN_TEACHER_ID teacherid

Page 29: asc

Group subject classAPI name XML table name XML row nameTABLE_GROUPSUBJECT_CLASS groupsubjectclasses groupsubjectclassColumnsAPI name XML name NotesASCDBCOLUMN_GROUPSUBJECT_ID groupsubjectidASCDBCOLUMN_CLASS_ID classid

Group subject teacherAPI name XML table name XML row nameTABLE_GROUPSUBJECT_TEACHER lessonteachers groupsubjectteacherColumnsAPI name XML name NotesASCDBCOLUMN_GROUPSUBJECT_ID groupsubjectidASCDBCOLUMN_TEACHER_ID teacherid