Assignment attempts disappearing

Re: Assignment attempts disappearing

дэргэд Pino Calambrogio -
Хариу нийтлэлийн тоо: 32

Hello to all

after reviewing line by line all libraries of submissions, i found the problem инээмсэглэл

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

Pino Calambrogio-н хариуд

Re: Assignment attempts disappearing

дэргэд 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 улайх) and it now works perfectly. Suspect its a MySQL version issue?

Moodle 1.9.10+ (20110125)
MySQL 5.5.8
PHO 5.3.5

Pino Calambrogio-н хариуд

Re: Assignment attempts disappearing

дэргэд 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!!!!!!!!!!!!

Хавсралт nada que mostrar.JPG
Claudia Fattor-н хариуд

Re: Assignment attempts disappearing

дэргэд 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

Pino Calambrogio-н хариуд

Re: Assignment attempts disappearing

дэргэд 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?

Pino Calambrogio-н хариуд

Re: Assignment attempts disappearing

дэргэд 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.

Pino Calambrogio-н хариуд

Re: Assignment attempts disappearing

дэргэд 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

Pino Calambrogio-н хариуд

Re: Assignment attempts disappearing

дэргэд 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

Pino Calambrogio-н хариуд

Re: Assignment attempts disappearing

дэргэд 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

Pino Calambrogio-н хариуд

Re: Assignment attempts disappearing

дэргэд 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. инээмсэглэл

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! инээмсэглэл .... a dormir se ha dicho, ya debe estar listo jeje

Thank you very much Pino Calambrogio for your help инээмсэглэл .... let´s sleep zzzz