Moodle
  1. Moodle
  2. MDL-40096

Javascript error prevents file tree display in assignment grading table

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.3
    • Fix Version/s: 2.4.8, 2.5.4, 2.6.1
    • Component/s: Assignment
    • Labels:

      Description

      When looking at the grading table, some submission and response files are missing even though they exist and can be seen when clicking Grade. I don't know how to attach a screenshot to this bug tracker so I am linking to one in my post in the Moodle forum:

      https://moodle.org/mod/forum/discuss.php?d=229557

      I notice that some files look like they are following a tree structure while others look like list items with bullet points. Minimising and maximising different columns can cause some files to come back, then others will be missing.

      On 2.4.3 it happens on all browsers. This doesn't happen in our other Moodle installs of 2.4.3. We recently migrated from 1.9 to 2.4. and upgraded all our assignments.
      Can anyone help?
      Thanks

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Adam Salem added a comment -

            I'm also experiencing this issue.

            It appears to be PHP related. On a server running PHP5.3 the assignments are fine, on one using PHP5.4, I experience the issues detailed here.

            Is there likely to be a fix for this?

            Show
            Adam Salem added a comment - I'm also experiencing this issue. It appears to be PHP related. On a server running PHP5.3 the assignments are fine, on one using PHP5.4, I experience the issues detailed here. Is there likely to be a fix for this?
            Hide
            Damyon Wiese added a comment -

            Well - I can't reproduce it - but I suspect it is due to running moodle on a reasonably fast VM where microtime() is a bit broken (repeatedly returns the same result) which causes uniqid() to be non-unique. By hacking my code and changing the call to uniqid() to '1' I can reproduce the screenshots provided.

            Posting a solution that replaces the call to uniqid() in mod_assign with html_writer::random_id() which uses a static counter to guarantee different results even when uniqid itself is broken.

            Show
            Damyon Wiese added a comment - Well - I can't reproduce it - but I suspect it is due to running moodle on a reasonably fast VM where microtime() is a bit broken (repeatedly returns the same result) which causes uniqid() to be non-unique. By hacking my code and changing the call to uniqid() to '1' I can reproduce the screenshots provided. Posting a solution that replaces the call to uniqid() in mod_assign with html_writer::random_id() which uses a static counter to guarantee different results even when uniqid itself is broken.
            Hide
            Adam Salem added a comment -

            Hi Damyon,

            I've applied your fix to 2 Moodle 2.5 servers where the issue was replicating consistently and the issue no longer replicates... Looks like the fix works!

            Thanks for this one, was the root of a lot of frustration for staff.

            Show
            Adam Salem added a comment - Hi Damyon, I've applied your fix to 2 Moodle 2.5 servers where the issue was replicating consistently and the issue no longer replicates... Looks like the fix works! Thanks for this one, was the root of a lot of frustration for staff.
            Hide
            Petr Skoda added a comment -

            +1

            Show
            Petr Skoda added a comment - +1
            Hide
            Sam Hemelryk added a comment -

            Thanks Damyon - this has been integrated now.

            Show
            Sam Hemelryk added a comment - Thanks Damyon - this has been integrated now.
            Hide
            Mark Nelson added a comment -

            Thanks Damyon, works as expected.

            Show
            Mark Nelson added a comment - Thanks Damyon, works as expected.
            Hide
            Damyon Wiese added a comment -

            Twas the week before Christmas,
            And all though HQ
            Devs were scrambling to finish peer review.
            They sent all their issues,
            and rushed out the door -
            "To the beach!" someone heard them roar!

            This issue has been released upstream. Thanks!

            Show
            Damyon Wiese added a comment - Twas the week before Christmas, And all though HQ Devs were scrambling to finish peer review. They sent all their issues, and rushed out the door - "To the beach!" someone heard them roar! This issue has been released upstream. Thanks!

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: