Moodle
  1. Moodle
  2. MDL-24469

Assignment submissions are visible to students but not teachers

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.9.9
    • Fix Version/s: 1.9.10
    • Component/s: Assignment (2.2)
    • Labels:
      None
    • Environment:
      CentOS on VPS, Apache 2.2.16, PHP 5.2.14
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Teachers cannot see assignment submissions. Instead, they see, "No attempts have been made on this assignment" Students can correctly upload and download files.

      The bug appeared when I upgraded to the weekly release for 9/29/2010. It disappeared when I downgraded back to the weekly release for 9/15/2010.

        Gliffy Diagrams

        1. 2010101101-mdl-24469.patch
          2 kB
          Aparup Banerjee
        1. after-downgrade.gif
          45 kB
        2. after-upgrade.gif
          45 kB

          Issue Links

            Activity

            Hide
            Sam Hemelryk added a comment -

            Hi Brandon,

            I've just been looking into this problem but unfortunately I cannot reproduce it.
            Perhaps could you tell me a bit about the state of the course and assignment you experienced the problem within.

            • Were groups enabled in the course and being used?
            • Had you overridden any of the permissions for the assignments for either the student or teacher?
            • Was the assignment still open or had it closed? (available dates)
            • What type of assignment was it?

            Also if there is anything more that you can think of that may help me reproduce the problem I would be very keen to know.

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Hi Brandon, I've just been looking into this problem but unfortunately I cannot reproduce it. Perhaps could you tell me a bit about the state of the course and assignment you experienced the problem within. Were groups enabled in the course and being used? Had you overridden any of the permissions for the assignments for either the student or teacher? Was the assignment still open or had it closed? (available dates) What type of assignment was it? Also if there is anything more that you can think of that may help me reproduce the problem I would be very keen to know. Cheers Sam
            Hide
            Brandon Horn added a comment -
            • Yes, groups were enabled and forced.
            • While I did customize permissions, I didn't change any that affect assignment submission.
            • The assignments were all still open.
            • The issue occurs for both single file upload and advanced file upload assignments.

            I would be happy to reproduce the issue on my server for you (assuming it still exists in the latest weekly build).

            Show
            Brandon Horn added a comment - Yes, groups were enabled and forced. While I did customize permissions, I didn't change any that affect assignment submission. The assignments were all still open. The issue occurs for both single file upload and advanced file upload assignments. I would be happy to reproduce the issue on my server for you (assuming it still exists in the latest weekly build).
            Hide
            Sam Hemelryk added a comment -

            Hi Brandon,

            Thanks for the information.
            Yes, if you were able to just double check that you are still experiencing the error on the weekly build that would be great.
            I will continue to investigate it.

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Hi Brandon, Thanks for the information. Yes, if you were able to just double check that you are still experiencing the error on the weekly build that would be great. I will continue to investigate it. Cheers Sam
            Hide
            Rossiani Wijaya added a comment -

            Hi Sam,

            I tested the issue and unable to reproduce it.

            Rosie

            Show
            Rossiani Wijaya added a comment - Hi Sam, I tested the issue and unable to reproduce it. Rosie
            Hide
            Brandon Horn added a comment -

            The first screenshot shows an assignment after an upgrade to the latest weekly build (Moodle 1.9.9+ (Build: 20101006)). The second screenshow shows the same assignment after an immediate downgrade to the last known weekly build without the issue (Moodle 1.9.9+ (Build: 20100915)).

            Show
            Brandon Horn added a comment - The first screenshot shows an assignment after an upgrade to the latest weekly build (Moodle 1.9.9+ (Build: 20101006)). The second screenshow shows the same assignment after an immediate downgrade to the last known weekly build without the issue (Moodle 1.9.9+ (Build: 20100915)).
            Hide
            Brandon Horn added a comment -

            I would be happy to provide a copy of my current installation in a sandbox. I can give you access to cPanel on the sandbox so you can see the database, which contains correct data as far as I can tell.

            Show
            Brandon Horn added a comment - I would be happy to provide a copy of my current installation in a sandbox. I can give you access to cPanel on the sandbox so you can see the database, which contains correct data as far as I can tell.
            Hide
            Aparup Banerjee added a comment -

            Hi Brandon,
            We've been unable to duplicate any issue that results in exactly your situation.
            We're wondering if you could answer a few questions before we need to enter the sandman.

            To ascertain what permissions are in effect:
            1) What are the roles that user Brandon Horn has been assigned in this context (course/assignment) ?
            2) Do any of these roles have permission 'Access all groups' set to 'Prohibit' ? (moodle/site:accessallgroups) Any involved roles that prohibit a permission will be the overriding setting.
            3) Are you part of any groups?

            To ascertain what is being counted,
            4) what are the roles ticked in Admin->Grades->General Settings->Graded Roles ?

            also,
            If you hit the 'Assignments' link on the breadcrumb trail , does the miscount still show up in the table of assignments ?

            Show
            Aparup Banerjee added a comment - Hi Brandon, We've been unable to duplicate any issue that results in exactly your situation. We're wondering if you could answer a few questions before we need to enter the sandman. To ascertain what permissions are in effect: 1) What are the roles that user Brandon Horn has been assigned in this context (course/assignment) ? 2) Do any of these roles have permission 'Access all groups' set to 'Prohibit' ? (moodle/site:accessallgroups) Any involved roles that prohibit a permission will be the overriding setting. 3) Are you part of any groups? To ascertain what is being counted, 4) what are the roles ticked in Admin->Grades->General Settings->Graded Roles ? also, If you hit the 'Assignments' link on the breadcrumb trail , does the miscount still show up in the table of assignments ?
            Hide
            Aparup Banerjee added a comment -

            This might be an issue to deal with here,

            when there are no Graded Roles set (a possible scenario) , we're passing in an array with nothing in it. :

            You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY u.lastname ASC' at line 9

            SELECT u.id, u.confirmed, u.username, u.firstname, u.lastname, u.maildisplay, u.mailformat, u.maildigest, u.email, u.city, u.country, u.picture, u.idnumber, u.department, u.institution, u.emailstop, u.lang, u.timezone, u.lastaccess, u.mnethostid, r.name as rolename, ra.roleid FROM mdl_role_assignments ra JOIN mdl_user u ON u.id = ra.userid JOIN mdl_role r ON ra.roleid = r.id WHERE (ra.contextid = 50 OR ra.contextid IN (1,3,10,50 )) AND ra.roleid IN () ORDER BY u.lastname ASC

            • line 686 of lib/dmllib.php: call to debugging()
            • line 966 of lib/dmllib.php: call to get_recordset_sql()
            • line 5067 of lib/accesslib.php: call to get_records_sql()
            • line 2787 of mod/assignment/lib.php: call to get_role_users() ------------> [blank array passed : array(1) { [0]=> string(0) "" }

              ]

            • line 1554 of mod/assignment/lib.php: call to assignment_count_real_submissions()
            • line 305 of mod/assignment/lib.php: call to assignment_base->count_real_submissions()
            • line 145 of mod/assignment/lib.php: call to assignment_base->submittedlink()
            • line 51 of mod/assignment/type/uploadsingle/assignment.class.php: call to assignment_base->view_header()
            • line 39 of mod/assignment/view.php: call to assignment_uploadsingle->view()
            Show
            Aparup Banerjee added a comment - This might be an issue to deal with here, when there are no Graded Roles set (a possible scenario) , we're passing in an array with nothing in it. : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY u.lastname ASC' at line 9 SELECT u.id, u.confirmed, u.username, u.firstname, u.lastname, u.maildisplay, u.mailformat, u.maildigest, u.email, u.city, u.country, u.picture, u.idnumber, u.department, u.institution, u.emailstop, u.lang, u.timezone, u.lastaccess, u.mnethostid, r.name as rolename, ra.roleid FROM mdl_role_assignments ra JOIN mdl_user u ON u.id = ra.userid JOIN mdl_role r ON ra.roleid = r.id WHERE (ra.contextid = 50 OR ra.contextid IN (1,3,10,50 )) AND ra.roleid IN () ORDER BY u.lastname ASC line 686 of lib/dmllib.php: call to debugging() line 966 of lib/dmllib.php: call to get_recordset_sql() line 5067 of lib/accesslib.php: call to get_records_sql() line 2787 of mod/assignment/lib.php: call to get_role_users() ------------> [blank array passed : array(1) { [0]=> string(0) "" } ] line 1554 of mod/assignment/lib.php: call to assignment_count_real_submissions() line 305 of mod/assignment/lib.php: call to assignment_base->count_real_submissions() line 145 of mod/assignment/lib.php: call to assignment_base->submittedlink() line 51 of mod/assignment/type/uploadsingle/assignment.class.php: call to assignment_base->view_header() line 39 of mod/assignment/view.php: call to assignment_uploadsingle->view()
            Hide
            Aparup Banerjee added a comment -

            Heres a patch that gets rid of that error in my last comment. (when theres no graded roles)
            Sam, does this make sense?

            Show
            Aparup Banerjee added a comment - Heres a patch that gets rid of that error in my last comment. (when theres no graded roles) Sam, does this make sense?
            Hide
            Aparup Banerjee added a comment -

            Alright, that patch did make sense, this patch just skips the explode if gradebookroles is empty and applies the same fix to the rest of the areas that get_role_users() is passed the gradebookroles.

            I'm going to commit this fix.

            Brandon, Can you do a cvs update and see if this fixes your issue?

            Show
            Aparup Banerjee added a comment - Alright, that patch did make sense, this patch just skips the explode if gradebookroles is empty and applies the same fix to the rest of the areas that get_role_users() is passed the gradebookroles. I'm going to commit this fix. Brandon, Can you do a cvs update and see if this fixes your issue?
            Hide
            Brandon Horn added a comment -

            I do have "Show gradebook to students" set to "No" in the course settings.

            Forgive my ignorance, but I have no idea how to do a CVS update. Even if I did, I couldn't do it from school. If someone could make a complete build available, I would be happy to test it.

            Show
            Brandon Horn added a comment - I do have "Show gradebook to students" set to "No" in the course settings. Forgive my ignorance, but I have no idea how to do a CVS update. Even if I did, I couldn't do it from school. If someone could make a complete build available, I would be happy to test it.
            Hide
            Aparup Banerjee added a comment -

            Hi Brandon,

            about my question (4) and 'gradebookroles' i was referring to the settings in : Site Admin Block->Grades->General Settings->Graded Roles

            The download builds are updated automatically everyday, i'm guessing in another 12 hours time. So you can try the download package after that time. The change log for the build should have this issue number in it.

            Show
            Aparup Banerjee added a comment - Hi Brandon, about my question (4) and 'gradebookroles' i was referring to the settings in : Site Admin Block->Grades->General Settings->Graded Roles The download builds are updated automatically everyday, i'm guessing in another 12 hours time. So you can try the download package after that time. The change log for the build should have this issue number in it.
            Hide
            Brandon Horn added a comment -

            I have none of the roles checked in Site Admin Block->Grades->General Settings->Graded Roles. I guess that would explain the problem. My school requires us to use a specific program for grading, so I turned off all of the grading related features in Moodle to avoid confusion for the kids.

            Do you have a link to the download page? I'm familiar with the weekly build page, but all I could find on the CVS pages are the individual files.

            Show
            Brandon Horn added a comment - I have none of the roles checked in Site Admin Block->Grades->General Settings->Graded Roles. I guess that would explain the problem. My school requires us to use a specific program for grading, so I turned off all of the grading related features in Moodle to avoid confusion for the kids. Do you have a link to the download page? I'm familiar with the weekly build page, but all I could find on the CVS pages are the individual files.
            Hide
            Aparup Banerjee added a comment -

            Hi Brandon,
            great that we've hit the problem on the nose! The updates should fix it then. When you get the updated build, let us know how it goes.

            I was referring to the weekly build page too at http://download.moodle.org/

            Show
            Aparup Banerjee added a comment - Hi Brandon, great that we've hit the problem on the nose! The updates should fix it then. When you get the updated build, let us know how it goes. I was referring to the weekly build page too at http://download.moodle.org/
            Hide
            Brandon Horn added a comment -

            The only one I see on that page that's built daily is Moodle 2.0 RC1. Am I missing something?

            I'll be happy to test this as soon as I can get my hands on the relevant changed files.

            Show
            Brandon Horn added a comment - The only one I see on that page that's built daily is Moodle 2.0 RC1. Am I missing something? I'll be happy to test this as soon as I can get my hands on the relevant changed files.
            Hide
            Sam Hemelryk added a comment -

            Hi guys,

            Glad it looks like we've got a solution to this problem.

            Brandon thanks for being patient with us while we worked this one out, and sorry for the inconvenience.
            Just to clarify, this is a bug within Moodle code. The report should still function perfectly without any gradeable roles.
            Regarding the weekly builds, on download.moodle.org you should see a link to the Moodle 1.9.9+ Weekly build which is the weekly build of the stable 1.9 branch and probably the one you want.
            The weekly build gets produced every Tuesday night ( Perth time ) so Wednesday morning you should be fine to try it out if you want.

            Apu, I'm reassigning this to you seen as you commit the fix.

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Hi guys, Glad it looks like we've got a solution to this problem. Brandon thanks for being patient with us while we worked this one out, and sorry for the inconvenience. Just to clarify, this is a bug within Moodle code. The report should still function perfectly without any gradeable roles. Regarding the weekly builds, on download.moodle.org you should see a link to the Moodle 1.9.9+ Weekly build which is the weekly build of the stable 1.9 branch and probably the one you want. The weekly build gets produced every Tuesday night ( Perth time ) so Wednesday morning you should be fine to try it out if you want. Apu, I'm reassigning this to you seen as you commit the fix. Cheers Sam
            Hide
            Aparup Banerjee added a comment -

            Hi Brandon,
            Sorry, about the confusion on the build timings, it is built weekly (although the change logs are updated more often).

            The weekly build has just been built a few hours ago and it now includes the fix to test.

            Show
            Aparup Banerjee added a comment - Hi Brandon, Sorry, about the confusion on the build timings, it is built weekly (although the change logs are updated more often). The weekly build has just been built a few hours ago and it now includes the fix to test.
            Hide
            Brandon Horn added a comment -

            Fixed in the latest weekly build. (1.9.9+ (Build: 20101013)). Thanks for taking it seriously.

            Brandon

            Show
            Brandon Horn added a comment - Fixed in the latest weekly build. (1.9.9+ (Build: 20101013)). Thanks for taking it seriously. Brandon
            Hide
            Aparup Banerjee added a comment -

            No Problem! thanks for the report!

            Show
            Aparup Banerjee added a comment - No Problem! thanks for the report!
            Hide
            Jose Gallardo added a comment -

            Hi Brandon,

            Im having the same issue on last week update (2010/10/27).
            Here is 2 screenshots, after and before updating. Any clues?

            http://img42.imageshack.us/img42/3209/antest.jpg
            http://img132.imageshack.us/img132/7898/despuesty.jpg

            Cheers
            Jose

            Show
            Jose Gallardo added a comment - Hi Brandon, Im having the same issue on last week update (2010/10/27). Here is 2 screenshots, after and before updating. Any clues? http://img42.imageshack.us/img42/3209/antest.jpg http://img132.imageshack.us/img132/7898/despuesty.jpg Cheers Jose
            Hide
            Brandon Horn added a comment -

            Jose,

            I'm not sure if this is the same issue. Your second screenshot shows a submission for the first assignment. When I had the issue, there were no visible submissions for any assignments.

            I'll upgrade to the 2010/10/27 version tonight and I'll update this thread with the results.

            Brandon

            Show
            Brandon Horn added a comment - Jose, I'm not sure if this is the same issue. Your second screenshot shows a submission for the first assignment. When I had the issue, there were no visible submissions for any assignments. I'll upgrade to the 2010/10/27 version tonight and I'll update this thread with the results. Brandon
            Hide
            Brandon Horn added a comment -

            I just upgraded to Moodle 1.9.10 (Build: 20101027) and I don't have the issue I had before. I don't think you have the same issue.

            Good luck.

            Show
            Brandon Horn added a comment - I just upgraded to Moodle 1.9.10 (Build: 20101027) and I don't have the issue I had before. I don't think you have the same issue. Good luck.
            Hide
            Jose Gallardo added a comment -

            Hi Brandon,

            Sorry for the confusion, I made that submission after upgrading. No other submission was shown.

            When I enter on assignment submissions (http://img253.imageshack.us/img253/1298/submissions.jpg) y get only the list of teachers/admins, not the students.

            Then, I enter on the list of participants, and I get all students/teachers/admins (http://img196.imageshack.us/img196/8499/userszw.jpg).

            Im using Moodle 1.9.10 (Build: 20101027)

            Thanks!
            Jose

            Show
            Jose Gallardo added a comment - Hi Brandon, Sorry for the confusion, I made that submission after upgrading. No other submission was shown. When I enter on assignment submissions ( http://img253.imageshack.us/img253/1298/submissions.jpg ) y get only the list of teachers/admins, not the students. Then, I enter on the list of participants, and I get all students/teachers/admins ( http://img196.imageshack.us/img196/8499/userszw.jpg ). Im using Moodle 1.9.10 (Build: 20101027) Thanks! Jose

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: