Moodle in English

Discussions started in Moodle in English

Moodle in English -> General help 4.1dev+ (Build: 20221104) - OneDrive Repository - Exception - notAllowed: The operation failed because sharing has been disabled on this site.

by Jerry Lau -
So I selected a file on my OneDrive repository and selected the radio button

We are on  4.1dev+ (Build: 20221104)

"Create an access controlled link to the file" and clicked on Save but got this error instead.

Exception - notAllowed: The operation failed because sharing has been disabled on this site.

File:  /lib/classes/oauth2/rest.php
Line: 123

Error code: generalexceptionmessage
* line 123 of /lib/classes/oauth2/rest.php: core\oauth2\rest_exception thrown
* line 748 of /repository/onedrive/lib.php: call to core\oauth2\rest->call()
* line 960 of /repository/onedrive/lib.php: call to repository_onedrive->set_file_sharing_anyone_with_link_can_read()
* line 1289 of /lib/filelib.php: call to repository_onedrive->reference_file_selected()
* line 344 of /lib/filelib.php: call to file_save_draft_area_files()
* line 159 of /user/classes/form/private_files.php: call to file_postupdate_standard_filemanager()
* line 77 of /lib/form/classes/external/dynamic_form.php: call to core_user\form\private_files->process_dynamic_submission()
* line 261 of /lib/externallib.php: call to core_form\external\dynamic_form::execute()
* line 81 of /lib/ajax/service.php: call to external_api::call_external_function()
How do I start to understand to try and fix this?

Average of ratings: -

Moodle in English -> General help OneDrive Repository - clicking on login brings me to home page not to the OneDrive Repository

by Jerry Lau -
I have a strange behaviour when we have OneDrive repository setup

OneDrive Repository is activated but when we try and add through Private Files and select the onedrive repository, it shows "login to my account"... then when I click on it, it goes to my home page and not to my OneDrive repository! 

no errors.. just looks like a redirection





clicking the login to your account ... brings me back here




Average of ratings: -

Moodle in English -> Repositories OneDrive Repository - clicking on login brings me to home page

by Jerry Lau -
hello there

We have OneDrive activated but when we try and select the onedrive repository, it shows "login to my account"... when I click on it, it goes to my home page and not to the repository! 

no errors.. just looks like a redirection

strange




Average of ratings: -

Moodle in English -> General developer forum Automate and programmatically clone/copy and existing course

by Jerry Lau -

Hello folks.

We are using Moodle 3.11 and beta testing version 4.1 dev and this idea came up

Is there a way to programmatically on the backend write a program or script to "copy" and create a new course from an existing course the users wishes to copy from rather than doing it manually?

For example, if I have a web form which ask the users to:

  1. Select the category of the course they wish to copy (dropdown).
  2. Then it shows the courses within that category (dropdown) which the user selects.
  3. Then it shows a dropdown of the categories that the user wishes to put the copied course into.
  4. Then optionally, it has a text field of what the "nw" title of the course name is going to be.
  5. They click on Next and it then triggers some sort of db or php script to get that course and data they selected and creates it in the category they selected.

Is this possible and what are the points of problem that may come up if this can be done?

thanks

Dave


Average of ratings: -

Moodle in English -> General help Understanding OneDrive and Moodle files

by Jerry Lau -

Hello everyone.

We are on:

O/S: Ubuntu 16.04+,  Version: 3.9.4+ (2020061504.01), Release: 01.22.2021, PHP: 7.2.34-21, MySQL5.7.31

Trying to get an understanding about OneDrive.

Once we implement this, my questions are:

1. If a student/user/teacher  is connected to their oneDrive and using the file picker, they "upload" or submit their file (say 5 GB -  a video or drawing file) as an assignment or something to a course, is this file an actual file that is "pushed" to our moodle data directly and stored there or IS IT just a link to the user's OneDrive repository? If not, would it not defeat the purpose of reducing large moodledata directory space?

2. I hope it the previous where it is just a link and not an actually file stored on the moodle data folder. I think so because uploading large files is resource intensive and could time out.

3. If it is a link, what happens if the student or user has left the school, would the link still be active where the instructor can still view their file?

Ideally, we'd like to inform our instructors to backup their course files and save it to their OneDrive repository instead to save space on the moodle server.

Thank you in advance for clarifying and educating me on the 3 questions I have above.

Regards.

Dave.




Average of ratings: -