FET Forum

FET Support (English) => General Stuff => Topic started by: msir on October 29, 2021, 10:27:19 AM

Title: TOTAL NUMBER OF STUDENTS PER ACTIVITY REPORT
Post by: msir on October 29, 2021, 10:27:19 AM
Dear all,
Please, I want to know possible is it to get a report (CSV preferably) that shows the total number of students per activity.
Note: This information is already available in the Data->Activities but that is manual. I want to be able to export such information into a CSV format.

The goal of this request is to enable us to ascertain the total number of students per day for all the activities. This is needed for managing the numbers during the examination period, especially in this covid period.

Side note and question, is it possible to get the Database of Fet to query it for more information? If this is not available then I believe it will be an added advantage and should be considered in the feature release.

Thank you and keep up the great and wonderful work.
Title: Re: TOTAL NUMBER OF STUDENTS PER ACTIVITY REPORT
Post by: Liviu Lalescu on October 29, 2021, 12:57:54 PM
Hello,

It is easy to obtain the number of students for each activity and I can help with advice.

The FET database is the .fet file, which is a simple and intuitive XML file. You can query it. If you want other format, I can advise.

Thank you for the appreciation!
Title: Re: TOTAL NUMBER OF STUDENTS PER ACTIVITY REPORT
Post by: msir on October 29, 2021, 03:33:41 PM
Dear Liviu Lalescu, thank you so much for reaching out.

Please, kindly advise me on both methods i.e. obtaining the total number of students for each activity and also querying the XML fet file for similar information.

Thank you
Title: Re: TOTAL NUMBER OF STUDENTS PER ACTIVITY REPORT
Post by: Liviu Lalescu on October 29, 2021, 05:33:47 PM
You can call me simply Liviu  :)

To export as CSV, please see the function Export::exportCSVActivities from export.cpp. Use the variable Activity::nTotalStudents.

To query the XML .fet file, please save a very simple file and see its structure. The <Students_List> section will have the number of students per set, and the <Activities_List> section will have each students set for each activity (unfortunately, the number of students is not directly written if it must be computed automatically).
Title: Re: TOTAL NUMBER OF STUDENTS PER ACTIVITY REPORT
Post by: msir on October 29, 2021, 06:24:16 PM
Please, where do I find the functions? Is it from the source code? If yes can I please get the link to it?

Thanks
Title: Re: TOTAL NUMBER OF STUDENTS PER ACTIVITY REPORT
Post by: Liviu Lalescu on October 29, 2021, 06:26:04 PM
Yes, it is from the sources tar.bz2. Get them from here: https://lalescu.ro/liviu/fet/download.html

You need to modify and compile. Also, you need C++ knowledge.
Title: Re: TOTAL NUMBER OF STUDENTS PER ACTIVITY REPORT
Post by: msir on October 30, 2021, 05:15:48 PM
Dear Liviu,
Thank you very much. I have resolved this. I wrote a python script to parse the xml fet file.
Your first response was very helpful.

Thanks
Title: Re: TOTAL NUMBER OF STUDENTS PER ACTIVITY REPORT
Post by: Liviu Lalescu on October 30, 2021, 05:17:05 PM
Hello, msir,

You are welcome!  :)