Assignment Module Not Functioning Correctly

Assignment Module Not Functioning Correctly

by Jayden Tyronian -
Number of replies: 24
We recently updated to v3.11+ and are using Assignment module v2021051701

Error and the Assignment Grading screen attached for reference.

We have gone back to earlier assignnments that were grasded and worked perfectly fine before.  These are now doing the samer thing.

The only thing that's occured recently is the update to 3.11.  Wondering if its a permission error?  The filedire in moodledata is 777, the folder and files within of the module is 775.

This is a critical function, so getting it resolved quickly would be great.

Jayden

assignment_grading_not_loading_correctlymessage error
Average of ratings: -
In reply to Jayden Tyronian

Re: Assignment Module Not Functioning Correctly

by Jayden Tyronian -
Here is the debug information:

No debug information appears on this screen, but clearly it is not operating as it should. Even for prior submitted/graded exams, it now looks like this and thinks the file uploaded is corrupt when it isn't.

Jayden
Average of ratings: Useful (1)
In reply to Jayden Tyronian

Re: Assignment Module Not Functioning Correctly

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
What you are seeing probably relates to the conversion/storage of pdfs rather than the assignment module, but you probably know that. Have you tried a fresh test assignment and is there anything in the Javascript console. There probably is not but it is good to eliminate possibilities. To get at all possible debug messages you could set Debug to developer and check again.
In reply to Marcus Green

Re: Assignment Module Not Functioning Correctly

by Jayden Tyronian -
Hi Marcus

It seemed weird it was all working fine until we upgraded to v3.11.7. I have tried a brand new PDF and doc file and it so far has not given the corrupt error.

However,it is not displaying the assignment (in either case) and the right-side area, is this tiny box, you have to scroll and even then is useless.

shruken right-hand panel

blank assignment - not showing

Jayden
In reply to Jayden Tyronian

Re: Assignment Module Not Functioning Correctly

by Jayden Tyronian -
I was wondering if anyone has coe across this issue and can provide any insights. I've tried having debug on, but nothing comes up.

Jayden
In reply to Jayden Tyronian

Re: Assignment Module Not Functioning Correctly

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
You need to check what you are using for document conversion (already mentioned by Marcus).  And check your ghostscript settings.  Chances are when you upgraded, something was also changed on the server that affected this.  Where is your instance hosted?  What OS?  Are you using Google or Unoconv for document conversion?
In reply to Emma Richardson

Re: Assignment Module Not Functioning Correctly

by Jayden Tyronian -
Hi Emma

