Moodle
  1. Moodle
  2. MDL-24034

Confusing export to portfolio buttons on assignment submissions page

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      492

      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

        Issue Links

          Activity

          Helen Foster created issue -
          Hide
          Helen Foster added a comment -

          Adding Portfolio component lead, Penny, as watcher.

          Show
          Helen Foster added a comment - Adding Portfolio component lead, Penny, as watcher.
          Hide
          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
          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.
          Penny Leach made changes -
          Field Original Value New Value
          Assignee moodle.com [ moodle.com ] Penny Leach [ mjollnir ]
          Hide
          Helen Foster added a comment -

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

          Show
          Helen Foster added a comment - Penny, thanks for taking on this issue. Error message reported separately - MDL-24035 - as suggested.
          Helen Foster made changes -
          Link This issue has a non-specific relationship to MDL-24035 [ MDL-24035 ]
          Hide
          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
          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.
          Penny Leach made changes -
          Attachment mdl-24034.png [ 21828 ]
          Hide
          Penny Leach added a comment -

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

          Show
          Penny Leach added a comment - Petr - I actually didn't end up adding any capabilities but here's the patch anyway
          Penny Leach made changes -
          Attachment MDL-24034.patch [ 21831 ]
          Hide
          Penny Leach added a comment -

          assigning to you for review

          Show
          Penny Leach added a comment - assigning to you for review
          Penny Leach made changes -
          Assignee Penny Leach [ mjollnir ] Petr ?koda (skodak) [ skodak ]
          Hide
          Petr Škoda added a comment -

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

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

          Read the comment no changes to capabilities.

          Show
          Penny Leach added a comment - Read the comment no changes to capabilities.
          Hide
          Petr Škoda 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
          Petr Škoda 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
          Petr Škoda made changes -
          Assignee Petr ?koda (skodak) [ skodak ] Penny Leach [ mjollnir ]
          Hide
          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
          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
          Penny Leach added a comment -

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

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

          Done: MDL-24701

          Show
          Helen Foster added a comment - Done: MDL-24701
          Helen Foster made changes -
          Link This issue has been marked as being related by MDL-24701 [ MDL-24701 ]
          Martin Dougiamas made changes -
          Fix Version/s 2.0.1 [ 10420 ]
          Fix Version/s 2.0 [ 10122 ]
          Martin Dougiamas made changes -
          Workflow jira [ 38443 ] MDL Workflow [ 46693 ]
          Martin Dougiamas made changes -
          Fix Version/s 2.0.2 [ 10421 ]
          Fix Version/s 2.0.1 [ 10420 ]
          Martin Dougiamas made changes -
          Fix Version/s 2.0.3 [ 10537 ]
          Fix Version/s 2.0.2 [ 10421 ]
          Hide
          Helen Foster added a comment -

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

          Show
          Helen Foster added a comment - If I understand things correctly, this issue was fixed some time ago. Thanks Penny
          Helen Foster made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 2.0 [ 10122 ]
          Fix Version/s 2.0.3 [ 10537 ]
          Resolution Fixed [ 1 ]
          Martin Dougiamas made changes -
          Workflow MDL Workflow [ 46693 ] MDL Full Workflow [ 94763 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: