Submitty / Submitty

Homework Submission, Automated Grading, and TA grading system.
http://submitty.org
BSD 3-Clause "New" or "Revised" License
658 stars 791 forks source link

Annotating PDFs doesn't work with typing text #6699

Closed KCony closed 3 years ago

KCony commented 3 years ago

Describe the bug When attempting to annotate a student's PDF, typing text is either not working a tall or allows the text to be types but then all text disappears, depending on the browser. Clicking "Save" button has no effect.

Expected behavior Text typed in the annotation node of grading PDFs should remain visible on the page and saved when the "Save" button is clicked.

To Reproduce Steps to reproduce the behavior:

  1. Open a student's PDF (I was grading article01 gradeable from CSCI-4963).
  2. Click on "A" and then click anywhere on the PDF to start typing. The box appears and allows you to type (see screenshot 1).
  3. When you click outside of the box to confirm the entry (or press Enter), the box disappears along with the text (screenshot 2).
  4. Clicking the "Save" button says "Saved" but the text is still gone (screenshot 2).

Configuration

Screenshots image image image

Additional context "Text size" combo box that can be accessed by clicking the image icon doesn't have any font size selected by default. It just shows blank space.

eddiekrystowski commented 3 years ago

@KCony Can you let me know if the text is still disappearing after selecting a specific font size? (ie. the font size isn't blank)

eddiekrystowski commented 3 years ago

@KCony I believe I have fixed this in #6727 but unfortunately for gradeables that are already affected, the annotations will need to be reset by navigating to /var/local/submtity/<course path>/annotations/<gradeable id> and deleting the directory associated with the user whose pdf you are annotating. Until the fix is released in production, ensure that pen size and text size are always set before making annotations to avoid this bug.

KCony commented 3 years ago

It doesn't look like it got fixed, unfortunately. I just spend like an hour making a lot of annotations on a student's PDF. Before I started, I made sure I selected the color and the text size. Also, I saved everything, and Submitty was saying "Saved". I leave the page and then come back to check everything still looks good. One annotation is missing but all others are still in place. So, I typed the missing annotation again, saved, left the page, came back, and ... Now, the only annotation that is there is the one that was added last, just one. Everything else has been erased. The entire hour of work is gone. I can't tell you how frustrating it is:

image

KCony commented 3 years ago

And now, I thought I redo my annotations while I remember them. I did like the first paragraph, saved, left the page, came back, and now my "Title" annotation is gone!

image

eddiekrystowski commented 3 years ago

That is definitely quite frustrating... if you get the chance, would you mind going to this pdf and opening the browser console and sending a screenshot of any errors you see there? Also, did you manually delete the annotations from /var/local/submtity/<course path>/annotations/<gradeable id> to manually reset them? If not, it is likely that whatever garbage that was left over from before is still there and causing the annotations to fail.

KCony commented 3 years ago

It doesn't look like I have the necessary permissions, even when I try it with sudo:

image

KCony commented 3 years ago

Here are the errors that get logged in the browser:

image

In the screenshot above note also how the student's name area is screwed up with some weird vertical scroll and text running over some other text on the page.

image

Here is the full log: Some cookies are misusing the recommended “SameSite“ attribute 20 Uncaught ReferenceError: toolbar_bbox is not defined

https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1533 grade:1129:30 WebSocket: connecting to wss://submitty.cs.rpi.edu:8443/ws websocket.js:41:17 WebSocket: connected websocket.js:44:21 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/ twig.min.js:2:79872 Uncaught SyntaxError: redeclaration of let currentTool https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC line 2 > injectedScript:1 jQuery 11 success https://submitty.cs.rpi.edu/js/ta-grading.js?v=1624944782:1543 jQuery 4 grade:1:1 Warning: Setting up fake worker. grade:1:10529 SingleFile is hooking the FontFace constructor to get font URLs. 2 hooks-frames-web.js:1:514 SingleFile is hooking the FontFace constructor to get font URLs. grade:1:223 SingleFile is hooking the FontFace constructor to get font URLs. grade:1:223 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Source map error: Error: JSON.parse: unexpected character at line 1 column 1 of the JSON data Resource URL: https://submitty.cs.rpi.edu/vendor/twigjs/twig.min.js?v=1625860340 Source Map URL: twig.min.js.map Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30
KCony commented 3 years ago

When I then add another annotation and Submitty kills all previous ones, it logs an additional error at the very bottom:

image

Full log is now:

Some cookies are misusing the recommended “SameSite“ attribute 24 Uncaught ReferenceError: toolbar_bbox is not defined

https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1533 grade:1129:30 WebSocket: connecting to wss://submitty.cs.rpi.edu:8443/ws websocket.js:41:17 WebSocket: connected websocket.js:44:21 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/ twig.min.js:2:79872 Uncaught SyntaxError: redeclaration of let currentTool https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC line 2 > injectedScript:1 jQuery 11 success https://submitty.cs.rpi.edu/js/ta-grading.js?v=1624944782:1543 jQuery 4 grade:1:1 Warning: Setting up fake worker. grade:1:10529 SingleFile is hooking the FontFace constructor to get font URLs. 2 hooks-frames-web.js:1:514 SingleFile is hooking the FontFace constructor to get font URLs. grade:1:223 SingleFile is hooking the FontFace constructor to get font URLs. grade:1:223 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Source map error: Error: JSON.parse: unexpected character at line 1 column 1 of the JSON data Resource URL: https://submitty.cs.rpi.edu/vendor/twigjs/twig.min.js?v=1625860340 Source Map URL: twig.min.js.map Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught ReferenceError: toolbar_bbox is not defined https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1129 grade:1129:30 Uncaught SyntaxError: redeclaration of let currentTool https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC line 2 > injectedScript:1 jQuery 11 success https://submitty.cs.rpi.edu/js/ta-grading.js?v=1624944782:1543 jQuery 6 loadPDF https://submitty.cs.rpi.edu/js/ta-grading.js?v=1624944782:1531 viewFileFullPanel https://submitty.cs.rpi.edu/js/ta-grading.js?v=1624944782:1513 openFrame https://submitty.cs.rpi.edu/js/ta-grading.js?v=1624944782:1448 onclick https://submitty.cs.rpi.edu/courses/u21/csci4963/gradeable/article01/grading/grade?who_id=i8oJ1l1CjA1MLBC&sort=id&direction=ASC:1 grade:1:1 Warning: Setting up fake worker. grade:1:10529
KCony commented 3 years ago

Also this: image