Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Feature: Session Reminder and Configuration as a User Default Settings #7841

Conversation

fhelfer
Copy link
Contributor

@fhelfer fhelfer commented Jul 23, 2024

This PR adds a new User Default Setting to enable/disable the option to configure a Session Reminder time in User Settings.

Feature Wiki: https://docu.ilias.de/goto_docu_wiki_wpage_8270_1357.html

@fhelfer fhelfer force-pushed the feature/session-reminder-user-configration branch from 3c94d59 to 85997c0 Compare August 12, 2024 13:33
@fhelfer fhelfer force-pushed the feature/session-reminder-user-configration branch from 44b26e4 to 20438d5 Compare August 20, 2024 08:31
Copy link
Contributor

@mjansenDatabay mjansenDatabay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx @fhelfer for your contribution.

I added some minor remarks for the changes in the the Authentication component.

We should have a chat about the naming of the *LeadTime-methods, which I am not so happy with.

  1. getGlobalSessionReminderLeadTime
  2. getAcceptableLeadTime
  3. getLocalSessionLeadTime
  4. getMaxLeadTime

The first and last names are more or less self-explanatory, but: What is the concept of "acceptable"? "acceptable" for whom? Do you mean something like "effective", and what do you mean by "local"? Do you mean something like individual?

Best regards,
Michael

@mjansenDatabay mjansenDatabay added the php Pull requests that update Php code label Aug 20, 2024
@fhelfer fhelfer requested a review from mjansenDatabay August 20, 2024 11:19
@fhelfer fhelfer requested a review from mjansenDatabay August 20, 2024 14:05
@fhelfer fhelfer force-pushed the feature/session-reminder-user-configration branch from e1af724 to e5e247a Compare September 19, 2024 13:29
Copy link
Contributor

@kergomard kergomard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @fhelfer

Thank you very much for this PR! I will wait with merging until this feature pr is merged #8116, this will also mean, that you will need to rebase to consolidate the user update steps. So you might want to wait until the merge, before working on this again. When you consolidate this, please make sure to not add use statements for classes in the global namespace.

I would like the following changes, but let me know, if you see something wrong with them:

  • I don't like this getter here. "getSelect" has an abysmal semantic value already, but "getInput" is even worse. I would kindly ask you to change this to something more specific and to only retrieve the 'default_session_reminder', this way at least I get, what we are doing here.
  • On the other hand this here seems oddly over specific: We have "selection", and then "session_reminder_lead_time". Shouldn't this rather be "numeric"?

One very small additional change:

  • Could you please remove the camelCase here as you are touching this variable anyway.

Other then this I think things are fine. I will make a little smoke test after the changes and the rebase.

Thanks again and best,
@kergomard

@fhelfer fhelfer force-pushed the feature/session-reminder-user-configration branch from e5e247a to aa6924d Compare October 16, 2024 15:22
@fhelfer fhelfer requested a review from kergomard October 16, 2024 15:28
@kergomard
Copy link
Contributor

kergomard commented Oct 23, 2024

Thank you very much for the fixes @fhelfer !

I now did some smoke tests and sadly there is still something wrong (sorry for missing it, when reading through the code):
-Please fix the update step, as you are inserting 'session_reminder_lead_time' twice, if 'session_reminder_enabled' has a value, this throws a duplicate primary key error. Please also wrap the whole step into an if-statement to only be executed if there is not already a 'session_reminder_lead_time' value, this way it is made easier to rerun the step on failure.

I assume the changes in Auth to be covered by the thumbs-up from @mjansenDatabay and will thus merge as soon as you have fixed this,
@kergomard

@mjansenDatabay
Copy link
Contributor

I assume the changes in Auth to be covered by the thumbs-up from @mjansenDatabay

This is right

@fhelfer fhelfer force-pushed the feature/session-reminder-user-configration branch from 00fddd1 to e7bdc08 Compare October 23, 2024 07:43
@fhelfer
Copy link
Contributor Author

fhelfer commented Oct 23, 2024

Hey @kergomard,

would you have another look at it. I also added dbupdatestep to remove session_reminder_enabled from usr_pref.
If the changes are fine please go ahead and merge

Thx and Best @fhelfer

@kergomard
Copy link
Contributor

Thank you very much @fhelfer !
This looks fine now.
For the record: Failing tests are not because of this PR.

@kergomard kergomard merged commit 32fdb75 into ILIAS-eLearning:trunk Oct 23, 2024
1 of 3 checks passed
@oliversamoila
Copy link

Thank you very much, @kergomard, @fhelfer and @mjansenDatabay 😊

@fhelfer fhelfer deleted the feature/session-reminder-user-configration branch November 20, 2024 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants