Forumindlæg af 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?

Gennemsnitsbedømmelse: -
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




Gennemsnitsbedømmelse: -
thank you but this is done manually..

I want to do it programmatically from our SIS system once a new class is created in the SIS ERP, then is triggered to create the moodle course from a template.. not sure if possible as they are 2 distinct platforms and tech stack

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


Gennemsnitsbedømmelse: -