CSV export feature request

Started by m, January 21, 2010, 10:50:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

m

I would love to have an activity id in timetable csv export file.
I want to use it, to prepare timetable change reports.
Using FET since 2010

Liviu Lalescu

Maybe you could use the activities.xml file from the generated timetables?

m

QuoteMaybe you could use the activities.xml file from the generated timetables?

But then I will need to open other file :-)
The csv timetable has all other necessary information included.
Using FET since 2010

Liviu Lalescu

Volker knows better than me, let's wait for his answer.

My opinion is that a HTML or text timetable should not contain activities ids. It may seem weird for other persons, and it may be confusing and unnecessary. Opening more files should not be problematic. I think if you want more details in the timetable, the best is to keep the initial .fet data file and the activities.xml results file, and from these 2 files you can generate all the necessary information.

Volker Dirr

sorry for delay. i was so busy.

if i understood you want it only in the timetables.csv, correct?
(i just say/ask, because i don't like it in the html file and also not in the other csv files because of some reasons i can tell later if someone want to know.)

i am not sure if this is realy useful because i am not 100% sure how exactly how you do a "timetable change report" and why you need that. (maybe you have such a bif school system and you want to tell other guys only changes, and don't tell them something is nothing changed?)

i am not sure if we should add this into offical release, because it will complicate the import of the csv file (if i add that feature someday) and i fear guys will do to many bugs in that file (especialy if other guys write converter from other time tabling tools).

you can try/add yoursefl that feature and do that.
tell me/us if it realy help you and we will thing one more time about adding into official version.

you just need to open in /src/engine/ direcoty the file "export.cpp".
go to function "Export::exportCSVTimetable" (line 961 following)
in line 1042 you can see this:

  tosExport<<endl;


change code to this:

  tosExport<<fieldSeparator<<textquote<<QString::number(act->id)<<textquote<<endl;


compile and check if that is what you need.

m

Thank You very much for fast reply. (I never expected them so fast :-)

Provided patch is sufficient.

I'm preparing schedule in Faculty of Math and Informatics at University of Gdańsk, Poland. After schedule is set there are changes for first month, sometimes only room changes sometimes move, remove or add activities. I would like to prepare the module for our presentation system to keep teachers and students with updates. (Yes we are using our own presentation system, You can see them inf.ug.edu.pl/plan - but currently we have mid year break).



Thanks once more

M
Using FET since 2010

Liviu Lalescu

#6
m, I saw a minor thing in the exported timetables: if there is no room allocated in a time slot, Volker wrote nothing, for instance:

"Friday","2","5d","PK","Maren","",
"Wednesday","3","5a","BI","Anita","","401"

the first row has no room for this activity. I modified it to be:

"Friday","2","5d","PK","Maren","",""

Is it better now? Can you still use the timetable export with this setting?

Also, if we add the id of the activity, in which position should it be best? First position? 3rd? Or last?

Please answer asap, because I want to release soon a new version.

m

For activity without room patch gives me:

"CZW","12","1I","WF","","inf",,"46"

(it is without teacher too)

and it is no problem for me.

M
Using FET since 2010

Liviu Lalescu

#8
QuoteFor activity without room patch gives me:

"CZW","12","1I","WF","","inf",,"46"

(it is without teacher too)

and it is no problem for me.

M

Yes, but I mean can you read this line if the room is "", like:

"CZW","12","1I","WF","","inf","","46"

?

(this is a small improvement I made).

I think the activity id should be first, I'll tell that to Volker and I think we'll add it.

m

Quote
Yes, but I mean can you read this line if the room is "", like:

"CZW","12","1I","WF","","inf","","46"

?

(this is a small improvement I made).
It is OK.


Quote
I think the activity id should be first, I'll tell that to Volker and I think we'll add it.
I agree. Activity id should be first.
Using FET since 2010

Liviu Lalescu

I modified the sources, could you please verify that it works? Overwrite file export.cpp with the attach one, compile and run FET, export a timetable and check it by hand and in your script.

I am interested, can you give me the exact Internet page where you published your timetable for your university? I cannot find my way in the Polish language on the link you gave previously.

m

Yes. New file works.

As I wrote earlier, we have winter break right now and there is no schedule at specified address. We will have new schedule for second part of year around February 11 available. I will keep You informed.
Using FET since 2010

Liviu Lalescu