Moodle

Student cannot see reponse file for Advanced uploading of assignment with No Grade

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.2, 2.0.4, 2.1.1
  • Fix Version/s: 1.9.15, 2.0.6, 2.1.3
  • Component/s: Assignment
  • Labels:
    None
  • Environment:
    Moodle 1.9.2 (Build: 20080711)

  • Testing Instructions:
    Hide

    Setup: A course with at least one teacher and one student enrolled.

    • In the course, create an assignment of type "Advanced uploading" (with default settings).
    • Log in as the student, and open the assignment.
    • Click "upload files", add a file to the list, click "Save changes".
    • Click "Send for marking", then "Continue".
    • Log in as the teacher, and open the assignment.
    • Click "View 1 submitted assignments".
    • Click "Grade" next to the student's submission.
    • In "Response files" section, click "Add", and add one file.
    • Click "Save changes".
    • Log in as the student, and open the assignment.

    TO VERIFY: The student now sees the response file uploaded by the teacher, below the heading "Submission feedback".

    Show
    Setup: A course with at least one teacher and one student enrolled.
    • In the course, create an assignment of type "Advanced uploading" (with default settings).
    • Log in as the student, and open the assignment.
    • Click "upload files", add a file to the list, click "Save changes".
    • Click "Send for marking", then "Continue".
    • Log in as the teacher, and open the assignment.
    • Click "View 1 submitted assignments".
    • Click "Grade" next to the student's submission.
    • In "Response files" section, click "Add", and add one file.
    • Click "Save changes".
    • Log in as the student, and open the assignment.
    TO VERIFY: The student now sees the response file uploaded by the teacher, below the heading "Submission feedback".
  • Database:
    PostgreSQL
  • Affected Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE
  • Pull from Repository:
  • Pull 1.9 Branch:
  • Pull 2.0 Branch:
  • Pull 2.1 Branch:
  • Pull Master Branch:

Description

