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

Loading localOverrides.conf in a course.conf comes too late for the LTI tab in Course Config #2181

Open
Alex-Jordan opened this issue Aug 16, 2023 · 4 comments

Comments

@Alex-Jordan
Copy link
Contributor

In 2.18, suppose localOverrides.conf does not load authen_LTI.conf. But a course's course.conf file loads authen_LTI.conf instead. And inside authen_LTI.conf, there is some uncommenting of @LTIConfigVariables. This should reveal the LTI tab in the Course Config page, but it does not.

@Alex-Jordan
Copy link
Contributor Author

I can assign @LTIConfigVariables in localOverrides.conf without loading authen_LTI.conf, and that is enough to reveal the LTI tab. But now it is revealed for all courses which is not desired.

I'm trying to let those courses which use LTI load authen_LTI.conf, and leave it out of those courses which do not. (Which I admit may be unnecessary.) So I load authen_LTI.conf in some course's course.conf file, but that leads to this issue of the LTI tab being absent.

@drgrice1
Copy link
Sponsor Member

Have you tried also including the LTIConfigValues.config in the course's course.conf file after including the authen_LTI.conf file? I haven't tested this, but it might work.

@Alex-Jordan
Copy link
Contributor Author

That does work. I guess I don't understand why though. That is already included by defaults.config. So why does this help?

@drgrice1
Copy link
Sponsor Member

The first time that LTIConfigValues.config is included by defaults.config, The @LTIConfigVariables array is empty (actually it is undefined) since authen_LTI.conf has not been included. So the "LTI" section of the config is not added by the code at the end of LTIConfigValues.config. When authen_LTI.conf is included in course.conf it defines and populates the @LTIConfigVariables array. So when LTIConfigValues.conf is included after that in course.conf, the "LTI" section is added.

Fortunately this is all done in the safe compartment without strict, and we don't catch warnings when the config files are loaded by the course environment. Otherwise there would be problems!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants