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

Confusing export to portfolio buttons on assignment submissions page

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Assignment (2.2), Portfolio
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Steps to reproduce:

      1. Enable portfolios and several portfolio plugins e.g. file download, Google Docs, Picasa
      2. View assignment submissions page mod/assignment/submissions.php (I viewed it as an admin, I assume the view is the same as a teacher)

      Each assignment submission has 2 buttons below it - 'File download' (with arrow suggesting it is a dropdown menu, though there is only one item) and 'Save' (see attached screenshot).

      Just wondering why a teacher or admin would want to export individual student submissions in this way? Isn't portfolio export for individual users to export their own work only?

      3. Select 'File download' then click Save.

      The following error message is obtained:

      Coding problem: this page does not set $PAGE->context properly.

      • line 337 of /lib/pagelib.php: call to debugging()
      • line 594 of /lib/pagelib.php: call to moodle_page->magic_get_context()
      • line 1221 of /lib/weblib.php: call to moodle_page->__get()
      • line 136 of /mod/assignment/lib.php: call to format_string()
      • line 39 of /mod/assignment/type/upload/assignment.class.php: call to assignment_base->assignment_base()
      • line 68 of /mod/assignment/locallib.php: call to assignment_upload->assignment_upload()
      • line 189 of /portfolio/add.php: call to assignment_portfolio_caller->load_data()

      Notice: Trying to get property of non-object in /var/www/head/moodle/mod/assignment/locallib.php on line 80

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            tsala Helen Foster added a comment -

            Adding Portfolio component lead, Penny, as watcher.

            Show
            tsala Helen Foster added a comment - Adding Portfolio component lead, Penny, as watcher.
            Hide
            mjollnir Penny Leach added a comment -

            the error message has nothing to do with it, can you put that into a separate bug please?

            The fact that teachers and admins can export submissions is related to the capabilities they have, it used to be when I wrote this, that there was exportsubmission and exportownsubmission, but it seems to have gone in some refactor somewhere :/ I'll check.

            Show
            mjollnir Penny Leach added a comment - the error message has nothing to do with it, can you put that into a separate bug please? The fact that teachers and admins can export submissions is related to the capabilities they have, it used to be when I wrote this, that there was exportsubmission and exportownsubmission, but it seems to have gone in some refactor somewhere :/ I'll check.
            Hide
            tsala Helen Foster added a comment -

            Penny, thanks for taking on this issue. Error message reported separately - MDL-24035 - as suggested.

            Show
            tsala Helen Foster added a comment - Penny, thanks for taking on this issue. Error message reported separately - MDL-24035 - as suggested.
            Hide
            mjollnir Penny Leach added a comment -

            Hi Helen,

            I have partially fixed this...

            • The reason there's a icon next to the file and another export thing underneath is for when there are multiple files - so you can export each single file, or all of them together in a zip file. I fixed it now so that when there's only one file, the second bit doesn't show.
            • I can't reproduce the thing where you have the drop down menu with only one option in it, that's weird. Can you reproduce again and tell me exactly which plugins you had enabled? See my screenshot.
            • Will start looking at capabilities now.
            Show
            mjollnir Penny Leach added a comment - Hi Helen, I have partially fixed this... The reason there's a icon next to the file and another export thing underneath is for when there are multiple files - so you can export each single file, or all of them together in a zip file. I fixed it now so that when there's only one file, the second bit doesn't show. I can't reproduce the thing where you have the drop down menu with only one option in it, that's weird. Can you reproduce again and tell me exactly which plugins you had enabled? See my screenshot. Will start looking at capabilities now.
            Hide
            mjollnir Penny Leach added a comment -

            Petr - I actually didn't end up adding any capabilities but here's the patch anyway

            Show
            mjollnir Penny Leach added a comment - Petr - I actually didn't end up adding any capabilities but here's the patch anyway
            Hide
            mjollnir Penny Leach added a comment -

            assigning to you for review

            Show
            mjollnir Penny Leach added a comment - assigning to you for review
            Hide
            skodak Petr Skoda added a comment -

            hmm, where are the changes in access.php and lang pack?

            Show
            skodak Petr Skoda added a comment - hmm, where are the changes in access.php and lang pack?
            Hide
            mjollnir Penny Leach added a comment -

            Read the comment no changes to capabilities.

            Show
            mjollnir Penny Leach added a comment - Read the comment no changes to capabilities.
            Hide
            skodak Petr Skoda added a comment -

            1/ the itemid now contains submission id, not userid (render.php)
            2/ the ownership should be tested via the submission data, not the user who uploaded the file

            The rest is ok imho. Thanks for the patch.

            I expected a simple change related to capabilities, this looks like a bigger change, reassigning back, please ask mod/assignment maintainer (not sure who it is right now).

            Petr

            Show
            skodak Petr Skoda added a comment - 1/ the itemid now contains submission id, not userid (render.php) 2/ the ownership should be tested via the submission data, not the user who uploaded the file The rest is ok imho. Thanks for the patch. I expected a simple change related to capabilities, this looks like a bigger change, reassigning back, please ask mod/assignment maintainer (not sure who it is right now). Petr
            Hide
            tsala Helen Foster added a comment -

            Penny, I tried and failed to reproduce the drop down menu with only one option in it, so I guess we can forget about it!

            It looks much better now, though I don't see a save button any more. A small suggested improvement would be to add a tool tip to the export to portfolio icon. (Let me know if I should create a tracker issue for this.)

            Show
            tsala Helen Foster added a comment - Penny, I tried and failed to reproduce the drop down menu with only one option in it, so I guess we can forget about it! It looks much better now, though I don't see a save button any more. A small suggested improvement would be to add a tool tip to the export to portfolio icon. (Let me know if I should create a tracker issue for this.)
            Hide
            mjollnir Penny Leach added a comment -

            please. we need a new icon too although I think Patrick is suppose to be doing this?

            Show
            mjollnir Penny Leach added a comment - please. we need a new icon too although I think Patrick is suppose to be doing this?
            Hide
            tsala Helen Foster added a comment -

            Done: MDL-24701

            Show
            tsala Helen Foster added a comment - Done: MDL-24701
            Hide
            tsala Helen Foster added a comment -

            If I understand things correctly, this issue was fixed some time ago. Thanks Penny

            Show
            tsala Helen Foster added a comment - If I understand things correctly, this issue was fixed some time ago. Thanks Penny

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  24/Nov/10