Mornings / Afternoons mode with different number of classes

Started by nelsonjrgomes, June 24, 2024, 11:59:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nelsonjrgomes

Hi,

One suggestion: Is it possible to make mornings/afternoons mode with a different number of periods in each one? In my school (and I believe in many schools in Portugal) the number of hours in the mornings is greater than the ones in the afternoons (in our institution, 6 in the morning and 2 to 4 in the afternoons, depending of the school year). Of course the program works as is, but when trying to print the timetables, they become nearly unreadables, as they end up using more than one page...

Thanks in advance,

Liviu Lalescu

Hello,

Do you use a recent version of FET, which shows the timetables for the Mornings-Afternoons mode for real days/real hours?

Indeed, as you say, the program works as it is, because you can add a break or not available constraints in the first or better last hours of each afternoon. If you add X in the last hours of the afternoons, the timetables might be acceptable to print, because you will only lose below the page the X-s. But I admit it might be ugly.

Maybe a good setting would be to allow the user, with a FET setting, to choose to hide a row or column in the timetables if it contains only X-s.

I will add this conversation in the TODO, thank you for the suggestion!

nelsonjrgomes

Thank you for your (as usual) quick reply!

Yes, I use the latest version, that I downloaded last weekend (6.22.0) - and, in fact, I can already see the much useful real days in the tables.

When I see the output file (in Chrome, Edge, Firefox, ...) the tables are there, easy to read (with a couple of lines with no useful info). However, when I try to print them, in Chrome and Edge the first rows are missing - could be just a couple rows missing, or the whole morning classes, as the example I attach The missing rows do not appear in the previous page, they simply dissapear. This way, when trying to print tables they becomes unreadable; when I try in Firefox, the output is a bit more readable, if I reduce the  scale.

Liviu Lalescu

You are welcome!

Please allow me to think for a bit. Meanwhile, could you please try and let me know of the latest snapshot: https://lalescu.ro/liviu/fet/forum/index.php?msg=33305 , and check Chrome, Edge, and Firefox? We made some slight changes in the HTML timetables.

Liviu Lalescu

I think we could add a Boolean attribute to each day/real day/hour/real hour, "Hide_If_Empty"; what do you say, Volker? I am not sure how difficult is it in the HTML timetables. I will begin to try something now, but if it is not feasible we may abandon the idea; I am waiting for Volker's opinion.

nelsonjrgomes

Hi,

The tables are now perfectly readable, when I try to print them (Chrome, Firefox and Edge all work well) - just adjust the scale a bit (some of the timetables are quite wide, due to the info). I keep having the problem with too many lines in the morning/afternoon, but that is another question.

Thanks once again,

Liviu Lalescu

Hello,

That is great! Volker and I, we fixed some minor things in the HTML timetables in the current snapshot (which you just tried).

Do you think that adding a Boolean attribute to each day/real day/hour/real hour is useful? If this Boolean is true, the timetables will hide the d/rd/h/rh if the whole row/column is empty (no activity).


nelsonjrgomes

Hi,

If possible, that would solve the problem - as I said previously, timetables are generated with the program as is, the only question is the output, that is not easily readable. If it's possible to hide the unused hours in the afternoon (but keep the breaks along the day), it would be perfect.

You can see the actual output of two one of the classes (One of them is the most difficult as there is more info per cell, the other ones are smaller/easier to read).   

Liviu Lalescu

Hello,

Exactly, I mean each hour will have a true/false value for hiding if empty. The breaks will have this value false, the others true - you will set each value to true separately, in the hours dialog.

I am waiting for Volker's opinion. It should be possible, but it is a lot of tedious work :)

Volker Dirr

hmm... Yes, should be possible, but a lot of work.
I fear we sadly need to read/check the whole data before writing it. It is impossible to get the information "on the fly" while writing the timetable. (So it mean in worst case the speed will be 2 times slower while printing/exporting data).
We also need to care about all places where we use colspan in the table head, since it must be reduced by the hidden number of columns.
I am busy today and tomorrow. I will have a closer look on Wednesday.

Liviu Lalescu

#10
Thank you, Volker! The span is not complicated. I will make some tries. Yes, the time might be double, if all the days/hours have this Boolean value true. But it is not a big problem. I have thought how to do it. Make a Boolean matrix isEmpty[nsubgroups][ndays][nhours] and compute it beforehand, then check each line and column and create other two Boolean matrices isEmptyRow[nsubgroups][ndays] and isEmptyColumn[nsubgroups][nhours] and use these when printing the timetable.

I will try something without your advice, and wait for your answer when you will have time.

Volker Dirr

Yes, looks nice. Let's talk by email some more again.

Liviu Lalescu

Hmm... I have begun trying something, but there are reasons why I prefer to postpone it for now. I will think about it in the future and write here if I will try on it some more.