Assignment attempts disappearing

Re: Assignment attempts disappearing

av Pino Calambrogio -
Antall svar: 32

Hello to all

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

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 ;)

Gjennomsnittlig vurdering:Useful (8)
Som svar til Pino Calambrogio

Re: Assignment attempts disappearing

av 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 rødmer) and it now works perfectly. Suspect its a MySQL version issue?

Moodle 1.9.10+ (20110125)
MySQL 5.5.8
PHO 5.3.5

Som svar til Pino Calambrogio

Re: Assignment attempts disappearing

av 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!!!!!!!!!!!!

Vedlegg nada que mostrar.JPG
Som svar til Claudia Fattor

Re: Assignment attempts disappearing

av 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

Som svar til Pino Calambrogio

Re: Assignment attempts disappearing

av 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!

Som svar til Pino Calambrogio

Re: Assignment attempts disappearing

av Unitaria Wida -
It works!!!!! Whoaaaaa_____ u're really my prince charming, Pino!!! XD Hohoho -- just overreacted, after falling down from coconut trees --
Som svar til Pino Calambrogio

Re: Assignment attempts disappearing

av 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?

Som svar til Pino Calambrogio

Re: Assignment attempts disappearing

av 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....

Som svar til Pino Calambrogio

Re: Assignment attempts disappearing

av 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.

Som svar til Pino Calambrogio

Re: Assignment attempts disappearing

av 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.

Som svar til Pino Calambrogio

Re: Assignment attempts disappearing

av 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

Som svar til Pino Calambrogio

Re: Assignment attempts disappearing

av 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..:!!!

Som svar til Pino Calambrogio

Re: Assignment attempts disappearing

av 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

Gjennomsnittlig vurdering:Useful (1)
Som svar til Russ Williams

Re: Assignment attempts disappearing

av 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. blunker)

Som svar til Pino Calambrogio

Re: Assignment attempts disappearing

av 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

Som svar til Pino Calambrogio

Re: Assignment attempts disappearing

av 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. smiler

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! smiler .... a dormir se ha dicho, ya debe estar listo jeje

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

Gjennomsnittlig vurdering:Useful (1)
Som svar til Pedro M

Re: Assignment attempts disappearing

av 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.