Welcome, Guest
How To / General
  • Page:
  • 1
  • 2

TOPIC: return error when publish CB joomdle my certificate plugin

return error when publish CB joomdle my certificate plugin 10 months 2 weeks ago #1

  • saman
  • saman's Avatar
  • Offline
  • تماس با من : samansamani2[at]yahoo.com
hi
when i use cb joomdle my certificate and publish that ,then i give this error:

XML-RPC Error (95042507): خطا در خواندن از پایگاه داده | DEBUG INFO: Table 'mydatabasename_demo2.mdl_certificate' doesn't exist SELECT c.name, c.id, ci.timecreated as certdate FROM mdl_certificate c LEFT JOIN mdl_certificate_issues ci ON c.id = ci.certificateid WHERE ci.userid = ? AND c.course IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ORDER BY ci.timecreated DESC [array ( 0 => '4', 1 => '20', 2 => '30', 3 => '21', 4 => '9', 5 => '23', 6 => '22', 7 => '14', 8 => '12', 9 => '11', 10 => '10', 11 => '8', 12 => '2', 13 => '15', 14 => '13', 15 => '3', 16 => '7', )] | ERRORCODE: dmlreadexception


it seems ci is problem in the sql or persian character render as ? ... i don't know what happen but it was work.
Last Edit: 10 months 2 weeks ago by saman.
The administrator has disabled public write access.

return error when publish CB joomdle my certificate plugin 10 months 2 weeks ago #2

  • saman
  • saman's Avatar
  • Offline
  • تماس با من : samansamani2[at]yahoo.com
ok...problem solved, cause of that is ???? related to some unicode in the past set...
The administrator has disabled public write access.

return error when publish CB joomdle my certificate plugin 10 months 2 weeks ago #3

  • Antonio Durán
  • Antonio Durán's Avatar
  • Offline
Hi.
I don't know... the message says the certificate table does not exist.
The administrator has disabled public write access.

return error when publish CB joomdle my certificate plugin 1 week 2 days ago #4

  • saman
  • saman's Avatar
  • Offline
  • تماس با من : samansamani2[at]yahoo.com
hi again after 10 monuth



i get this error when i use cb joomdle my certificate plugin:
XML-RPC Error (95042507): Error reading from database | DEBUG INFO: Table 'bitnami_moodle.mdl_certificate' doesn't exist SELECT c.name, c.id, ci.timecreated as certdate FROM mdl_certificate c LEFT JOIN mdl_certificate_issues ci ON c.id = ci.certificateid WHERE ci.userid = ? AND c.course = ? ORDER BY ci.timecreated DESC [array ( 0 => '47', 1 => '2', )] | ERRORCODE: dmlreadexception

this error occur when you have not any certificate and go to the profile page of CB. for resolve this problem after some hours that spend on joomdle CB certificate plugin, i do below work and solve it. please say me is my work is correct or not?
i do this in line 47 of cbmycertificates.php :
if (!$this->certs)
		{
			// $username = $user->get('username');
// file_put_contents('C:\Users\work\AppData\Roaming\xampp\htdocs\XXX_my_certificates_simple.txt','-------(getTabTitle)normal' . PHP_EOL,FILE_APPEND);
			// $this->certs = JoomdleHelperContent::call_method ("my_certificates", $username, 'normal');
            $this->certs = array();
		}
when we have not any cert type in moodle , these lines switch with 'normal' selecet case and it select mdl_certificate table use auth.php but it is not exist in my moodle.
for replicate this problem you can simply install this plugin in moodle and login with user that not have any certificate and then go to cb profile...
The administrator has disabled public write access.

return error when publish CB joomdle my certificate plugin 1 week 21 hours ago #5

  • Antonio Durán
  • Antonio Durán's Avatar
  • Offline
Thanks for the report, bu it is assumed that you need to install appropiate certificate module in Moodle for CB plugin to work.
We don't do any checks, because that would need calling Moodle. XMLRPC error is explanatory enough, if you enable the CB certificate plugin by mistake.
The administrator has disabled public write access.

return error when publish CB joomdle my certificate plugin 1 week 20 hours ago #6

  • saman
  • saman's Avatar
  • Offline
  • تماس با من : samansamani2[at]yahoo.com
i use simple certificate plugin in my moodle and set correctly in the joomla settings. you can test that. for replicate the problem you can :
1-install simple certificate in moodle
2-create simple certificate activity in moodle course and empty or testing certificate
3-set correct setting for simple certificate in joomla>CB plugin
4-login to joomla and go to cb-profile menu.
note: your testing user must not have any certificate
Last Edit: 1 week 20 hours ago by saman.
The administrator has disabled public write access.

return error when publish CB joomdle my certificate plugin 1 week 19 hours ago #7

  • Antonio Durán
  • Antonio Durán's Avatar
  • Offline
Sorry, I did not understand what you said. You are totally correct. Thanks for taking the time to make me see the problem.
Please try this:
in file cbmycertificates.php , replace getTabTitle by this one:
    public function getTabTitle( $tab, $user, $ui, $postdata )
    {
        $plugin     =   cbarticlesClass::getPlugin();
        $viewer     =   CBuser::getMyUserDataInstance();

        $params = $this->params; // get parameters (plugin and related tab)
        $cert_type = $params->get('certificate_type');

        if (!$this->certs)
        {
            $username = $user->get('username');
            $this->certs = JoomdleHelperContent::call_method ("my_certificates", $username, $cert_type);
        }
        $total = count ($this->certs);

        return parent::getTabTitle( $tab, $user, $ui, $postdata ) . ' <span class="badge badge-default">' . (int) $total . '</span>';
    }
The administrator has disabled public write access.

return error when publish CB joomdle my certificate plugin 1 week 19 hours ago #8

  • saman
  • saman's Avatar
  • Offline
  • تماس با من : samansamani2[at]yahoo.com
ok ... i was thinking that you are not accept my report... ok your code is better than me where you use $cert_type in this line:
$this->certs = JoomdleHelperContent::call_method ("my_certificates", $username, $cert_type);
Last Edit: 1 week 19 hours ago by saman.
The administrator has disabled public write access.

return error when publish CB joomdle my certificate plugin 1 week 4 hours ago #9

  • Antonio Durán
  • Antonio Durán's Avatar
  • Offline
Thanks, good to know it is working. We'll release a new version of the plugin soon with the fix.
The administrator has disabled public write access.

return error when publish CB joomdle my certificate plugin 1 week 4 hours ago #10

  • saman
  • saman's Avatar
  • Offline
  • تماس با من : samansamani2[at]yahoo.com
if is it posible, please say my name.thank you
The administrator has disabled public write access.
  • Page:
  • 1
  • 2