Assignment attempts disappearing

Re: Assignment attempts disappearing

by Pino Calambrogio -
Number of replies: 32

Hello to all

after reviewing line by line all libraries of submissions, i found the problem smile

in \mod\assignment\lib.php

line 1151 (or near), we have the sql query, only change it:

COALESCE(SIGN(SIGN(s.timemarked) + SIGN(s.timemarked - s.timemodified)), 0) AS status ';

 

COALESCE(SIGN(CAST(s.timemarked as SIGNED) + SIGN(CAST(s.timemarked as SIGNED) - CAST(s.timemodified as SIGNED))), 0) AS status ';

i'm using mysql 5.5.8

when the clause try order this send a error because, timemarked sometimes is null and no have sign (is UNSIGNED in the DB)

 

regards ;)

Average of ratings: Useful (8)
In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Stuart Cox -

For what its worth....

Pino's modification worked for me. Students submitted work, and teachers saw "view 2 submitted assignments". When the clicked on it they saw "Nothing to display".

I made the mods shown above (although I typed it wrong the first time blush) and it now works perfectly. Suspect its a MySQL version issue?

Moodle 1.9.10+ (20110125)
MySQL 5.5.8
PHO 5.3.5

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Derek Lawrie -

Thanks Pino, that was driving me nuts, worked like a charm

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Claudia Fattor -

Hello to all:

I experienced the same problem, i'm using moodle 1.9.5

I tried what you suggested, but it didn't work for me.

Any other ideas?

This is driving me crazy!!!!!

I'll thank any help!!!!!!!!!!!!

Attachment nada que mostrar.JPG
In reply to Claudia Fattor

Re: Assignment attempts disappearing

by Adam Barbary -

We had a similar problem with 1.9.12+ (PostgreSQL 8.1.22) where clicking the status sort broke in a similar way. Only logging in and out remedied the problem.

One of our inhouse devs patched /mod/assignment/lib.php with the following attached file which appears to have fixed the problem.

Note this is compatible with postgreSQL, our Oracle team say this will not work on an Oracle database. All others, I don't actually know.

Cheers,

Adam

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Omar FALL -

Thank you Pino! You're a genious ...

As far as I am concerned I just followed your fix and it worked. This really shows how great this Moodle community is.

Thanks!

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Unitaria Wida -
It works!!!!! Whoaaaaa_____ u're really my prince charming, Pino!!! XD Hohoho -- just overreacted, after falling down from coconut trees --
In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Greg Padberg -

I seem to witness the same symptoms of viewing submitted assignments with result "Nothing to display".  This has been happening for the last few versions of Moodle (v1.9 branch) and the teacher claimed that it started happening this school year (last 2 months).  Moodle version 1.9.14, mysql 4.1.22, php 4.3.9, debug info is as follows:

Unknown column 'status' in 'order clause'

SELECT u.id, u.firstname, u.lastname, u.picture, u.imagealt, s.id AS submissionid, s.grade, s.submissioncomment, s.timemodified, s.timemarked FROM mdl_user u LEFT JOIN mdl_assignment_submissions s ON u.id = s.userid AND s.assignment = 8308 WHERE u.id IN (2202,2102,2096,2121,2112,2196,2109,2110,2111,2097,2095,2106,1962,2094,2103,2099,2101,2104,2108,2098,2105,2100,2113,2107) ORDER BY status ASC

  • line 687 of lib/dmllib.php: call to debugging()
  • line 967 of lib/dmllib.php: call to get_recordset_sql()
  • line 1184 of mod/assignment/lib.php: call to get_records_sql()
  • line 524 of mod/assignment/lib.php: call to assignment_upload->display_submissions()
  • line 43 of mod/assignment/submissions.php: call to assignment_upload->submissions()

After some searching the initial error seems similar to MDL-29529 although that bug corresponds to Moodle version 2.1.1 (same error however).  Any suggestions?

In reply to Greg Padberg

Re: Assignment attempts disappearing

by Greg Padberg -

