Grading interface failing

Grading interface failing

by Peter P -
Number of replies: 24
We are using the 3.8.3 version of Moodle. Our grading interface just stopped working (see attached). The Ghostscript is working and cron is as well. This is a necessary part of Moodle for us and we need to get it fixed before our next program begins. Kindly help us!
Attachment MoodleAssignmentInterface.png
Average of ratings: -
In reply to Peter P

Re: Grading interface failing

by Ken Task -
Picture of Particularly helpful Moodlers

When entering the assignment, there are two buttons.

View All Submissions or Grade.

which are you using?

Grade button puts one in annotation screen right away
using the first users submission.  I see by your screen shot,
right side @ top, no 0 of 0.

Could it be the first student hasn't submitted a file?

If clicking View All Submissions, one is taken to a table of students in
course where one can see link to file submission as well as a 'grade' button.

What happens when entering the grading via View All Submissions?

There is a scheduled task for "Prepare submissions for annotation".  Does it show task was completed?

/admin/tool/task/scheduledtasks.php

Have you turned on debug to max to see if Moodle is complaining about something?

Have you looked at web server error logs for lines showing '/mod/assign/'
and what those might say?

'SoS', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Grading interface failing

by Peter P -
Hi Ken,

Thank you for your note. Actually, it happens when using both ways to access an assignment - grade and all submissions

To look into the issue, I am using an assignment dropbox from some time ago in which every student completed the assignment and it was already graded. So, this rules out the first student concern.

I am looking into the server logs now and so far in debugging Moodle is not complaining. In terms of scheduled tasks, for submission annotations, it was run a few minutes ago and all tasks are a success.

Interestingly, the grading interface works when a student is selected from the drop-down list of students. The assignment loads as does the feedback window. It is very strange.

Peter
In reply to Peter P

Re: Grading interface failing

by David Morrow -
Peter,

I have the same problem. Moodle v.3.7.3, using Google Drive document converter.

And our teachers have had to use the same solution you mention - selecting a participant name from the "Change user" drop-down in the top-right, even though a name was selected on the submissions page and appears at the top of the PDF annotations page. I mentioned it in an earlier thread, although I don't think my problem was the same as the original poster in that discussion - his seemed to be dependent on whether or not Feedback Comments was enabled. That doesn't matter on our site.

I am hoping that our upcoming summer update - to 3.9 - will solve this.

Please post any solution you find!

David
In reply to David Morrow

Re: Grading interface failing

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
I am on 3.82 with Google drive converter with no issues...the first one loads just fine...
Question - if you switch to another user and then back to the first user, does the document then load?
Average of ratings: Useful (1)
In reply to Emma Richardson

Re: Grading interface failing

by David Morrow -
Emma - hello!

Yes - but I can also select the original user (the one whose name is at the top of the page) from the Change user box and the doc will load.

Something like this:

  • Go to the assignment
  • View All submissions
  • Click grade button beside a student’s name
  • Grading page loads with that student’s name at top, along with the general assignment information on the left and the Change user box on the right - but the two main grading panels are blank with small rotating circles:
pdf grading page

This spinning will continue until a name is selected from the Change user box - this can be the originally selected student or any other student in the list. That student’s submission is then displayed and can be marked up in the left panel, and the other grading tools appear in the right-hand panel.

At that point, navigating to to other students’ work works fine - the “save and show next” button or using the Change user box to chose or search for a name, or using the Change user forward/back arrows.

Debugging on shows no errors.

Thanks for any insight!

David
In reply to David Morrow

Re: Grading interface failing

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
What theme are you using? Have you changed to Boost and seen if it works correctly then?
In reply to David Morrow

Re: Grading interface failing

by Ken Task -
Picture of Particularly helpful Moodlers

In Oauth2 Google set up
Is check box checked or un-checked for
Authenticate token requests via HTTP headers

In scopes, do you have
openid profile email https://www.googleapis.com/auth/drive

Are you using a service account for setup of Google?

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Grading interface failing

by David Morrow -
Emma and Ken - Thank you both for responding so quickly. My apologies for my taking so long to respond. I wanted to work through some samples and check everything I could to make sure I was accurate.

  • I use Fordson (3.7, 1.2.2). I had been using "&theme=boost" in the URL to test whether the theme was the problem, but this morning did change the site to Boost to really check. No difference, I'm afraid.
  • In the Oauth2 set up... I could have sworn I followed the instructions to the letter, but only had "openid profile email" in the two scopes settings. I've since added https://www.googleapis.com/auth/drive, but with no change to the described behavior.
  • "Authenticate token requests via HTTP headers" - that was unchecked. I checked it, but no change.
  • And I do have a service account connected. Green check.
