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

Alternative user identifier field is not work when creating an activity/meeting #501

Open
JcpPY opened this issue Jul 25, 2023 · 10 comments
Assignees
Labels
bug Fixes problems or reduces technical debt more information needed Need more information from user

Comments

@JcpPY
Copy link

JcpPY commented Jul 25, 2023

Hello, I am testing this version in Moodle version 4.1+ (Build: 20221222) (2022112800.05) with Oauth server to server and when placing the credentials and save, I get the error:
Connection status: Connection failed: HTTP Status 403
I tried the credentials via postman and I got an ok response.

Thank You in advance and regards.

Juan Carlos

@JcpPY
Copy link
Author

JcpPY commented Jul 26, 2023

Hi,
We found these plugin-related errors in our installation.
Could this be the cause of the error message we are getting?

mod_fcgid: stderr: PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/moodle/public_html/lib/mustache/src/Mustache/Loader/FilesystemLoader.php on line 133, referer:
mod_fcgid: stderr: PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/moodle/public_html/lib/mustache/src/Mustache/Loader/FilesystemLoader.php on line 133, referer:
mod_fcgid: stderr: PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/moodle/public_html/lib/mustache/src/Mustache/Loader/FilesystemLoader.php on line 133, referer:

According to some users this happens under PHP 8.1, which is our case, we use that version.

Regards

@jrchamp
Copy link
Collaborator

jrchamp commented Jul 31, 2023

Hi @JcpPY,

I'm not sure why it's not working for you. Those errors message are from Moodle itself and should not be possible. You may want to report an issue to Moodle, because that line should not be reachable: https://github.com/moodle/moodle/blob/a1d5d1b2f758a3178bff4c42883a477f4b1ea50c/lib/mustache/src/Mustache/Loader/FilesystemLoader.php#L133

Moodle specifically overrides that method because they never initialize the baseDir class variable: https://github.com/moodle/moodle/blob/a1d5d1b2f758a3178bff4c42883a477f4b1ea50c/lib/classes/output/mustache_filesystem_loader.php#L66

As far as the issue you are experiencing, please make sure you have granted the required scopes to the Server-to-Server OAuth app.

@jrchamp
Copy link
Collaborator

jrchamp commented Jul 31, 2023

Also, please make sure you are using Moodle 4.1.2 or newer if you are using PHP 8.1.

@JcpPY
Copy link
Author

JcpPY commented Aug 1, 2023

Hi Jonathan
Thanks for your answer.
Let's switch to PHP 7.4 and see how it goes

@JcpPY
Copy link
Author

JcpPY commented Aug 1, 2023

PHP 7.4 installed, but same thing:
Connection status: Connection failed: HTTP Status 403
Changing Zoom API Identifier from email address to username we have this status
Connection status: Connection working
But in this case we get this message when trying to create rooms
Unable to find your account on Zoom. If you are using Zoom for the first time, you must activate your Zoom account by logging into https zoom us. Once you've activated your Zoom account, reload this page and continue setting up your meeting. Else make sure your email on Zoom matches your email on this system
In moodle we would only have to see this:
admin/environment/phpextension/soap
It is the only warning that we have as a recommendation

@jrchamp
Copy link
Collaborator

jrchamp commented Aug 1, 2023

It sounds like you are saying:

  • In Moodle, the user's email address is [email protected], and username is [email protected]
  • In Zoom, the username is [email protected]
  • In mod_zoom, you have changed the identifier field from email to username and it's working on the Connection test, but it's not working when trying to add an instance of the mod_zoom activity (specifically, creating a new Meeting).

Is that correct?

@JcpPY
Copy link
Author

JcpPY commented Aug 1, 2023

Hi, yes, that is correct

@jrchamp jrchamp added the bug Fixes problems or reduces technical debt label Aug 3, 2023
@jrchamp jrchamp changed the title Release v5.0.0 Alternative user identifier field is not work when creating an activity/meeting Aug 3, 2023
@JcpPY
Copy link
Author

JcpPY commented Sep 26, 2023

Hello Jonathan
We are not able to use the plugin yet. we tried the latest version, same error. For testing purposes we installed local versions of the latest Moodle version and same result. Is it possible that you could take a look at our case?
Regards

@jrchamp
Copy link
Collaborator

jrchamp commented Sep 30, 2023

Sorry @JcpPY, I have this on my list to look at. This week is not possible, but hopefully the week after.

@jrchamp jrchamp self-assigned this Nov 2, 2023
@jrchamp
Copy link
Collaborator

jrchamp commented Nov 2, 2023

Hi @JcpPY - I have tried everything I can to reproduce the error you reported. I have tried setting the Zoom API identifier to username, idnumber and email. It works every time for me. If possible, can you try using the Zoom user identifier (it's a bunch of random letters that shows up in links from the User Management -> Users list) to see if that works?

@jrchamp jrchamp added the more information needed Need more information from user label Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes problems or reduces technical debt more information needed Need more information from user
Projects
Status: To Do
Development

No branches or pull requests

2 participants