FET Forum

FET Support (English) => Programming Help => Topic started by: DucBeNho on April 10, 2025, 03:17:16 AM

Title: How to get the detail announcements
Post by: DucBeNho on April 10, 2025, 03:17:16 AM
I'm using fet-cl.exe. When the timetable is not resolved, I get announcement saying "Cannot precompute - data is wrong - aborting". But I want to show detail like "Activity with id=%1 has no allowed slot - please correct that.". Instead of using "bool Generate::precompute", I made "QString Generate::precompute" that return notification like I want.
But this code in fet.cpp doesn't work. Please help me.

BTW if this way is not optimal, please give me a suggestions. Thanks!
Title: Re: How to get the detail announcements
Post by: Liviu Lalescu on April 10, 2025, 06:39:19 AM
Hello,

In the new versions, you will have two files: "logs/errors.txt" and "logs/warnings.txt". These are what you are looking for.
Title: Re: How to get the detail announcements
Post by: DucBeNho on April 10, 2025, 09:41:43 AM
Oh, many thanks.

We have 31 cities, each city has 10 - 13 districts, and each district has 20 schools.
So, our problem is: if each school want to get a individual notification, how can we make it. My job is research this problem. Do you have any idea?

Our schools have a shool_id, after they get errors or warning message, I will modify messages for them corresponding to their shool_id, I thinks. But how can I do it??

I know this function is very complicated.
Thanks again so much.
Title: Re: How to get the detail announcements
Post by: Liviu Lalescu on April 10, 2025, 10:06:10 AM
I am sorry, but I am not sure I can instruct you with this. I hope others have ideas.
Title: Re: How to get the detail announcements
Post by: Liviu Lalescu on April 14, 2025, 07:42:42 PM
You could use the option "--outputdir=..." of FET-CL, and for each institution choose a different directory.
Title: Re: How to get the detail announcements
Post by: DucBeNho on April 15, 2025, 03:22:45 AM
Yes, I got it.
But I mean different notifications but same error/warning. Like that:
- School A: Activity with id=%1 has no allowed slot - please correct that.
- School B: Teacher %2's activity can't be located in time table.
- School C: Teacher %2's activity with id=%1 has no allowed slot.
- ...
These cases are my own, but I'm sure the notification that individual schools require will be very complex.