Rozvrhy - Online návody
EduPage - Online Help
Video Help

flag aSc Rozvrhy - Import

Import from XML
Tento článok je preložený: gb.gif pl.gif ru.gif gr.gif lt.gif bg.gif

This topic is for IT personnel of your school. It requires basic software programming skills.

Please see this topic for simpler way of importing data into aSc Timetables:
Import zo schránky (clipboard)

aSc Timetables can import data from "aSc Timetables XML" file. You need to write your data into this format. There is a sample XML import file included in installation of aSc Timetables:

c:\TimeTables\template\Import Samples\XML\import_basicdata.xml

This XML file is quite simple and contains import of just very basic data about classes, subjects, teaches and classrooms. It is a good start with implementing export from you school's system into this format.

Note: To create new timetable file from XML data, first click on "Create new timetable" and then go to menu - File - Import - aSc Timetables XML.

Note2: you need to replace "MyApp" in first row with name of your system (use only letters/spaces).

It is possible to enhance this import in two ways:

1) You can add new columns to existing tables in XML file
2) You can also add new tables to import some other data (e.g. lessons).

Adding new columns into XML file
As an example, we can enhance XML import with class teachers for classes.

In documentation (see link at bottom) you can find that column for class teachers is in table "classes" and it is called "teacherid". We have to add "teacherid" to list of columns in attribute columns="id,name" of XML node "classes". Also for each class we need to add teacherid="xxx" attribute. So the resulting XML might look like this (only classes part is shown here):

<classes options="" columns="id,name,teacherid">
<class id="1" name="5.A" short="5.A" teacherid="1"/>
<class id="2" name="5.B" short="5.B" teacherid="2"/>
</classes>

This way you can enhance import with any number of columns you need (e.g. colors for teachers, gender, time-off, etc...). Full list of supported columns can be found in documentation.

Note: It is also possible to import up to 3 custom fields for teachers, classes, subjects and classrooms. In this case you have to also add name of custom fields to attribute options="". Example:

<teachers options="customfield1:Email" columns="id,name,short">
<teacher id="1" name="Bacova" short="Bc" customfield1="bacova@myschool.net"/>
<teacher id="2" name="Belicova" short="Bl" customfield1="belicova@myschool.net"/>
<teacher id="3" name="Benkova" short="Be" customfield1="benkova@myschool.net"/>
</teachers>

Adding new tables into XML file
As an example, we can enhance XML file with import of lessons.

In documentation (see link at bottom) you can find that there are several tables for this purpose. We will choose "classsubjects" table and import classes' subjects, their count per week and teacher. For this purpose, we have to add this section into XML:


<classsubjects options="" columns="classid,subjectid,periodsperweek,teacherid">
<classsubject classid="1" subjectid="1" periodsperweek="5" teacherid="1"/>
<classsubject classid="1" subjectid="2" periodsperweek="3" teacherid="2"/>
<classsubject classid="2" subjectid="1" periodsperweek="5" teacherid="1"/>
<classsubject classid="2" subjectid="3" periodsperweek="4" teacherid="3"/>
</classsubjects>

This way you can enhance with any number of additional tables from list of all possible tables. Full list of supported tables and their columns can be found in documentation.

Documentation
Here you can find complete documentation to XML structure.

Note: If you have some question regarding XML import, please write to support@asc.sk

See also: Export to XML


Tento článok mi pomohol Tento článok mi pomohol
Tento článok je nepochopiteľný Tento článok je nepochopiteľný
Hľadal som niečo iné. Hľadal som niečo iné.

Tento článok bol videný 176758 krát.138868 / 176758
ViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViews

Predchádzajúci článok Naspäť na obsah Ďalší článok