Something that I didn't include in my original description - and I'm not sure if this is new behavior or I was just to focused on the assignments with PDF feedback enabled to notice: This odd behavior happens for all assignments when I use the "Grade" button to go to the individual student grading page (rather than use quick grading on the "View all assignments" page. Even an Online text/no PDF Feedback/No Feedback comments assignment. In all cases, clicking the "Grade" button opens an incomplete grading page - with the student name at the top, assignment info at the top-left, and a Choose user box top-right but little else except the little spinning circle. The footer with notify students/save and show next, etc. doesn't show, either.

But as soon as a name (even the same name as the one at the top of the page) is selected from the Change user box, everything is fine. Whatever grading/Feedback options were enabled in the Assignment settings work at that point - PDF conversion, rubric, etc. And using either the "Save and show next" button at the bottom, the forward/back arrows beside the Choose user box, or the dropdown or search in the Change user box lets the next student's grading page load fine.

It is just that initial loading of the individual student grading page where the problem occurs. The document conversion works fine - just not until a student is selected from the Change user box. Or really, if I understand it, the document conversion has already happened according to the scheduled task - so it is the display of the converted file that isn't happening automatically (and I may have that part wrong). Even more accurate, maybe, it is a problem with the grading page itself loading - no matter if document conversion is involved or not.

All the related built-in tests and checks seem to show no problems, with one exception. The "Test Ghostscript path" link on the Annotate PDF page does return this:

Error generating image with ghostscript, debugging info:
Command:
'/opt/lampp/bin/gs' -q -sDEVICE=png16m -dSAFER -dBATCH -dNOPAUSE -r'100' -dFirstPage='1' -dLastPage='1' -dDOINTERPOLATE -dGraphicsAlphaBits=4 
-dTextAlphaBits=4 -sOutputFile='/opt/lampp/htdocs/moodledata/temp/assignfeedback_editpdf_test/image_page0.png' '/opt/lampp/htdocs/moodle/mod/assign/feedback/editpdf/tests/fixtures/testgs.pdf' Result: Output:

In System paths, the path to GS has a check (a black check - if that means anything).

Debugging turned up to developer doesn't return any errors anywhere.

Thanks for any insight and your willingness to share!

David

In reply to David Morrow

Re: Grading interface failing

by Ken Task -
Picture of Particularly helpful Moodlers

3 things ...

the url to google for Drive is tied to API's turned on and accessible on the Google end.

The "Authenticate token requests via HTTP headers" - was something I ran into but don't remember which version of moodle ... but forums + sluething indicated it should be set opposite of defaults.   It was a guess!

This one you will have to give more info about setup of server/hosting etc.

/opt/lampp/htdocs/
for the ghostscript test ... if that fails, then problems.

On my CentOS 7 stock OS with git installed and maintained moodles (5 of them), ghostscript is what one should be pointed to.   Has libraries attached to it that /usr/bin/gs doesn't pick up for some reason.   ps is actually a symlink.  True path is /usr/bin/ghostscript.

Did you use one of those 'one click wonders' .... installs an entire AMP stack .... supposedly including compat ghostscript?

In your php info page, at the very top of that output for checking php version and extensions, there should be a line for 'system'.  Mind sharing that?

There is also a row for 'Loaded Configuration File' ... mind sharing that?

Sooooo .... ????

'SoS', Ken




Average of ratings: Useful (2)
In reply to Ken Task

Re: Grading interface failing

by David Morrow -
Ken,

It was a guess” - I’ll take a guess from you any day!

From the PHP info page:

System     Linux administrator-virtual-machine 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64

Loaded Configuration File     /opt/lampp/etc/php.ini

On gs v ghostscript (“True path is /usr/bin/ghostscript”) - I’m reading that to mean that the path to gs in system paths could/should be /opt/lampp/bin/ghostscript. Is that what you mean? I don’t see a file at that location, but there is a 10.5 kB file at /opt/lampp/bin/gs.

One-click wonder - I’m not sure. Our setup sounds odd to when I read about others. We are self-hosted in that Moodle is running on equipment owned by the district (K-12), but all of our equipment is “managed” by our network vendor …and I just deleted a lot of stuff I wrote because it is not strictly relevant at the moment, although it was a bit cathartic for me. Suffice it to say that they are not a Moodle provider. We are their only Moodle customer and it is not at the top of their priorities. So - if by one-click-wonder you mean “quickest and easiest”, then yes, probably.

The whole set up was upgraded a couple of years ago. Before that, the file structure was different - no lampp, htdocs. I do very little directly on the server, but I knew where things were, and was a little lost after that upgrade.

This seems very similar to this issue: https://moodle.org/mod/forum/discuss.php?d=394105 but without the invalid record error. The original poster never replied to your last comment in that thread, so I'm not sure how his situation played out. One other similarity to that post - that big upgrade I mentioned was from 3.1 to 3.5. But my current problem didn't appear until sometime after an update from 3.7.1 to 3.7.3 - as far as I can tell.

In that other thread, you asked about permissions for /opt/lampp/moodledata. I have this for /opt/lampp/htdocs/moodledata:




And in this one (https://moodle.org/mod/forum/discuss.php?d=373420&parent=1583333), you ask about .../moodledata/temp/assignfeedback_editpdf_test/ - that location is empty for me.

Gratefully,

David

In reply to David Morrow

Re: Grading interface failing

by Ken Task -
Picture of Particularly helpful Moodlers

Well, David ... from info shared and screen shot + clues provided ... here's what you have - it wasn't 'one click wonder' ... but 'one command wonder!' :\

Linux administrator-virtual-machine 4.10.0
So that's VMware - which could be on Linux or Windows or Mac.
with a 16.04.1-Ubuntu guest OS.

While 16.04 is long term support and eol is April 2024, there's this:
/opt/lampp

Guessing installed like apt-get install lamp-server.
which included Apache (version?), MySQL (version?), and PHP (version?)
in /opt/lampp ...  All above BTW, one might be able to see in php info page.

Now the question could be did that install all the libraries/supports to
run a Moodle ... ghostscript is but one thing.

And this:

self-hosted in that Moodle is running on equipment owned by the district (K-12), but all of our equipment is “managed” by our network vendor

says a lot!  Am a former ESC (Tx) K12 person and like your 'network vendor' in a way.

All this to say, whatever docs/blogs/etc you read about Moodle and Ubuntu 16.04.x  including the official Moodle docs like this one:
https://docs.moodle.org/38/en/Step-by-step_Installation_Guide_for_Ubuntu

and any advice given in forums ....

will always be 'different' ... obviously 'paths' and 'locations' of software such
as ghostscript.

The ghostscript command shown in the test failed ... no output ... no conversion ... no files where files should have been in moodledata.

This: /opt/lampp/bin/gs on your system is what the path should be I guess.

Got ssh into server?  Can you su or sudo?   If not you those 'support persons' ...

Once in ssh, type:

/opt/lampp/bin/gs -version [ENTER]

and wonder what else is in or missing from /opt/lampp/bin/

Bottom line ... managed” by our network vendor ...

You might have to have a serious discussion with them as they should be your first line of support.   They might need to sign up in these forums themselves ... and 'dismiss' you being the 'middle person' ... never a good spot to be in! :|

'SoS', Ken


In reply to Ken Task

Re: Grading interface failing

by Delbert Warkentin -
Hi David, Ken, Emma, and everyone else in this thread.
I am having the exact same issue (thanks @Emma Richardson for leading me to this thread) with the first assignment not loading. But with the work around (selecting mannually a user or clicking next) then it does.
I also have checked that it's not because of the theme, and Oauth2 set up is correct, and I also checked the "Authenticate token requests via HTTP headers" and I also have a service account connected.

The only difference is that my ghostscript is working and that I do not get any error as David does.
My php info page says
"System" Linux 3.10.0-1062.12.1.vz7.131.10 #1 SMP Mon Mar 16 15:39:59 MSK 2020 x86_64
"Loaded configuration file" /opt/cpanel/ea-php71/root/etc/php.ini

Thanks in advance for any insight and your willingness to help!
In reply to Delbert Warkentin

Re: Grading interface failing

by Ken Task -
Picture of Particularly helpful Moodlers

@Delbert ...

Linux 3.10.0-1062.12.1.vz7.131.10 appears to be vz7 = Virtuozzo Linux, a RHEL-based Linux distribution.

Easy apache 7.1.x

and 'my ghostscript is working' means what?   The test link?

Got ssh?

which ghostscript [enter]

that should show path to ghostscript

Maybe: /usr/bin/ghostscript

Then use that full path with

/usr/bin/ghostscript --version

Watch for a PM from me for a ghost-bench thang to test ghostscript.

'SoS', Ken



In reply to Ken Task

Re: Grading interface failing

by Ken Task -
Picture of Particularly helpful Moodlers

@all .... more fun and games! :|

Check paths
/admin/settings.php?section=systempaths

Set path to php cli so you can 'run now' the task that is supposed to prepare
assignments for grading.

There is also a scheduled task ...
/admin/tool/task/scheduledtasks.php

On my 3.8.3+ (Build: 20200512) centos 7, it's the first one listed in scheduledtask:

Prepare submissions for annotation \assignfeedback_editpdf\task\convert_submissions.

which has a 'logs' link:
/admin/tasklogs.php?filter=assignfeedback_editpdf\task\convert_submissions
which has search and a download link for a .log file.

A .log file should look like something like this:
Execute scheduled task: Prepare submissions for annotation (assignfeedback_editpdf\task\convert_submissions)
... started 16:30:02. Current memory use 18.7MB.
... used 1 dbqueries
... used 0.03821587562561 seconds
Scheduled task complete: Prepare submissions for annotation (assignfeedback_editpdf\task\convert_submissions)


In the scheduled task for preping, there is a 'run now' if you set path to
php-cli mentioned earlier.

And to top this off ... even more fun ... the files actually end up in the 'sea of files' of moodledata/filedir/ ?????!!!!!

mysql -u $mddbuser -p$mddbpass -e "use $mddbname;select id,filename,filearea,filesize from mdl_files where filearea='documentconversion';"


id    filename    filearea    filesize
15    .    documentconversion    0
16    .    documentconversion    0
4473    688c74675f84ecae08b1f73c19875af264e34f74    documentconversion    194324
4567    6498751061f36cccef3aacda49f438c9aa18da35    documentconversion    11069
4568    1d0a393274ac76d03c6b065affec00498a5dbf82    documentconversion    12347
4582    6faee9e044dcb1d3629e270a5f34e77b1ed620f9    documentconversion    44036

Where's OZ?  Where's OZ?  Must be messing with the 'Wicked Witch from the West'!!!! Are we in Kansas yet? :|

'SoS', Ken

In reply to Ken Task

Re: Grading interface failing

by Delbert Warkentin -
Ghostscript working means: this page /mod/assign/feedback/editpdf/testgs.php shows me a smiley face with a text saying "Ghostscript working as expected".
I do not have ssh.
Yes path to ghostscript is: /usr/bin/gs which I can see on /admin/settings.php?section=systempaths Next to it is a green checkmark.
In reply to Peter P

Re: Grading interface failing

by Robert Keys -
I'm wondering if you were ever able to solve this issue? This thread just seemed to trail off without indicating a resolution.

Rob
In reply to Peter P

Re: Grading interface failing

by Jirapong Supasaovapak -

Hi, I am currently having the same problem.

  1. Teacher click on an assignment link
  2. click view all submissions button
  3. click Grade button on any submission list
  4. the view individual submission view shows up with spinning (loading) icon -- indefinitely
  5. Workaround: choose any student from Change user box or click or the left/right arrows

The problem is encountered by every teachers in the course.

Moodle 3.10.1


In reply to Peter P

Re: Grading interface failing

by Maximiliano Simonazzi -

I had the same problem. Unchecked Javascript Cache in apearance solved the problem.

In reply to Maximiliano Simonazzi

Re: Grading interface failing

by Dr. Nellie Deutsch -
Is that a solution because Moodle recommends that we enable cache javascript.
In reply to Dr. Nellie Deutsch

Re: Grading interface failing

by Maximiliano Simonazzi -
i dont know that.... what happens if i disable js cache? do you have a link where i can read?
In reply to Peter P

Re: Grading interface failing

by Fernando Navarro Páez -
Picture of Testers
Same here like Jirapong Supasaovapak and others. Moodle 3.9.9 updated from 3.5

With Javascript cache disabled works fine, but cache should be enabled because performance (only).

Any idea?

Salu2
Fernando
In reply to Fernando Navarro Páez

Re: Grading interface failing

by Fernando Navarro Páez -
Picture of Testers
UPDATE: I have fixed it with a clean install of Moodle 3.9.9 and manually adding the missing plugins.

Salu2
Fernando