We are using Google for document conversion (the test in moodle for it says everything is fine on that end.

Moodle is on Linode (so have full control of the server) and runs on Linux either Ubantu or Rocky off hand I can't recall which now. Ghostscript path is looking fine (green tick).

I'm not seeing anything obvious in the console Marcus indicated.

Jayden
In reply to Jayden Tyronian

Re: Assignment Module Not Functioning Correctly

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
What happens if you upload a new assignment? Does it work?
In reply to Emma Richardson

Re: Assignment Module Not Functioning Correctly

by Jayden Tyronian -
A blank space where the assignment should be and the right-hand side bits are still super small.

Assignment Issue

I have even uploaded fresh versions of the files etc.  Still the same result.

Jayden
In reply to Jayden Tyronian

Re: Assignment Module Not Functioning Correctly

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Maybe try redownloading the moodle code and replacing the assignment folder to see if that does anything - do you have any plugins that are related to the assignment (feedback/submission/etc)?
In reply to Jayden Tyronian

Re: Assignment Module Not Functioning Correctly

by Ken Task -
Picture of Particularly helpful Moodlers
"Moodle is on Linode (so have full control of the server) and runs on Linux either Ubantu or Rocky off hand I can't recall which now. Ghostscript path is looking fine (green tick)."

'Devils' are always in the details.   Uhhhh ... while Ubuntu and Rocky are linux distro's, not sure I'd say that both are equal.  Rocky probably has SELinux running in the enforcing mode ... Ubuntu doesn't use SELinux ... me thinks!

In paths config of your server, do you see a poppler reference and if so, what does that comment about it say?

Think it will say 'if installed' ... will be used instead of gs.

"Poppler is a PDF rendering library which includes the tool pdftoppm for converting PDF files to PNG. Performance is generally better than when using Ghostscript, particularly for large files. If available, pdftoppm will be used in preference to Ghostscript. On most Linux installs, the path can be left as /usr/bin/pdftoppm. Otherwise, you need to install the poppler-utils or poppler package, depending on your Linux distribution."

If not installed, install it ... via Package Manager - apt-get if Ubuntu and either yum or dnf for Rocky.

Does hosting on LInode give any extra protections .... like a Web Application Firewall?

Have you checked web server's error logs?

Recently upgraded to 3.11.x from what version?
And was anything done with moodledata?

'SoS', Ken

In reply to Ken Task

Re: Assignment Module Not Functioning Correctly

by Jayden Tyronian -
Hi Ken

It was a 3.11.7 (i think offhand) to 3.11.17 (Build: 20231009). - the upgrade otherwise went fine and ahs been running fine, except when this was found.

Moodledata was not touched in anyway other than cache being purged.

Poppler was not isntalled, but it is now and I've updated the path (confirmed by moodle as correct).  No change in the assignment area though both for generating and showing the assignment OR thew right-hand panel for making notes and adding the grade.

Jayden

In reply to Jayden Tyronian

Re: Assignment Module Not Functioning Correctly

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
When testing, you always have to test with a new file upload - the old ones will not render until reuploaded...
In reply to Emma Richardson

Re: Assignment Module Not Functioning Correctly

by Jayden Tyronian -
I have uploaded a brand new file upload in doc and PDF and nothing changes when going to Grade.

@Ken - I'm grabbing the error log and going through it to see if anything comes up so will let you know about that ASAP.

Jayden
In reply to Jayden Tyronian

Re: Assignment Module Not Functioning Correctly

by Ken Task -
Picture of Particularly helpful Moodlers
The following may/may not be related, but ever since vr 2.2 of core code there has been an assignment mod - supposed to be hidden and no longer used.   That mod underwent a conversion from old to new ... the new being the 'assign' directory in mod.

By chance are those errant assignments using the old 2.2?

The old assignment directory version.php file has this:
$plugin->version   = 2021051700;       // The current module version (Date: YYYYMMDDXX).
$plugin->requires  = 2021051100;    // Requires this Moodle version.
$plugin->component = 'mod_assignment'

The plugin version above shows to be one less than the one you shared in reporting the issue.

'SoS', Ken

In reply to Ken Task

Re: Assignment Module Not Functioning Correctly

by Jayden Tyronian -
Hi Emma and Ken

So the 'old 2.2 assignment plugin, I have uninstalled. So I am only using the new assign (assignment) plugin. COnfirmed byt he URL it uses when utilisaing that function in Moodle.

The version information I gave in my first post was the versin for Assign (sorry I should have clarrified that, though I guess I didn't since its not used, but I won't assume next time).

The following is the only things that come up assignment related. Note 'Online Exam' here is Assignment related.

image of plugins related to assignment

I have tried disablling options in these, but nothing changed with the 'issue'.

Jayden
In reply to Jayden Tyronian

Re: Assignment Module Not Functioning Correctly

by Ken Task -
Picture of Particularly helpful Moodlers
Got command line?
cd /path/to/moodlecodedirectory/admin/cli/
Then
php scheduled_task.php --execute="\assignfeedback_editpdf\task\convert_submissions"

You should see something like:

Execute scheduled task: Prepare submissions for annotation (assignfeedback_editpdf\task\convert_submissions)
... started 18:04:28. Current memory use 2.6MB.
... used 1 dbqueries
... used 0.16192197799683 seconds
Scheduled task complete: Prepare submissions for annotation (assignfeedback_editpdf\task\convert_submissions)

'SoS', Ken

In reply to Ken Task

Re: Assignment Module Not Functioning Correctly

by Jayden Tyronian -
Yep:

Execute scheduled task: Prepare submissions for annotation (assignfeedback_editpdf\task\convert_submissions)
... started 19:12:17. Current memory use 2.4MB.
... used 1 dbqueries
... used 0.10318684577942 seconds
Scheduled task complete: Prepare submissions for annotation (assignfeedback_editpdf\task\convert_submissions)

Jayden
In reply to Ken Task

Re: Assignment Module Not Functioning Correctly

by Jayden Tyronian -
Yep

Execute scheduled task: Prepare submissions for annotation (assignfeedback_editpdf\task\convert_submissions)

... started 19:38:12. Current memory use 2.5MB.

... used 1 dbqueries

... used 0.10112404823303 seconds

Scheduled task complete: Prepare submissions for annotation (assignfeedback_editpdf\task\convert_submissions)


Jayden

In reply to Jayden Tyronian

Re: Assignment Module Not Functioning Correctly

by Ken Task -
Picture of Particularly helpful Moodlers
GRRRR!sad

In the setup of assignments ... any of them ... there is an option for
restricting or allowing submission types .... mime types ...
What is accepted file types?
* means any - all file types
If set to 'Document Files' that includes .doc, .docx, .epub, .gdoc, .odt, .ott, .oth, .pdf and .rtf

application/vnd.google-apps.document .gdoc
EPUB ebook .epub
OpenDocument Text document .odt
OpenDocument Text template .ott
OpenDocument Web page template .oth
PDF document .pdf
RTF document .rtf
Word 2007 document .docx
Word document .doc

Confirm on your system?

As Teacher, click into assignment.
You get a Grading Summary screen that shows Participants, Submitted, Needs Greding.

Confirmed on your system?

On that screen one can click:
View All Submissions or Grade button.

What happens when you click either?

If you view all submissions, do you see a doc in the right column?
Right mime type?

When you click the file seen in File Submissions column, what happens?

What's in
/var/www/moodledata/temp/assignfeedback_editpdf/pageimages
Anything?

And nothing in error logs?????

'SoS', Ken

In reply to Ken Task

Re: Assignment Module Not Functioning Correctly

by Jayden Tyronian -
Hi Ken

I feel ya.

Submission types: We only use doc, docx and pdf presently

Submission SUmmary Screen: Yes, I can see the screen thaat has Grading Summary, wuth participants, submitted and needs grading along with a view all submissions and grade button

View all submission/Grade button: View all submissions goes to a submission screen listing all participants, their id number, email, status of the assignment (no submission, submitted for grading etc, grade with a grade button and a box for the grade achieved, edit, last modified, file submission, feedback comments etc.

Clicking on the Grade button from the summary screen, takes you to the page where you would see the assignment in the main part of the screen and the submission summary/notes/grade section on the right. (Nothing shows in the main screen, though it does tell me how many pages it is (the one I am looking at says Page 1 of 5 for example and the submission/notes/grade righ-side box is tiny and you have to use the up/down arrows beside it to scroll which is usless as its so reduced (that screenshot I posted in the first post in this thread).

What happens if click on file in file submission column: in this case the exam was submitted in PDF, clicking on it downloads the file which I can open in Acrobat completely fine.  I checked another submitted as a docx, same I can download and open fine.

What's in /var/www/moodledata/temp/assignfeedback_editpdf/pageimages: Nothing

Error Logs: no

Jayden





In reply to Jayden Tyronian

Re: Assignment Module Not Functioning Correctly

by Ken Task -
Picture of Particularly helpful Moodlers
More GRRRRRRRRR!

Hmmm...can't tell what theme you are using.
Quick check ... add a line to config.php like so:

$CFG->theme='boost';

No need to restart anything ... just login, go to an assignment and check it out.

The screen that showed you 1 of 5 ... did you click the right arrow to look at the next 'page' (really next image of the conversion)?

Thing about this is this ... I have a sandbox 3.11.highest and don't see anything like you are describing.   See attached.

'SoS', Ken




Attachment Screenshot 2023-11-06 at 8.00.42 PM.png
In reply to Ken Task

Re: Assignment Module Not Functioning Correctly

by Jayden Tyronian -
Hi Ken

We are presently using Fordson theme. I added the config line to force it to Boost and I can confirm the same issue is present in that theme as well. When I go to page 2 or 3 etc. same results.

I seem to have a knack for breaking something that makes no sense on how - I've done the same apparently with the Course Contacts plugin too back a bit too. Still not sure what the deal was with it.

Jayden
In reply to Jayden Tyronian

Re: Assignment Module Not Functioning Correctly

by Ken Task -
Picture of Particularly helpful Moodlers
No one can be that unlucky! :|

There has to be a clue ... somewhere!
Have asked this more than once, but will again ... what's in your web server logs - error log specifically.

The process can take a long time (longer than most) ... so what are your php settings for time for a script to run and memory a script can consume?   Bump those upwards ... like 30 to 60 and 256M.

'SoS', Ken

In reply to Ken Task

Re: Assignment Module Not Functioning Correctly

by Jayden Tyronian -
I don't know... I feel that way lately.

Will look and get back to you on the error report side of things.

Jayden