Hotpot for Moodle 2.5

Hotpot for Moodle 2.5

by Matt Lanning -
Number of replies: 8

Hi.

We would like to update our Moodle site to use Moodle 2.5.  When will a compatible version of Hotpot be released?  Or can the most current version be used?

Thank you.

Average of ratings: -
In reply to Matt Lanning

Re: Hotpot for Moodle 2.5

by Philippe Decloitre -

Hello Gordon and Matt,

I too would like some "updating" on 2.5. (so far it aint workin' smile)

Thank you ever so much!

Cheers

In reply to Philippe Decloitre

Re: Hotpot for Moodle 2.5

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Please could you explain more clearly what you mean by "it ain't working". thanks Gordon

In reply to Gordon Bateson

Re: Hotpot for Moodle 2.5

by María José Blanes -

Hi,

I've installed the last version of Hotpot module in a new installation of Moodle 2.5.

When I try to create a new activity or edit an existing one I get this errors:

Did you remember to call setType() for 'sourcelocation'? Defaulting to PARAM_RAW cleaning.

  • line 1303 of \lib\formslib.php: call to debugging()
  • line 281 of \lib\formslib.php: call to moodleform->detectMissingSetType()
  • line 202 of \lib\formslib.php: call to moodleform->_process_submission()
  • line 71 of \course\moodleform_mod.php: call to moodleform->moodleform()
  • line 248 of \course\modedit.php: call to moodleform_mod->moodleform_mod()

Did you remember to call setType() for 'quizchain'? Defaulting to PARAM_RAW cleaning.

  • line 1303 of \lib\formslib.php: call to debugging()
  • line 281 of \lib\formslib.php: call to moodleform->detectMissingSetType()
  • line 202 of \lib\formslib.php: call to moodleform->_process_submission()
  • line 71 of \course\moodleform_mod.php: call to moodleform->moodleform()
  • line 248 of \course\modedit.php: call to moodleform_mod->moodleform_mod()

The form is showed anyway, but when I press the "Save and display" button I get the same errors and this text:

"Error output, so disabling automatic redirect."

 

The activity is actually created and, as a student, I can access the activity and, later, I can see the grade in the gradebook, etc... So it seems to work well (except errors mentioned before).

I've also imported a complete course with a lot of hotpot activities and I have not found any problem.

I will continue testing.

Regards,

Maria

In reply to María José Blanes

Re: Hotpot for Moodle 2.5

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Thanks. Those are little warning messages and I have fixed them in the latest release of the HotPot module which I will make publicly available in a few minutes.

Any other problems with HotPot on Moodle 2.5?

regards
Gordon

In reply to Gordon Bateson

Re: Hotpot for Moodle 2.5

by María José Blanes -

Thanks for answering so quickly!

I've installed the last release in a Moodle 2.5 with Oracle database.

When I click on any of the reports (Overview, Scores, Responses or Item analysis) I get this error:
(In a local installation with MySQL database there are no problems)

 

Error reading from database

More information about this error

Debug info: ORA-00918: columna definida de forma ambigua
SELECT *
FROM (SELECT
ha.*, (ha.timemodified - ha.timestart) AS duration, 1 AS q_0, 1 AS q_1, 1 AS q_2, 1 AS q_3, 1 AS q_4, 1 AS q_5, 1 AS q_6, 1 AS q_7, 1 AS q_8, 1 AS q_9, 1 AS q_10, 1 AS q_11, 1 AS q_12, 1 AS q_13, 1 AS q_14, ROUND(gg.rawgrade, 0) AS grade, u.id AS userid, u.firstname, u.lastname, u.picture, u.imagealt, u.email
FROM m_hotpot_attempts ha, m_user u, m_grade_items gi, m_grade_grades gg
WHERE ha.hotpotid=:o_hotpotid AND ha.userid=u.id AND ha.userid=gg.userid AND gg.itemid=gi.id AND gi.courseid=:o_courseid AND gi.itemtype=:o_itemtype AND gi.itemmodule=:o_itemmodule AND gi.iteminstance=:o_iteminstance
ORDER BY u.firstname, u.lastname, ha.attempt ASC)
WHERE rownum <= :o_oracle_num_rows
[array (
'o_hotpotid' => '21',
'o_courseid' => '63',
'o_itemtype' => 'mod',
'o_itemmodule' => 'hotpot',
'o_iteminstance' => '21',
'o_oracle_num_rows' => 30,
)]
Error code: dmlreadexception
Stack trace:
  • line 423 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 272 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
  • line 1123 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
  • line 1395 of /lib/tablelib.php: call to oci_native_moodle_database->get_records_sql()
  • line 152 of /mod/hotpot/report/renderer.php: call to table_sql->query_db()
  • line 88 of /mod/hotpot/report/renderer.php: call to mod_hotpot_report_renderer->reportcontent()
  • line 93 of /mod/hotpot/report.php: call to mod_hotpot_report_renderer->render_report()

 

In reply to Gordon Bateson

Re: Hotpot for Moodle 2.5

by María José Blanes -

I've tried to fix the problem modifiying the file hotpot/report/renderer.php

I changed the line 326:
$userfields = ', u.id AS userid, u.firstname, u.lastname, u.picture, u.imagealt, u.email';

for the line
$userfields .= ', u.firstname, u.lastname, u.picture, u.imagealt, u.email';

After that, I got this error:

Notice: Undefined variable: userfields in /aplica/moodle/www/moodle/mod/hotpot/report/renderer.php on line 327
Call Stack
#TimeMemoryFunctionLocation
1 0.0003 713192 {main}egg ../report.php:0
2 0.3775 59506968 mod_hotpot_report_renderer->render_reportegg ../report.php:93
3 0.5790 69894512 mod_hotpot_report_renderer->reportcontentegg ../renderer.php:88
4 0.5981 70974864 mod_hotpot_report_renderer->select_sqlegg ../renderer.php:148

 

so I define the variable just before the line 326:
$userfields = '';

Now it seems to work fine but I don't know if I'm missing something. Could you take a look when you have some time?

(Sorry for my ignorance. I'm just trying to help...)

 

Regards,
Maria

Average of ratings: Useful (1)
In reply to María José Blanes

Re: Hotpot for Moodle 2.5

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Maria,
nice work! I will do a bit more testing before I release the fix officially, but basically I think you've found the problem and the solution. Thanks a lot approve

regards
Gordon

In reply to Gordon Bateson

Re: Hotpot for Moodle 2.5

by María José Blanes -

Hi Gordon,
thanks to you for your great work! big grin

A couple more of things...

 When, as a student, I click on the "Item Analisys Report" I get a repeated warning (I think It appears so many times as the student's attemps number):

 Did you remember to make the first column something unique in your call to get_records? Duplicate value '18' found in column 'id'.

  • line 1014 of \lib\dml\mysqli_native_moodle_database.php: call to debugging()
  • line 1395 of \lib\tablelib.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 152 of \mod\hotpot\report\renderer.php: call to table_sql->query_db()
  • line 88 of \mod\hotpot\report\renderer.php: call to mod_hotpot_report_renderer->reportcontent()
  • line 93 of \mod\hotpot\report.php: call to mod_hotpot_report_renderer->render_report()

 

I've been trying to find the problem by comparing with the hotpot add-on used in my university during this academic year (in a older version of Moodle).

In the query, I think the problem is the table "mdl_user u". It shouldn't appear at the FROM statement...(maybe?)

SELECT ha.*,
       (ha.timemodified - ha.timestart) AS duration,
       1 AS q_0,
       1 AS q_1,
       1 AS q_2,
       1 AS q_3,
       1 AS q_4,
       1 AS q_5,
       1 AS q_6,
       1 AS q_7,
       1 AS q_8,
       1 AS q_9,
       ROUND (gg.rawgrade, 0) AS grade
  FROM mdl_hotpot_attempts ha,
       mdl_user u,
       mdl_grade_items gi,
       mdl_grade_grades gg
 WHERE     ha.hotpotid = '5'
       AND ha.userid = '3'
       AND ha.userid = gg.userid
       AND gg.itemid = gi.id
       AND gi.courseid =  '8'
       AND gi.itemtype =  'mod'
       AND gi.itemmodule = 'hotpot'
       AND gi.iteminstance = '5'

 

On the other hand, if as a admin I click on a report and, after that, I change my rol (with "Swith rol to...") I get an error ("Can not find the data record in database"):

No se puede encontrar registro de datos en la base de datos.

Más información sobre este error

Debug info: SELECT cm.*, m.name, md.name AS modname
FROM {course_modules} cm
JOIN {modules} md ON md.id = cm.module
JOIN {hotpot} m ON m.id = cm.instance

WHERE cm.id = :cmid AND md.name = :modulename

[array (
'cmid' => 8,
'modulename' => 'hotpot',
)]
Error code: invalidrecordunknown
Stack trace:
  • line 1400 of \lib\dml\moodle_database.php: dml_missing_record_exception thrown
  • line 1275 of \lib\datalib.php: call to moodle_database->get_record_sql()
  • line 34 of \mod\hotpot\report.php: call to get_coursemodule_from_id()

 

This time I've not idea how to fix it...sad

Regards,
Maria