MDL-27857 Export to portfolio support in the assignment module improved
authorDavid Mudrak <david@moodle.com>
Wed, 28 Sep 2011 00:02:37 +0000 (02:02 +0200)
committerDavid Mudrak <david@moodle.com>
Mon, 3 Oct 2011 08:15:39 +0000 (10:15 +0200)
commitfd04c5bd87ca76601962ec9ba09a904e21d64008
treeae2e38aa394a032224f7d5539439d19fdc24df13
parentd3996e0705dcf9eb713db5ed782d0b49c3cbd9db
MDL-27857 Export to portfolio support in the assignment module improved

Portfolio API code in the assignment module expected that the current
user is the author of the submission. Therefore the "Export to
portfolio" button did not work when the submission was viewed by a
teacher (eg at the page with the list of all submissions in the Advanced
upload assignment).

This patch introduces a new callback argument 'submissionid' that holds
explicit ID of the submission the export deals with. With it available,
we do not need to expect the current user is the author of the
submission.

The patch also cleans some strings used for portfolio callback
exceptions.
mod/assignment/lang/en/assignment.php
mod/assignment/lib.php
mod/assignment/locallib.php
mod/assignment/renderer.php