FET Forum

FET Development => Suggestions => Topic started by: Benahmed Abdelkrim on May 13, 2026, 08:46:09 PM

Title: ordered activities
Post by: Benahmed Abdelkrim on May 13, 2026, 08:46:09 PM
Hello!
In the HTML timetables, activities are ordered according to their "IDs". Can they be ordered according to their activity tags?

See the attached screenshot below...
Title: Re: ordered activities
Post by: Liviu Lalescu on May 14, 2026, 06:47:13 AM
Hello, dear Benahmed,

I'll add your words in the list of suggestions.
Title: Re: ordered activities
Post by: Volker Dirr on May 16, 2026, 08:40:50 AM
Sadly difficult.

It is easy if the activities contains only 1 tag, but it will be more difficult if there are 2 tags.

Example:
activity 1: Tag "C"
activity 2: Tag "B" and "D"
activity 3: Tag "E" and "A"
activity 4: Tag "A" and "E"

So first: Just we care about the order? So should be activity 3 the same order as activity 4?
And after that: How to order activity 3 and 1?
...
 
Title: Re: ordered activities
Post by: Liviu Lalescu on May 16, 2026, 09:37:56 AM
It is easy: compare the activity tags as a QList comparison operator.

But is this good for everybody?
Title: Re: ordered activities
Post by: Volker Dirr on May 16, 2026, 10:24:38 AM
Good question.
Also what about "hidden" tags. Must be removed first.
Title: Re: ordered activities
Post by: Liviu Lalescu on May 16, 2026, 10:53:32 AM
It will then remain in the TODO for now, and we'll think about it.
Title: Re: ordered activities
Post by: Benahmed Abdelkrim on May 16, 2026, 06:41:50 PM
Quote from: Liviu Lalescu on May 16, 2026, 09:37:56 AMIt is easy: compare the activity tags as a QList comparison operator.

But is this good for everybody?


This problem arose while I was preparing the exam schedules. Each real room has three teachers. One of them is the room leader. This teacher is identified by a tag (tag1, for example). All these tags must be listed first. I found a workaround using TiTiTo's import/export function. I deleted the untagged activities, then tagged the relevant ones. Then I reintroduced the deleted activities so that the tagged ones appeared first in the time tables. Finally, I introduced the necessary time and space constraints.

I think adding this feature will be very useful for users and for FET as well.
Title: Re: ordered activities
Post by: Benahmed Abdelkrim on May 17, 2026, 04:21:19 AM
Quote from: Volker Dirr on May 16, 2026, 08:40:50 AMSadly difficult.

It is easy if the activities contains only 1 tag, but it will be more difficult if there are 2 tags.

Example:
activity 1: Tag "C"
activity 2: Tag "B" and "D"
activity 3: Tag "E" and "A"
activity 4: Tag "A" and "E"

So first: Just we care about the order? So should be activity 3 the same order as activity 4?
And after that: How to order activity 3 and 1?
...
 

Even if the activities have more than 1 tag, the order should be by sets of tags. If you say: set 1, which should appear first, the first set contains, for example, nb1 tags, the second set contains nb2 tags, the third set contains nb3 tags, then the order would be: set 1, set 2, set 3. Within each set, the order of the activities doesn't matter; what matters is the order of the sets of tags.

In order to achieve this, the sets of tags must be independent; that is to say, they must not have any tags in common. This condition must be verified before the order.
Title: Re: ordered activities
Post by: Benahmed Abdelkrim on May 17, 2026, 05:14:35 AM
By the way, activities may share common tags, but sets of tags do not. Therefore, order would be easy if we focused on the order of the sets of tags rather than the order of the activities themselves.
Title: Re: ordered activities
Post by: Liviu Lalescu on May 17, 2026, 06:49:13 AM
I think I understand, Benahmed. That was also my idea: just sort by the list of tags of each activity, considered as a continuous string.

There is the possibility that some users might prefer the old order by activities ids.

I'll add this in the TODO. We'll think about this.
Title: Re: ordered activities
Post by: Benahmed Abdelkrim on May 17, 2026, 03:14:36 PM
Thank you, Liviu!
Title: Re: ordered activities
Post by: Liviu Lalescu on May 17, 2026, 03:16:20 PM
You're welcome, Benahmed!  :)