The latest release of Moodle (1.9.15 for me) is supposed to have a fix for bug MDL-29529.  I expect to upgrade within a few days.

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by irfan şimşek -

I was a problem like that.

I solved it thanks to you.

Thank you very much.

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by enrique fanjul -

I had started to have this problem, with new assignments (old still appeared). I solved it with the "Pino solution".

Thank you Pino, you're really great....

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by paula williams -

Hi Pino,

It looks like you came up with a good solution to this problem which I am currently experiencing (version 1.9.4). I'm a newbie with fixing bugs though and I don't know how to implement your fix. Any guidance would be greatly appreciated.

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Luz Rosario -

Hi, my name is luz, where did i find the lib.php or mod\ assigment, i have the same problem i could not see the my students list to apply the calification.

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Luz Rosario -

Hi, Pinooooo


Please help me, i dont know nothing about postgres or php or sql, how did i find that or how could i fix the assigment dissaper problem.


Please help me

In reply to Luz Rosario

Re: Assignment attempts disappearing

by Salifou DENE -

Hello, I have give the solution in french forum.

Look the link:

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Pedro Xavier Camacho Pazmiño -

Pino... You are the best...!!!!


Thanks a lot... my problem was causing by the MySQL upgrade... but... now, with the line changed in lib.php all work's fine...


Thanks again..:!!!

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Russ Williams -

Thank you, Pino.
I actually had to modify two lines of code in the referenced directory.  One line at 842, and the other line at 1171.

R. Russell Williams

Average of ratings: Useful (1)
In reply to Russ Williams

Re: Assignment attempts disappearing

by Eduardo Rodrigues -

Like Russ Williams, I had also to change 2 occurrences of the bug fix pointed out by Pino.

Thanks Pino!

Also, Thanks Russ (because otherwise I wouldn't catch this need. wink)

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Narayan Solanke -

Dear Pino,

Thanks a lot for perfect solution.

I tried doing all, finally went to cpanel of  my website and edited lib.php as per your instructions and .... wow.. it works!!!

I suggest all to adopt this simple solution.

Thanks n Regards,

Narayan Solanke
INDIA

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Pedro M -

Me habia vuelto un poco loco, si eres de los que les pasa lo mismo. Lo que debes hacer es:

1)Primero antes que nada, generate una copia de respaldo del lib.php, si algo sale mal, el que va pagar los paltos rotos serás tu con desveladas arreglando el problema. smile

2)Borrar la siguiente linea que muestro en rojo (ojo: búscala dos veces, pues aparaece en dos ocasiones en ese archivo) en la siguiente ruta /mod/assignment/lib.php

COALESCE(SIGN(SIGN(s.timemarked) + SIGN(s.timemarked - s.timemodified)), 0) AS status ';

Y reemplázalas por esta:

COALESCE(SIGN(CAST(s.timemarked as SIGNED) + SIGN(CAST(s.timemarked as SIGNED) - CAST(s.timemodified as SIGNED))), 0) AS status ';

BINGO! smile .... a dormir se ha dicho, ya debe estar listo jeje

Thank you very much Pino Calambrogio for your help smile .... let´s sleep zzzz

Average of ratings: Useful (1)
In reply to Pedro M

Re: Assignment attempts disappearing

by Javier Rodriguez -

Excelente, gracias a todos por sus aportes. En especial a PINO.

Pedro gracias por tu traducción, me sirvio para saber que habia que reemplazar dos veces.

Funciona muy bien.

Saludos.

Celso.

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by David Casas -

Thank you, Pino!  The Moodle community is awesome!

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Nelson Ramon Lagos Rubio -

Gracias 

 

Eres lo mas grande. estimado.

 

gracias por compartir esta solución.

 

+1000000

 

 

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Orlando Acevedo -

Thank you very much Pino. Muchas gracias Pino. You are wonderful! It is working. I am smiling again.

In reply to Pino Calambrogio

Re: Assignment attempts disappearing

by Marcelo Castro -

Jesus!!!

Thanks a lot, this was my problem and your answer help me.