Teacher created an Advanced Uploading of Files assignment. Grade was set to No Grade
Students uploaded a file
Teacher downloaded file, made corrections, saved it as a different name and uploaded it as a response file
Teacher saved feedback (didn't give a grade since type was No Grade)
Students received notification that assignment grade was updated.
When students tried to access the response file it was not present although teacher could still see it in the grade window

After reproducing this, I set the assignment to receive a grade and then gave the student a grade.
The student could then see the response file along with the grade

Although there is an easy workaround, this does not act the way I expected. Teachers should be able to set this as a No Grade assignment and also give students a response file. The particular teacher who notified me of this problem did not want to use the Moodle gradebook, but actually gave the students the grade on the response file.

Issue Links

Activity

Hide
Lori Bakken added a comment -

We have the same problem as well

Show
Lori Bakken added a comment - We have the same problem as well
Hide
Ellen Marie Murphy added a comment -

We have a number of instructors who have run into this as a problem. Even if they are using a gradebook, they don't always want to assign a grade to an "assignment" as they are not considering the exchange an "assignment". I didn't seem to be a problem with previous versions of Moodle. Thanks.

Show
Ellen Marie Murphy added a comment - We have a number of instructors who have run into this as a problem. Even if they are using a gradebook, they don't always want to assign a grade to an "assignment" as they are not considering the exchange an "assignment". I didn't seem to be a problem with previous versions of Moodle. Thanks.
Hide
Caroline Moore added a comment -

I would argue that this is more than a minor problem. When an instructor selects "No Grade," s/he should not have to input a fake grade for every student simply so that they can see the returned file. For large classes this process is time consuming. If one is using the Moodle gradebook, one must take the additional step of making sure the fake grades do not affect the student's final grade.

Show
Caroline Moore added a comment - I would argue that this is more than a minor problem. When an instructor selects "No Grade," s/he should not have to input a fake grade for every student simply so that they can see the returned file. For large classes this process is time consuming. If one is using the Moodle gradebook, one must take the additional step of making sure the fake grades do not affect the student's final grade.
Hide
Nicholas McJetters added a comment -

This behavior also occurs if the teacher does not give a reply in the comment box on the quick grading assignment screen. If this is left empty, then the response file will not be presented to the student as well.

Show
Nicholas McJetters added a comment - This behavior also occurs if the teacher does not give a reply in the comment box on the quick grading assignment screen. If this is left empty, then the response file will not be presented to the student as well.
Hide
Caroline Moore added a comment -

Has there been any progress on this? Now that our Spring semester has started, I am seeing more faculty experiencing this problem. It is more than a minor issue for us.

Show
Caroline Moore added a comment - Has there been any progress on this? Now that our Spring semester has started, I am seeing more faculty experiencing this problem. It is more than a minor issue for us.
Hide
Paul Grzesina added a comment -

The following patch to mod/assignment/type/upload/assignment.class.php seems to fix it for us:

@@ -108,7 +108,7 @@
return;
}

  • if ($grade->grade === null and empty($grade->str_feedback)) { /// Nothing to show yet
    + if ($grade->grade === null and empty($grade->str_feedback) and !$this->count_responsefiles($USER->id)) { /// Nothing to show yet return; }
Show
Paul Grzesina added a comment - The following patch to mod/assignment/type/upload/assignment.class.php seems to fix it for us: @@ -108,7 +108,7 @@ return; }
  • if ($grade->grade === null and empty($grade->str_feedback)) { /// Nothing to show yet + if ($grade->grade === null and empty($grade->str_feedback) and !$this->count_responsefiles($USER->id)) { /// Nothing to show yet return; }
Hide
Lucian DiPeso added a comment -

This looks similar to MDL-18516.

Show
Lucian DiPeso added a comment - This looks similar to MDL-18516.
Hide
Donna Hrynkiw added a comment -

We are experiencing this issue in v1.9.5

Alternate work-around:

You can leave Grade set to "No Grade" IF you add some text in the Feedback text field.
(Repeating comment from Nicholas McJetters, and confirming Paul Grzesina's fix.)

Show
Donna Hrynkiw added a comment - We are experiencing this issue in v1.9.5 Alternate work-around: You can leave Grade set to "No Grade" IF you add some text in the Feedback text field. (Repeating comment from Nicholas McJetters, and confirming Paul Grzesina's fix.)
Hide
Roger Emery added a comment -

Hi,

We were using this response file to deliver audio feedback mp3 files to students last academic year (using 1.8x) - with no grade, no text comments.
Have applied the Paul Grzesina fix to 1.9.5 and it works fine, so we have existing functionality back (Many Thanks!). However I appreciate other peoples need for assignments to be graded before the response file is delivered.

One thought - I've been wondering if its possible to make a new assignment type (maybe call it 'Response File' or 'Assignment Feedback') by hacking down the advanced upload type to just have the response functionality without the student upload / notes area? Would this then offer the functionality we require, but keep the advanced upload in tact for the other use? Or maybe the advanced upload just needs some additional options in the settings to achieve this?

Roger

Show
Roger Emery added a comment - Hi, We were using this response file to deliver audio feedback mp3 files to students last academic year (using 1.8x) - with no grade, no text comments. Have applied the Paul Grzesina fix to 1.9.5 and it works fine, so we have existing functionality back (Many Thanks!). However I appreciate other peoples need for assignments to be graded before the response file is delivered. One thought - I've been wondering if its possible to make a new assignment type (maybe call it 'Response File' or 'Assignment Feedback') by hacking down the advanced upload type to just have the response functionality without the student upload / notes area? Would this then offer the functionality we require, but keep the advanced upload in tact for the other use? Or maybe the advanced upload just needs some additional options in the settings to achieve this? Roger
Hide
Joseph Cummings added a comment -

We are experiencing this issue in v1.9.5
Grade is set to No Grade
Feedback is included but students cannot see the response files.

Show
Joseph Cummings added a comment - We are experiencing this issue in v1.9.5 Grade is set to No Grade Feedback is included but students cannot see the response files.
Hide
Dan Poltawski added a comment -

Hi Everyone,

I've just tried to replicate this problem on Moodle 1.9.7 and I can't replicate the problem!

Is this still hapening on 1.9.7?

Show
Dan Poltawski added a comment - Hi Everyone, I've just tried to replicate this problem on Moodle 1.9.7 and I can't replicate the problem! Is this still hapening on 1.9.7?
Hide
Tony Butler added a comment -

Yes, Moodle 1.9.7 is affected too. Possible fix attached (works for us).

Show
Tony Butler added a comment - Yes, Moodle 1.9.7 is affected too. Possible fix attached (works for us).
Hide
Barbara Taylor added a comment -

We are running 1.9.9 and are having this issue but not on every assignment. The first assignment didn't have any problems. The second assignment will not release back to the students.

Show
Barbara Taylor added a comment - We are running 1.9.9 and are having this issue but not on every assignment. The first assignment didn't have any problems. The second assignment will not release back to the students.
Hide
Steve Bond added a comment -

This problem persists in Moodle 2.0.

Upload response file with no grade and no feedback, then student cannot see the response file. Go back and type something into the feedback field, then the student can see the file.

I'm not sure that there's anything ambiguous about this bug - it is very clear from the code Paul identifies above that students see nothing unless the grade or the feedback field are completed. Paul's fix completely solves this problem.

Show
Steve Bond added a comment - This problem persists in Moodle 2.0. Upload response file with no grade and no feedback, then student cannot see the response file. Go back and type something into the feedback field, then the student can see the file. I'm not sure that there's anything ambiguous about this bug - it is very clear from the code Paul identifies above that students see nothing unless the grade or the feedback field are completed. Paul's fix completely solves this problem.
Hide
Henning Bostelmann added a comment -

We are seeing this bug in Moodle 1.9 as well as Moodle 2.1; we're getting around it with a local fix since ages.

The problem can actually be fixed by moving only a fe lines of code, see diffs. The root problem seems to be that submitting the response file updates $submission->timemarked, which seems consistent, but is incorrectly handled in the present piece of code.

Can you have a look whether this fix can be integrated into core? Note that it affects three stable branches meanwhile.

Show
Henning Bostelmann added a comment - We are seeing this bug in Moodle 1.9 as well as Moodle 2.1; we're getting around it with a local fix since ages. The problem can actually be fixed by moving only a fe lines of code, see diffs. The root problem seems to be that submitting the response file updates $submission->timemarked, which seems consistent, but is incorrectly handled in the present piece of code. Can you have a look whether this fix can be integrated into core? Note that it affects three stable branches meanwhile.
Hide
Michael de Raadt added a comment -

Hi, Dan.

Are you able to peer review this, or would you like us to do it at HQ?

Michael;

Show
Michael de Raadt added a comment - Hi, Dan. Are you able to peer review this, or would you like us to do it at HQ? Michael;
Hide
Dan Poltawski added a comment -

Sorry for the delay - the fix looks good to me!

Show
Dan Poltawski added a comment - Sorry for the delay - the fix looks good to me!
Hide
Bente Olsen added a comment -

This problem is not only affecting the Advanced uploading of file, Online text assignments have the same problem.
Should I create a separate report for this or will the patch here fix both assignment types?

Show
Bente Olsen added a comment - This problem is not only affecting the Advanced uploading of file, Online text assignments have the same problem. Should I create a separate report for this or will the patch here fix both assignment types?
Hide
Bente Olsen added a comment -

A workaround:

I have created a two step 'grade scale': Commented, Completed

When the teacher have commented the submitted assignment she use the 'grade' Commented. The student correct the assignment according to the feedback and resubmit. The teacher at last mark the assignment as completed. It might be possible to work with an one step 'grade scale', I do not know.

Show
Bente Olsen added a comment - A workaround: I have created a two step 'grade scale': Commented, Completed When the teacher have commented the submitted assignment she use the 'grade' Commented. The student correct the assignment according to the feedback and resubmit. The teacher at last mark the assignment as completed. It might be possible to work with an one step 'grade scale', I do not know.
Hide
Henning Bostelmann added a comment -

Hi Dan, thanks for reviewing the patch. Unfortunately I can't send the fix directly to integration; you'd need to do it for me. Thanks!

(Branches have been rebased to latest weekly release.)

Show
Henning Bostelmann added a comment - Hi Dan, thanks for reviewing the patch. Unfortunately I can't send the fix directly to integration; you'd need to do it for me. Thanks! (Branches have been rebased to latest weekly release.)
Hide
Dan Poltawski added a comment -

Oops, sorry Henning - I have submitted this for integration. Thanks!

Show
Dan Poltawski added a comment - Oops, sorry Henning - I have submitted this for integration. Thanks!
Hide
Sam Hemelryk added a comment -

Thanks everyone!
This has been integrated now on all branches.

Cheers
Sam

Show
Sam Hemelryk added a comment - Thanks everyone! This has been integrated now on all branches. Cheers Sam
Hide
Rossiani Wijaya added a comment -

It looks good in all branches.

Test passed.

Show
Rossiani Wijaya added a comment - It looks good in all branches. Test passed.
Hide
Longfei Yu added a comment -

We also ran into this issue today (2.0.3, Oracle), the student cannot see the comments and feedback file if it is a "No Grade" assignment.

I found there are 2 view_feedback function, one is in mod/assignment/lib.php, another is mod/assignment/type/upload/assignment.class.php, looks like one is overwritten by another one.

Actually, the patch from here doesn't work for me. I have to following the patch from: http://tracker.moodle.org/browse/MDL-12515

292 if ($grade->grade === null and empty($grade->str_feedback)) { /// Nothing to show yet
293 //10/11/2011
294 if (empty($submission->submissioncomment)) { 295 echo('No comments for this assignment'); 296 }
297 $grade->str_feedback = $submission->submissioncomment;
298 $grade->usermodified = $submission->teacher;
299 $grade->dategraded = $submission->timemodified;
300 }
301 $graded_date = $grade->dategraded;
302 $graded_by = $grade->usermodified;

Any thoughts? Why the patch from here doesn't do anything on my install?

Show
Longfei Yu added a comment - We also ran into this issue today (2.0.3, Oracle), the student cannot see the comments and feedback file if it is a "No Grade" assignment. I found there are 2 view_feedback function, one is in mod/assignment/lib.php, another is mod/assignment/type/upload/assignment.class.php, looks like one is overwritten by another one. Actually, the patch from here doesn't work for me. I have to following the patch from: http://tracker.moodle.org/browse/MDL-12515 292 if ($grade->grade === null and empty($grade->str_feedback)) { /// Nothing to show yet 293 //10/11/2011 294 if (empty($submission->submissioncomment)) { 295 echo('No comments for this assignment'); 296 } 297 $grade->str_feedback = $submission->submissioncomment; 298 $grade->usermodified = $submission->teacher; 299 $grade->dategraded = $submission->timemodified; 300 } 301 $graded_date = $grade->dategraded; 302 $graded_by = $grade->usermodified; Any thoughts? Why the patch from here doesn't do anything on my install?
Hide
Rossiani Wijaya added a comment -

Hi Longfei,

Thanks for testing this issue.

This patch is addressing the issue for "Advanced uploading" assignment. However, I did a quick test for "single upload" and indeed the issue still occurs there.

I will create new issue to fix single upload assignment.

Show
Rossiani Wijaya added a comment - Hi Longfei, Thanks for testing this issue. This patch is addressing the issue for "Advanced uploading" assignment. However, I did a quick test for "single upload" and indeed the issue still occurs there. I will create new issue to fix single upload assignment.
Hide
Longfei Yu added a comment -

I just applied this patch on (2.0.3), and found that student can only see the response files, but still cannot see the comments.

I did not dig the source code too deep, I am wondering what's the relationship between the "$grade->str_feedback" and "$submission->submissioncomment"?

Anyway, looks what I did, and the comments DO show up in a box:

mod/assignment/type/upload/assignment.class.php

if ($grade->grade === null and empty($grade->str_feedback)) { /// Nothing to show yet
if ($this->count_responsefiles($USER->id)) { // but possibly response files are present
echo $OUTPUT->box_start('generalbox boxaligncenter', 'comments');
echo '<table>';
echo '<tr><td><strong>Comments:</strong></td>';
if (empty($submission->submissioncomment)){ $grade->str_feedback = 'No comments for this assignment'; }else{ $grade->str_feedback = $submission->submissioncomment; }
echo '<td>'.$grade->str_feedback.'</td></tr>';
echo '</table>';
echo $OUTPUT->box_end();
echo $OUTPUT->heading(get_string('responsefiles', 'assignment'), 3);
$responsefiles = $this->print_responsefiles($USER->id, true);
echo $OUTPUT->box($responsefiles, 'generalbox boxaligncenter');
}
return;

Show
Longfei Yu added a comment - I just applied this patch on (2.0.3), and found that student can only see the response files, but still cannot see the comments. I did not dig the source code too deep, I am wondering what's the relationship between the "$grade->str_feedback" and "$submission->submissioncomment"? Anyway, looks what I did, and the comments DO show up in a box: mod/assignment/type/upload/assignment.class.php if ($grade->grade === null and empty($grade->str_feedback)) { /// Nothing to show yet if ($this->count_responsefiles($USER->id)) { // but possibly response files are present echo $OUTPUT->box_start('generalbox boxaligncenter', 'comments'); echo '<table>'; echo '<tr><td><strong>Comments:</strong></td>'; if (empty($submission->submissioncomment)){ $grade->str_feedback = 'No comments for this assignment'; }else{ $grade->str_feedback = $submission->submissioncomment; } echo '<td>'.$grade->str_feedback.'</td></tr>'; echo '</table>'; echo $OUTPUT->box_end(); echo $OUTPUT->heading(get_string('responsefiles', 'assignment'), 3); $responsefiles = $this->print_responsefiles($USER->id, true); echo $OUTPUT->box($responsefiles, 'generalbox boxaligncenter'); } return;
Hide
Eloy Lafuente (stronk7) added a comment -

Many thanks for the hard work developing and testing this. It has been spread to cvs and git upstream repositories.

Closing, ciao

Show
Eloy Lafuente (stronk7) added a comment - Many thanks for the hard work developing and testing this. It has been spread to cvs and git upstream repositories. Closing, ciao
Hide
Longfei Yu added a comment -

I know this ticket is for the "response file". How about that comments? Students still cannot see the comments if it is "No Grade" assignment. Any new ticket to talk about this? Thanks.

Show
Longfei Yu added a comment - I know this ticket is for the "response file". How about that comments? Students still cannot see the comments if it is "No Grade" assignment. Any new ticket to talk about this? Thanks.
Hide
Andrea Gordon added a comment -

Hi All.. is the same fix out there for the Online Assignment type also? Still seeing this bug in the latest 2.1.4.

Cheers

Show
Andrea Gordon added a comment - Hi All.. is the same fix out there for the Online Assignment type also? Still seeing this bug in the latest 2.1.4. Cheers
Hide
Matt Jenner added a comment -

Sorry to sound foolish but we have v.1.9.16 but this issue is still on our system. Using Advanced uploading of files to only return a file to the students has failed to work. The member of staff has upload the response file for students yet the students are unable to view their files until either a grade has been given or feedback left.

The comments here indicate this problem is resolved? I looked at the code:

mod\assignment\type\upload\assignment.class.php:

Lines 94-101:

if ($grade->grade === null and empty($grade->str_feedback)) { // No grades to show yet
if ($this->count_responsefiles($USER->id)) { // but possibly response files to show print_heading(get_string('responsefiles', 'assignment', $this->course->teacher), '', 3); $responsefiles = $this->print_responsefiles($USER->id, true); print_simple_box($responsefiles, 'center'); }
return;
}

Should this code be showing response files to students sans grade/feedback? From tests I've only managed to show the file when either a grade or feedback is also included.

Show
Matt Jenner added a comment - Sorry to sound foolish but we have v.1.9.16 but this issue is still on our system. Using Advanced uploading of files to only return a file to the students has failed to work. The member of staff has upload the response file for students yet the students are unable to view their files until either a grade has been given or feedback left. The comments here indicate this problem is resolved? I looked at the code: mod\assignment\type\upload\assignment.class.php: Lines 94-101: if ($grade->grade === null and empty($grade->str_feedback)) { // No grades to show yet if ($this->count_responsefiles($USER->id)) { // but possibly response files to show print_heading(get_string('responsefiles', 'assignment', $this->course->teacher), '', 3); $responsefiles = $this->print_responsefiles($USER->id, true); print_simple_box($responsefiles, 'center'); } return; } Should this code be showing response files to students sans grade/feedback? From tests I've only managed to show the file when either a grade or feedback is also included.

Dates

  • Created:
    Updated:
    Resolved:
    Integration date: