Joomdle 1.0 Installation

bug in the completion info in auth.php

  • saman سامان
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • samansamani2[at]yahoo.com
More
4 years 5 months ago #1 by saman سامان
bug in the completion info in auth.php was created by saman سامان
hi @Antonio after long time...
i find an other bug when i use availibility condition for any resource or activity in moodle course to restrict other activity must complete i get this error:
Code:
{"exception":"invalid_response_exception","errorcode":"invalidresponse","message":"Invalid response value detected (mods => Invalid response value detected (completion_info => Invalid response value detected (Scalar type expected, array or object received.): Scalar type expected, array or object received.): completion_info => Invalid response value detected (Scalar type expected, array or object received.): Scalar type expected, array or object received.)","debuginfo":"mods => Invalid response value detected (completion_info => Invalid response value detected (Scalar type expected, array or object received.): Scalar type expected, array or object received.): completion_info => Invalid response value detected (Scalar type expected, array or object received.): Scalar type expected, array or object received."}

i change this line and resolve problem:
in auth.php-> line 5503
Code:
$resource['completion_info'] = $cm2->availableinfo;
change to:
Code:
$course = $DB->get_record('course', array('id' => $id), '*', MUST_EXIST); $resource['completion_info'] = \core_availability\info::format_info($cm2->availableinfo, $course);

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic bug in the completion info in auth.php
Thanks for the bug report and your fix. We'll check it out for next release.

Please Log in or Create an account to join the conversation.