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

CCLE-6510 - Better error message for google drive resource access #5

Open
wants to merge 1 commit into
base: batching
Choose a base branch
from
Open

Conversation

zane-a-karl
Copy link

Displayed link to allow user to connect their google drive account to moodle and access class documents.

lib.php Outdated
@@ -512,6 +514,44 @@ public function supported_returntypes() {
return FILE_INTERNAL;
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this code just copied over from the preferences_form? Is that really necessary?

lib.php Outdated
$repo_options = array();
$gdriverepo = new repository_googledrive($googledrive_repo->id, $context, $repo_options);
if ($status != 'connected') {
$errormsg = "<strong>Please Link Your Google Apps Account Before You Can View This Resource.</strong>";
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably use the language files instead of hard coded strings.

@zane-a-karl
Copy link
Author

TESTING INSTRUCTIONS
[1] login in to localhost as admin
[2] separately log into one of your google email accounts and connect your google drive account
Go to preferences and miscellaneous
[3] as admin, go to a class
[4] turn editing on
[5] add an attachment or resource
[6] scroll to the bottom of the file picker and choose "file"
[7] click on the google drive extended option and add a file from your google drive
[8] under appearance choose embed
[9] save and return to class
[10] log in a student in that class
[11] log in to a different google account and/or disconnect admin's google drive account connection
[12] try to access the added file
[13] prompt should appear and ask you to click on a link to connect you google account
[14] connect your account to view the resource.

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

Successfully merging this pull request may close these issues.

2 participants