FET Forum

FET Support (English) => Get Help => Topic started by: sasbland on August 24, 2021, 09:20:52 AM

Title: Setting the colour for subjects
Post by: sasbland on August 24, 2021, 09:20:52 AM
Hi,

Is it possible to set that the same subject will have the same colour (doesn't matter what the colour is) across all different timetables? We have to compare lots of timetables of different groups of students, so it would make it a lot easier. Thanks.
Title: Re: Setting the colour for subjects
Post by: Liviu Lalescu on August 24, 2021, 09:40:05 AM
I am referring to the HTML timetables, because this is what I think you refer to.

I checked now (because it is Volker's code) and the colors are like this:

- For students, the color is constant for the same subject.
- For teachers, the color is constant for the same subject+students in the activity.

It is easy to customize FET to consider only the subject for the automatic color for all timetables.

Also, you can see the filename.css file in the HTML timetables, it has something like this:

td.c_1 { /* Activity id: 21 (subject) */
background-color: rgb(102, 78, 135);
color: white;
}

and

td.c_20 { /* Activity id: 21 (subject+students) */
background-color: rgb(183, 101, 207);
color: black;
}

which you can modify, but this CSS file will be always overwritten and it is a lot of work.
Title: Re: Setting the colour for subjects
Post by: Liviu Lalescu on August 24, 2021, 10:27:24 AM
Quote from: Liviu Lalescu on August 24, 2021, 09:40:05 AM
It is easy to customize FET to consider only the subject for the automatic color for all timetables.

More precisely, in src/engine/timetableexport.cpp, change the line 2557 to be the same as line 2538.
Title: Re: Setting the colour for subjects
Post by: sasbland on August 28, 2021, 11:03:39 AM
Thanks for this. I think because I add the student group in the subject name so FET treats it as different subject. I think it's minor so I'll leave it.
Title: Re: Setting the colour for subjects
Post by: Liviu Lalescu on August 28, 2021, 11:07:00 AM
You're welcome! I advise to keep subjects without the stundents' names.