Moodle
  1. Moodle
  2. MDL-27857

With portfolios enabled, you are unable to grade assignments

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Assignment (2.2), Portfolio
    • Labels:
    • Environment:
      Tested in Firefox 4 and Chrome (latest version)
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      This was already tested and confirmed. If you decide to re-test, ideally please try both 2.0 and 2.1 as there were cosmetic conflicts during backport.

      1. Enable at least two portfolio plugins
      2. Create an instance of Assignment - Advance uploading
      3. As a student, upload at least two files as submission attachments
      4. TEST: Make sure that there is an export link below the list of files that allows you to export all files in one
      5. As a teacher, go and try to grade the submission
      6. TEST: Make sure that there is an export link below the list of files that allows you to export all files in one
      7. TEST: Make sure you can save the grading form

      Show
      This was already tested and confirmed. If you decide to re-test, ideally please try both 2.0 and 2.1 as there were cosmetic conflicts during backport. 1. Enable at least two portfolio plugins 2. Create an instance of Assignment - Advance uploading 3. As a student, upload at least two files as submission attachments 4. TEST: Make sure that there is an export link below the list of files that allows you to export all files in one 5. As a teacher, go and try to grade the submission 6. TEST: Make sure that there is an export link below the list of files that allows you to export all files in one 7. TEST: Make sure you can save the grading form
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-27857-assignment-portfolio

      Description

      With Mahara Portfolio enabled and visible you are unable to save or update grades for assignments using IE8 or Firefox4.

      2.0.3+ (Build: 20110511)

        Gliffy Diagrams

          Activity

          Hide
          David Mudrak added a comment -

          Sorry I can't reproduce this bug. I just tested with Moodle 2.0 linked with Mahara 1.4. A student submitted assignment and was able to export it to Mahara portfolio. Then the teacher came and was able to grade the submission via both quick grading and detailed grading method.

          Please increase the debugging level to DEBUG_DEVELOPER at your site and let Moodle display all debugging information. Then try to reproduce again and provide us any error message that eventually appears. Thanks.

          Lowering priority as the bug is not confirmed.

          Show
          David Mudrak added a comment - Sorry I can't reproduce this bug. I just tested with Moodle 2.0 linked with Mahara 1.4. A student submitted assignment and was able to export it to Mahara portfolio. Then the teacher came and was able to grade the submission via both quick grading and detailed grading method. Please increase the debugging level to DEBUG_DEVELOPER at your site and let Moodle display all debugging information. Then try to reproduce again and provide us any error message that eventually appears. Thanks. Lowering priority as the bug is not confirmed.
          Hide
          craig litwiller added a comment -

          No Debugging messages are being shown. I am able to update and save grades by entering them directly into the gradebook. However I cannot enter grades by navigating directly to the assignment (single file upload), then I select view submitted assignments > then from this view I select grade > I enter a grade and then try to select save changes, save and show next, next, cancel. None of these buttons work for me doing this process until I turn off the mahara portfolio.

          This happens in a local install as well as an online version.

          Show
          craig litwiller added a comment - No Debugging messages are being shown. I am able to update and save grades by entering them directly into the gradebook. However I cannot enter grades by navigating directly to the assignment (single file upload), then I select view submitted assignments > then from this view I select grade > I enter a grade and then try to select save changes, save and show next, next, cancel. None of these buttons work for me doing this process until I turn off the mahara portfolio. This happens in a local install as well as an online version.
          Hide
          craig litwiller added a comment -

          Can reproduce in Firefox 4, Chrome (latest).
          Please try the above in Firefox 4 and Chrome. May be due to the way the form tags are set up.
          If I try the same process in Safari or firefox 3.6 I am able to save and submit grades.

          Show
          craig litwiller added a comment - Can reproduce in Firefox 4, Chrome (latest). Please try the above in Firefox 4 and Chrome. May be due to the way the form tags are set up. If I try the same process in Safari or firefox 3.6 I am able to save and submit grades.
          Hide
          Ray Lawrence added a comment - - edited

          Encountered this with IE 8 today. Will check exact Moodle version.

          Edit: Added version.2.0.3+ (build20110609)

          Show
          Ray Lawrence added a comment - - edited Encountered this with IE 8 today. Will check exact Moodle version. Edit: Added version.2.0.3+ (build20110609)
          Hide
          Ray Lawrence added a comment -

          Increased priority.

          Show
          Ray Lawrence added a comment - Increased priority.
          Hide
          David Mudrak added a comment -

          Sorry, still no success on reproducing this issue. I just tried on "Upload single file" assignment in the recent Moodle 2.0+ linked with the most recent Mahara 1.4. Moodle is running at MySQL database and the teacher used Chrome browser. I have Mahara portfolio enabled and running and still I am able to assess submissions (in both detailed and quick mode).

          I personally ran into one usability issue though. I found myself clicking the "Save preferences" button instead of "Save all my feedback". In that case, of course, clicking the wrong button does not save the grades. But "Save all my feedback" works well.

          Show
          David Mudrak added a comment - Sorry, still no success on reproducing this issue. I just tried on "Upload single file" assignment in the recent Moodle 2.0+ linked with the most recent Mahara 1.4. Moodle is running at MySQL database and the teacher used Chrome browser. I have Mahara portfolio enabled and running and still I am able to assess submissions (in both detailed and quick mode). I personally ran into one usability issue though. I found myself clicking the "Save preferences" button instead of "Save all my feedback". In that case, of course, clicking the wrong button does not save the grades. But "Save all my feedback" works well.
          Hide
          David Mudrak added a comment -

          Tested once more in Internet Explorer 8.0 and I can't reproduce the described behaviour there neither. I am able to grade the submissions regardless the Mahara portfolio enabled. Lowering the priority, can't reproduce.

          Show
          David Mudrak added a comment - Tested once more in Internet Explorer 8.0 and I can't reproduce the described behaviour there neither. I am able to grade the submissions regardless the Mahara portfolio enabled. Lowering the priority, can't reproduce.
          Hide
          craig litwiller added a comment -

          Can you please try this in Firefox 4 or 5? Just to make sure we are talking about the same functionality please review the following jing video:

          http://tinyurl.com/4ye5nms

          Show
          craig litwiller added a comment - Can you please try this in Firefox 4 or 5? Just to make sure we are talking about the same functionality please review the following jing video: http://tinyurl.com/4ye5nms
          Hide
          Richard Lynch added a comment -

          I am working with Craig Litwiller on this now.

          While I am not sure they are related, the XHTML is quite broken "near" the problem area.

          Specifically, a custom menu ends up being churned out with:
          <a class="yui3-menuitem-content" title="example.com" href="http://example.com" target="new"">

          a) The extra " at the end of the A is just plain bogus, and a likely source of browser issues.
          b) There's no "target" attribute for an A tag in XHTML-Strict, but that's probably innocuous.

          As I tell my students, if the HTML doesn't validate, it's not HTML. Points off right away, no matter how slick it looks.

          I make no claims as to where this HTML came from, as I haven't unwound the stack yet.

          But if it's in Moodle, you can probably find and fix in seconds, and if it's in Mahara, you can probably tell us to go over there and bug them instead.

          And if Craig typed it in, I'll make him do some push-ups or something.

          Note that this is in http://moodle.learntoday.info/mod/assignment/submissions.php, navigating with breadcrumbs like:

          • My home
          • / ▶ Courses
          • / ▶ nm115
          • / ▶ Module 01
          • / ▶ Module 01 Written Assignment - Internet Access
          • / ▶ Submissions
          • / ▶ Student2 Role

          It works fine in FF 3.5, so definitely browser-specific.
          And may involve YUI as well as Mahara, if YUI is "optional" in Moodle.

          Show
          Richard Lynch added a comment - I am working with Craig Litwiller on this now. While I am not sure they are related, the XHTML is quite broken "near" the problem area. Specifically, a custom menu ends up being churned out with: <a class="yui3-menuitem-content" title="example.com" href="http://example.com" target="new""> a) The extra " at the end of the A is just plain bogus, and a likely source of browser issues. b) There's no "target" attribute for an A tag in XHTML-Strict, but that's probably innocuous. As I tell my students, if the HTML doesn't validate, it's not HTML. Points off right away, no matter how slick it looks. I make no claims as to where this HTML came from, as I haven't unwound the stack yet. But if it's in Moodle, you can probably find and fix in seconds, and if it's in Mahara, you can probably tell us to go over there and bug them instead. And if Craig typed it in, I'll make him do some push-ups or something. Note that this is in http://moodle.learntoday.info/mod/assignment/submissions.php , navigating with breadcrumbs like: My home / ▶ Courses / ▶ nm115 / ▶ Module 01 / ▶ Module 01 Written Assignment - Internet Access / ▶ Submissions / ▶ Student2 Role It works fine in FF 3.5, so definitely browser-specific. And may involve YUI as well as Mahara, if YUI is "optional" in Moodle.
          Hide
          craig litwiller added a comment -

          The custom menu item (Richard Mentions above) has been removed completely. It was entered into the system using the theme settings and the custom menu items field. Even with this custom menu item removed we are still experiencing the same issue displayed in the linked video.

          Show
          craig litwiller added a comment - The custom menu item (Richard Mentions above) has been removed completely. It was entered into the system using the theme settings and the custom menu items field. Even with this custom menu item removed we are still experiencing the same issue displayed in the linked video.
          Hide
          David Mudrak added a comment -

          Sorry. Just re-tried with Firefox 5 and still I am able to use those two buttons. I can't reproduce the behaviour shown in the video. Let me suggest to try with a extension like Firebug enabled and try to debug the page at your machine.

          Show
          David Mudrak added a comment - Sorry. Just re-tried with Firefox 5 and still I am able to use those two buttons. I can't reproduce the behaviour shown in the video. Let me suggest to try with a extension like Firebug enabled and try to debug the page at your machine.
          Hide
          craig litwiller added a comment - - edited

          I just discovered today that this only happens if you use the advanced upload of files for the activity. Everything works fine if you use the upload single file activity.

          Can you try to reproduce this in both scenarios?

          It appears to really be an issue with certain browsers and the advanced upload of files activity.
          I have tested the following browsers in a local host version and online version of the moodle 2
          Chrome 12.0.742.112 - Single File activity works, Advanced uploading of files does not
          Firefox 5 - Single File activity works, Advanced uploading of files does not
          Safari 5.0.5 Both activities work fine.
          Internet Explorer 8.0.7600.16385 - Single File activity works, Advanced uploading of files does not

          I can reproduce this on multiple machines and in multiple different installs of moodle/mahara

          Show
          craig litwiller added a comment - - edited I just discovered today that this only happens if you use the advanced upload of files for the activity. Everything works fine if you use the upload single file activity. Can you try to reproduce this in both scenarios? It appears to really be an issue with certain browsers and the advanced upload of files activity. I have tested the following browsers in a local host version and online version of the moodle 2 Chrome 12.0.742.112 - Single File activity works, Advanced uploading of files does not Firefox 5 - Single File activity works, Advanced uploading of files does not Safari 5.0.5 Both activities work fine. Internet Explorer 8.0.7600.16385 - Single File activity works, Advanced uploading of files does not I can reproduce this on multiple machines and in multiple different installs of moodle/mahara
          Hide
          Stephen Porter added a comment -

          We were having a similar problem with not being able to save grades for advanced uploading of file assignments in any browser (although we did have some success on an old XP machine with IE6), but we do not have Maraha enabled. However, we did have the Google Docs and the File Download Portfolio Plugins enabled. Once we disabled the plugins, everything worked fine. So, I think this issue may be related to the portfolio plugins rather than just Maraha. (And, thanks for the ticket because it allowed us to solve a major issue in our production environment.)

          Show
          Stephen Porter added a comment - We were having a similar problem with not being able to save grades for advanced uploading of file assignments in any browser (although we did have some success on an old XP machine with IE6), but we do not have Maraha enabled. However, we did have the Google Docs and the File Download Portfolio Plugins enabled. Once we disabled the plugins, everything worked fine. So, I think this issue may be related to the portfolio plugins rather than just Maraha. (And, thanks for the ticket because it allowed us to solve a major issue in our production environment.)
          Hide
          Richard Jones added a comment -

          It seems that the problem only occurs when the "export to portfolio" button is present on the grading form (individual). The html is seriously messed up after that on IE8 (some versions) but not other browsers that I have tried. See attached screenshot where the form sections become "dis-outlined" - I know, not a word.

          I don't know if something around 1898 (assignment/lib.php Moodle 2.1) where the form is constructed is the issue - don't know enough about the code but I'm willing to explore further if I have enough info - developer doc somewhat behind you guys at this point.

          HTH

          Show
          Richard Jones added a comment - It seems that the problem only occurs when the "export to portfolio" button is present on the grading form (individual). The html is seriously messed up after that on IE8 (some versions) but not other browsers that I have tried. See attached screenshot where the form sections become "dis-outlined" - I know, not a word. I don't know if something around 1898 (assignment/lib.php Moodle 2.1) where the form is constructed is the issue - don't know enough about the code but I'm willing to explore further if I have enough info - developer doc somewhat behind you guys at this point. HTH
          Hide
          Richard Jones added a comment -

          Couldn't add a screenshot but it's here: http://dl.dropbox.com/u/8107583/gradesThing.PNG

          Show
          Richard Jones added a comment - Couldn't add a screenshot but it's here: http://dl.dropbox.com/u/8107583/gradesThing.PNG
          Hide
          Eric Bugnet added a comment -

          Hi,
          Same problem for me.

          Chrome / Moodle 2.1 updated yesterday / Mahara actived /
          Assignement with multi-files.

          Seems </form> not at correct line when you inspect the code rendered...
          If form is closed, save button (and other buttons) didn't work.

          Éric

          Show
          Eric Bugnet added a comment - Hi, Same problem for me. Chrome / Moodle 2.1 updated yesterday / Mahara actived / Assignement with multi-files. Seems </form> not at correct line when you inspect the code rendered... If form is closed, save button (and other buttons) didn't work. Éric
          Hide
          Drew Blessing added a comment -

          I can reproduce this issue in all browsers, even the latest Safari and Chrome.

          If you look at Richard's screenshot above you can immediately see that something is wrong. There is no border around the Grades section while there is on a correctly functioning page. I would agree that this looks like malformed HTML.

          Either way, I hope you can reproduce the issue soon and correct it. This is a major bug and is prompting us to disable Mahara support unless it is solved very soon.

          Show
          Drew Blessing added a comment - I can reproduce this issue in all browsers, even the latest Safari and Chrome. If you look at Richard's screenshot above you can immediately see that something is wrong. There is no border around the Grades section while there is on a correctly functioning page. I would agree that this looks like malformed HTML. Either way, I hope you can reproduce the issue soon and correct it. This is a major bug and is prompting us to disable Mahara support unless it is solved very soon.
          Hide
          Adi Tedjasaputra added a comment -

          I can reproduce this issue in Moodle 2.0.4, Firefox 6.0.2, Windows 7 Professional SP1. A workaround is to disable the portfolios from System Administration > Advanced features > Enable portfolios (enableportfolios)

          Show
          Adi Tedjasaputra added a comment - I can reproduce this issue in Moodle 2.0.4, Firefox 6.0.2, Windows 7 Professional SP1. A workaround is to disable the portfolios from System Administration > Advanced features > Enable portfolios (enableportfolios)
          Hide
          Trish added a comment -

          If you watch this video at this site (http://www.youtube.com/watch?v=SahXhi3zLqs)
          it shows the function that will break when you turn on the Mahara portfolio. We are able to do the simple grading and this saves however when you try to upload an assignment with comments added as a teacher (as shown in the video) it will not work. Our ICT section has tested it and with the Mahara portfolio enabled the save changes button does not send any signal to the server.

          Show
          Trish added a comment - If you watch this video at this site ( http://www.youtube.com/watch?v=SahXhi3zLqs ) it shows the function that will break when you turn on the Mahara portfolio. We are able to do the simple grading and this saves however when you try to upload an assignment with comments added as a teacher (as shown in the video) it will not work. Our ICT section has tested it and with the Mahara portfolio enabled the save changes button does not send any signal to the server.
          Hide
          Sue Holtz added a comment -

          This is happening to us, as well. We used the portfolio download option to the file system, not Mahara. We need to have both options available, the teacher needs to be able to grade and the students in other courses need the portfolio option. This is a major issue for us.

          Show
          Sue Holtz added a comment - This is happening to us, as well. We used the portfolio download option to the file system, not Mahara. We need to have both options available, the teacher needs to be able to grade and the students in other courses need the portfolio option. This is a major issue for us.
          Hide
          David Mudrak added a comment -

          I'm on it

          Show
          David Mudrak added a comment - I'm on it
          Hide
          David Mudrak added a comment -

          OK, I am able to reproduce it finally in Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0 with the Assignment (Advanced upload) and portfolio support enabled (File download and Mahara).

          Show
          David Mudrak added a comment - OK, I am able to reproduce it finally in Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0 with the Assignment (Advanced upload) and portfolio support enabled (File download and Mahara).
          Hide
          David Mudrak added a comment -

          Increasing priority to Critical as under certain conditions, the basic functionality (Assignment grading) is not available.

          Show
          David Mudrak added a comment - Increasing priority to Critical as under certain conditions, the basic functionality (Assignment grading) is not available.
          Hide
          David Mudrak added a comment -

          ISSUE SYNOPSIS

          Under certain conditions, the portfolio API injects a control widget to export all attached files from the submission (I was able to reproduce in Advace upload type with File download and Mahara portfolio enabled) below the tree of files. By default, the widget is PORTFOLIO_ADD_FULL_FORM. This leads to nested <form> elements in the grading screen and the portfolio form end tag terminates the surrounding grading form, making the submit buttons malfunctioned. The solution for this is pretty easy - use the widget of type PORTFOLIO_ADD_TEXT_LINK that produces a plain text link that can be safely embedded into the grading form.

          After fixing this I discovered yet another issue with portfolio support in the assignment that was not reported yet. Portfolio support code expected that the current user is always 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). The solution for this second issue was to improve portfolio API implementation in the assignment module.

          Show
          David Mudrak added a comment - ISSUE SYNOPSIS Under certain conditions, the portfolio API injects a control widget to export all attached files from the submission (I was able to reproduce in Advace upload type with File download and Mahara portfolio enabled) below the tree of files. By default, the widget is PORTFOLIO_ADD_FULL_FORM. This leads to nested <form> elements in the grading screen and the portfolio form end tag terminates the surrounding grading form, making the submit buttons malfunctioned. The solution for this is pretty easy - use the widget of type PORTFOLIO_ADD_TEXT_LINK that produces a plain text link that can be safely embedded into the grading form. After fixing this I discovered yet another issue with portfolio support in the assignment that was not reported yet. Portfolio support code expected that the current user is always 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). The solution for this second issue was to improve portfolio API implementation in the assignment module.
          Hide
          David Mudrak added a comment -

          Publishing 2.1 patch for for peer-review. I am going to prepare integration requests for all affected branches one this solution is approved.

          Show
          David Mudrak added a comment - Publishing 2.1 patch for for peer-review. I am going to prepare integration requests for all affected branches one this solution is approved.
          Hide
          David Mudrak added a comment -

          If anybody could test this solution at their sites, it would help with fixing this in the official Moodle distribution a lot.

          Show
          David Mudrak added a comment - If anybody could test this solution at their sites, it would help with fixing this in the official Moodle distribution a lot.
          Hide
          Richard Jones added a comment -

          Hi David

          Thanks for your work, happy to test if you can tell me which file I need to edit to make that replacement.

          Show
          Richard Jones added a comment - Hi David Thanks for your work, happy to test if you can tell me which file I need to edit to make that replacement.
          Hide
          Richard Jones added a comment -

          Also I could see the second issue as a feature rather than a bug as the teacher doesn't actually "own" the student work.

          Show
          Richard Jones added a comment - Also I could see the second issue as a feature rather than a bug as the teacher doesn't actually "own" the student work.
          Hide
          Drew Blessing added a comment -

          This corrected the problem on my 2.1.1 site. Thank you for the fix, it's much, much needed!

          Show
          Drew Blessing added a comment - This corrected the problem on my 2.1.1 site. Thank you for the fix, it's much, much needed!
          Hide
          Doug Stevens added a comment -

          Confirmed that this solves the issue on our 2.1.1 site with Mahara.

          Show
          Doug Stevens added a comment - Confirmed that this solves the issue on our 2.1.1 site with Mahara.
          Hide
          Richard Jones added a comment - - edited

          OK, I upgraded (Moodle and Mahara latest) made the changes in moodle/lib/portfoliolib.php and it seems to have fixed the problem but will run some more checks when school restarts next week...

          Show
          Richard Jones added a comment - - edited OK, I upgraded (Moodle and Mahara latest) made the changes in moodle/lib/portfoliolib.php and it seems to have fixed the problem but will run some more checks when school restarts next week...
          Hide
          Sam Hemelryk added a comment -

          Hi David,

          I've grabbed this now and had a look at it. I had been waiting to see if someone familiar with Assignment / Portfolio's grabbed it but given they haven't and its Monday (time to get this up for integration) I figured I'd take it.

          Your changes look great - everything seems to be in order - I'm no expert on either assignment or portfolio but given that and the marvellous testing effort put in I'd say put it up

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Hi David, I've grabbed this now and had a look at it. I had been waiting to see if someone familiar with Assignment / Portfolio's grabbed it but given they haven't and its Monday (time to get this up for integration) I figured I'd take it. Your changes look great - everything seems to be in order - I'm no expert on either assignment or portfolio but given that and the marvellous testing effort put in I'd say put it up Cheers Sam
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          Hide
          Rossiani Wijaya added a comment -

          This is working great.

          Test passed.

          Show
          Rossiani Wijaya added a comment - This is working great. Test passed.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          git repositories have been updated with your awesome changes, thanks! Closing.

          Show
          Eloy Lafuente (stronk7) added a comment - git repositories have been updated with your awesome changes, thanks! Closing.

            People

            • Votes:
              12 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: