Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-58535

One Drive Repository "Controlled Link" issues

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.3
    • Component/s: Repositories
    • Labels:
    • Testing Instructions:
      Hide

      Prerequisites:

      1. Setup a Microsoft Application Project
      2. Set up a working Microsoft Office OAuth Service
      3. Connect a system account to the Microsoft OAuth 2 service.
      4. Enable and configure the Microsoft OneDrive repository.
        1. Set the "OAuth 2 service" to the Microsoft OAuth 2 service that was set up earlier.
        2. Make sure to enable controlled links. This is done by setting "Supported files" to "Internal and External" and "Default return type" to "External (only links stored in Moodle)"

      Taken from MDL-58220:
      Verify the behaviour of controlled links.

      Create an assignment allowing file uploads.
      As a student upload a word document from onedrive (as a controlled link).
      Verify the file shows in Moodle as a link.
      Verify clicking on the link gives you read access to the file.
      Verify deleting the original file from onedrive does not affect the file linked to Moodle.
      Login as a teacher with "Edit other submission" capabilities (not default).
      Verify clicking on the link gives you WRITE access to the uploaded file.

      As a student upload a word doc file from onedrive.
      Verify the file shows in Moodle as a link.
      Verify clicking on the link gives you read access to the file.
      Verify changing the link (append &offline=1) gives you an offline (.doc) version of the file (this is for mobile offline access).

      Scheduled task
      1. Login as an admin.
      2. Go to "Site administration / Server / Scheduled tasks"
      3. Look for the "Remove temporary write access from controlled links. (\repository_onedrive\remove_temp_access_task)" scheduled task.
      4. Click "Run now"
      5. Confirm to run the scheduled task.
      6. Check the output.
        • Confirm that the scheduled task finishes successfully and that there are no error messages shown.
      Show
      Prerequisites: Setup a Microsoft Application Project Set up a working Microsoft Office OAuth Service Connect a system account to the Microsoft OAuth 2 service. Enable and configure the Microsoft OneDrive repository. Set the " OAuth 2 service " to the Microsoft OAuth 2 service that was set up earlier. Make sure to enable controlled links. This is done by setting " Supported files " to " Internal and External " and " Default return type " to " External (only links stored in Moodle) " Taken from MDL-58220 : Verify the behaviour of controlled links. Create an assignment allowing file uploads. As a student upload a word document from onedrive (as a controlled link). Verify the file shows in Moodle as a link. Verify clicking on the link gives you read access to the file. Verify deleting the original file from onedrive does not affect the file linked to Moodle. Login as a teacher with "Edit other submission" capabilities (not default). Verify clicking on the link gives you WRITE access to the uploaded file. As a student upload a word doc file from onedrive. Verify the file shows in Moodle as a link. Verify clicking on the link gives you read access to the file. Verify changing the link (append &offline=1) gives you an offline (.doc) version of the file (this is for mobile offline access). Scheduled task Login as an admin. Go to " Site administration / Server / Scheduled tasks " Look for the " Remove temporary write access from controlled links. (\repository_onedrive\remove_temp_access_task)" scheduled task. Click " Run now " Confirm to run the scheduled task. Check the output. Confirm that the scheduled task finishes successfully and that there are no error messages shown.
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-58535-master

      Description

      Creating a "Controlled link" with the onedrive repository is unreliable. There are some (undocumented) restrictions on copying files between different types of onedrive accounts that are giving me a headache.

      According to https://stackoverflow.com/questions/37700948/microsoft-graph-api-how-to-copy-shared-folder-between-accounts-in-onedrive-busi it is not supposed to work - but I did get it working before but I can't remember what type accounts they were and it doesnt work for me now.

      We will have to do a download / upload which will be slower but more reliable.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/May/17