Moodle

Online text assignment: Teacher comments can be lost when using combination of "quick grading" and "comment inline"

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.9, 1.9.1, 1.9.2
  • Fix Version/s: None
  • Component/s: Assignment
  • Labels:
    None
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

Steps to reproduce the loss of teacher comments on Online Text assignment:

1. Create Online Text assignment with the option "Comment Inline" set to Yes.
2. Tick the option "Allow quick grading" and click "Save preferences".
3. With any submission, click on the Grade link, which displays the submitted text in a pop-up window. Make changes inline and click Save changes.
4. The pop-up window closes but does not transfer any text from the changes just saved into the corresponding "comment" field.
5. Click "Save all my feedback" at the bottom of the screen
6. Click the "Update" link on the same submission. When the pop-up window displays, none of the inline comments you made previously have been retained.

I'm not entirely sure what the solution should be. It seems that "comment inline" and "quick grading" are not very compatible, so maybe only one of those options can be enabled at one time?

Issue Links

Activity

Hide
Elena Ivanova added a comment -

I would not say that it is minor, since we had several people doing this and loosing their work.

Show
Elena Ivanova added a comment - I would not say that it is minor, since we had several people doing this and loosing their work.
Hide
Paul Grzesina added a comment -

We had what seemed to be the same problem. The HTML editor isn't cleaning out carriage returns/line feeds properly. This causes some generated javascript to be incorrect (there's an unterminated string created). The following patch seems to have fixed the problem for us:

— htmlarea.php (revision 971)
+++ htmlarea.php (working copy)
@@ -2819,6 +2819,9 @@
if (s.charAt(0) == "\n") {
return s.substring(1, s.length);
}
+
+ // HACK by Enright - remove any line feed or carriage return characters
+ s = s.replace(/[\n\r]/gi, '');
s = s.replace(/ *\n/g,'\n');//strip spaces at end of lines
return s;
};

Show
Paul Grzesina added a comment - We had what seemed to be the same problem. The HTML editor isn't cleaning out carriage returns/line feeds properly. This causes some generated javascript to be incorrect (there's an unterminated string created). The following patch seems to have fixed the problem for us: — htmlarea.php (revision 971) +++ htmlarea.php (working copy) @@ -2819,6 +2819,9 @@ if (s.charAt(0) == "\n") { return s.substring(1, s.length); } + + // HACK by Enright - remove any line feed or carriage return characters + s = s.replace(/[\n\r]/gi, ''); s = s.replace(/ *\n/g,'\n');//strip spaces at end of lines return s; };
Hide
Clinton Graham added a comment -

This is not the fault of the editor, but the fault of the code in mod/assignment/lib.php which constructs a faulty javascript code line. See MDL-18069.

Show
Clinton Graham added a comment - This is not the fault of the editor, but the fault of the code in mod/assignment/lib.php which constructs a faulty javascript code line. See MDL-18069.
Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Michael de Raadt added a comment -

I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Show
Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

People

Dates

  • Created:
    Updated:
    Resolved: