3.8.4+ File Upload Feedback Export to Portfolio

3.8.4+ File Upload Feedback Export to Portfolio

by Bret Miller -
Number of replies: 3
Picture of Particularly helpful Moodlers

On file upload assignments, our teachers provide grading and feedback by uploading a feedback file. While the student can download the file to view it, there is link below the file that says "Export to Portfolio" which when clicked causes an error:

Sorry, the requested file could not be found

More information about this error

Debug info:

Error code: filenotfound

Stack trace:

    • line 9499 of /mod/assign/locallib.php: portfolio_caller_exception thrown
    • line 185 of /portfolio/add.php: call to assign_portfolio_caller->load_data()
Is this a permissions issue, or just a bug in the export to portfolio code? The file obviously exists since you can click on the file and it downloads.
Average of ratings: -
In reply to Bret Miller

Re: 3.8.4+ File Upload Feedback Export to Portfolio

by Ken Task -
Picture of Particularly helpful Moodlers

Group submitted files?

1st file reported in error is in this section of code:

    if (empty($submission)) {
            throw new portfolio_caller_exception('filenotfound');
        } else if ($submission->userid == 0) {
            // This must be a group submission.
            if (!groups_is_member($submission->groupid, $this->user->id)) {
                throw new portfolio_caller_exception('filenotfound');
            }
    } else if ($this->user->id != $submission->userid) {
            throw new portfolio_caller_exception('filenotfound');
        }

line 185 of code/file has this:

    $caller->load_data();
    // this must check capabilities and either throw an exception or return false.
    if (!$caller->check_permissions()) {
        throw new portfolio_caller_exception('nopermissions', 'portfolio', $caller->get_return_url());
    }

Ownerships/permissions on files created for export?

'SoS', Ken

In reply to Ken Task

Re: 3.8.4+ File Upload Feedback Export to Portfolio

by Bret Miller -
Picture of Particularly helpful Moodlers
I would bet it's the second condition. Teacher submits (uploads) the feedback file so the teacher owns it and the student can't export to portfolio even though they can download it. Time to add it to tracker...
In reply to Ken Task

Ri: Re: 3.8.4+ File Upload Feedback Export to Portfolio

by Andrea Tullo -
Hi,
More info on this, any news?
i'm having the same problem, i have 2 admin account, i set up an assignment and upload a file with the first account, then if i try to export to portfolio with my second admin account, then i'm getting the exact same error message, same goes for editingteacher-student pair, i have this problem in 3.8.3 as well as 3.10, i don't understand if it's a bug or it's inteded that you can export only your files (even tho i can download them no problem), i also tried to upload it with "public domain" same error.
Do you know anything that could help?