Setting the colour for subjects

Started by sasbland, August 24, 2021, 09:20:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sasbland

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.

Liviu Lalescu

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.

Liviu Lalescu

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.

sasbland

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.

Liviu Lalescu

You're welcome! I advise to keep subjects without the stundents' names.