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

Flavours/Logos & Policies & Login #684

Open
create-martin opened this issue Jul 4, 2024 · 1 comment
Open

Flavours/Logos & Policies & Login #684

create-martin opened this issue Jul 4, 2024 · 1 comment
Labels
bug Something which isn't working

Comments

@create-martin
Copy link

create-martin commented Jul 4, 2024

Describe the bug
So, I have a quite simple setup.
A couple of flavours that just change the Logo & compact Logo based on cohorts.
I also have tool_policy set up, for privacy agreement.

If I login (for the FIRST TIME!!) with a user, I first get to see the policy (as expected), but the Logo is not loading:

image

The path for the logo is:
DOMAIN/pluginfile.php/1/theme_boost_union/flavours_look_logocompact/11/1720080992/logo-file-name.png

After I accept the policy, I get redirected to the logo image (it will actually just load the image). I need to manually change the URL to get to the dashboard, which of course is an absolutely no-go for first-time-users.

My guess: on the policy site, the flavour is not loading correctly (maybe user is not fully logged in, hence cohort-info is not there?), and the logo-file-path gets "saved" in the background. And after the completed login, Moodle automatically forwards me to the URL it was not able to load before.
(kind of like, when I enter a direct link into a course, I get redirected to login-page and after login I get forwarded to course-url, I entered before)

Upon second login, it works --> as I'm not presented with the policy, hence cohort is directly know after login and the logo can be loaded...

I think, the issue lies with the path to the flavour-logos, which probably can only be loaded, when user is logged in (which makes of course total sense from a security perspective).

Note: if I use a user, that is NOT using a flavour, it works just fine.

Not sure about possible solution, since I just don't know about the actual "login state" of a user during policy-agreement.
But...would it be possible to upload the logos as Union ressources (which are available without login) and then on the flavours page select a file from the ressources?

To Reproduce
Steps to reproduce the behavior:

  1. Create a new cohort
  2. Create flavour with different logo and cohort-restriction
  3. Create a site policy using tool_policy (mandatory one)
  4. Create a user, add it to the new cohort and login with this user

Expected behavior
Ideally, already show correct flavour-logo on policy-page.

If that is not possible, due to Moodle restrictions, could there be a fallback to the "normal" Union Logo? (this one gets shown correctly on policy site). So there should not be a path Moodle cannot load, so after policy agreement, there is no need for Moodle to try to forward me somewhere...

@create-martin create-martin added the new Something which has been reported but has not yet beeen triaged by the team label Jul 4, 2024
@whuml
Copy link
Collaborator

whuml commented Jul 17, 2024

Hi @create-martin
thanks for identifiying that issue.
I reproduced it on Moodle 4.4.1 (Build: 20240610), Boost Union v4.4-51.
Assuming, that this behaviour is not the preferred one, I marked it as bug ;-)
brgds
Wolfgang

@whuml whuml added bug Something which isn't working and removed new Something which has been reported but has not yet beeen triaged by the team labels Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something which isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants