Page 1 of 2
"Certificati rilasciati" da errore - Forma LMS 4.0.7
Posted: Sun Aug 18, 2024 6:52 pm
by giovanni.fantoni
Forma LMS 4.0.7 ed anche Forma LMS 4.0.10
Elearning > gestione certificati > certificati
"Certificati rilasciati" da errore
La pagina non funziona
xxxxx.comt al momento non è in grado di gestire la richiesta.
HTTP ERROR 500
Grazie
Giannu
Re: "Certificati rilasciati" da errore - Forma LMS 4.0.7
Posted: Sun Aug 18, 2024 7:05 pm
by alfa24
Ciao Giovanni, hai un fatal nel log del server.
Oppure un errore di timeout.
Verifica.
Re: "Certificati rilasciati" da errore - Forma LMS 4.0.7
Posted: Mon Aug 19, 2024 9:16 am
by giovanni.fantoni
Ciao Alfa,
mi da:
Fatal error: Uncaught Error: Call to undefined function Man_Course() in /var/www/vhosts/xxxx.it/subdomains/xxxx/httpdocs/appLms/admin/modules/certificate/certificate.php:540 Stack trace: #0 /var/www/vhosts/xxxx.it/subdomains/xxxx/httpdocs/appLms/admin/modules/certificate/certificate.php(843): report_certificate() #1
/var/www/vhosts/xxxx.it/subdomains/xxxx/httpdocs/appLms/admin/class.module/class.certificate.php(30): certificateDispatch('report_certific...') #2
/var/www/vhosts/xxxx.it/subdomains/xxxx/httpdocs/appCore/index.php(80): Module_Certificate->loadBody() #3 {main} thrown in
/var/www/vhosts/xxxx.it/subdomains/xxxx/httpdocs/appLms/admin/modules/certificate/certificate.php on line 540
Re: "Certificati rilasciati" da errore - Forma LMS 4.0.7
Posted: Mon Aug 19, 2024 9:53 am
by alfa24
Scrivi qui le prime 10 righe subito dopo la dichiarazione function report_certificate(), alla riga 843 del file var/www/vhosts/xxxx.it/subdomains/xxxx/httpdocs/appLms/admin/modules/certificate/certificate.php
Re: "Certificati rilasciati" da errore - Forma LMS 4.0.7
Posted: Mon Aug 19, 2024 10:48 am
by giovanni.fantoni
Ciao Alfa,
ecco.
report_certificate();
break;
case 'del_report_certificate':
del_report_certificate();
break;
case 'del_gen_certificate':
del_gen_certificate();
break;
case 'send_certificate':
send_certificate();
break;
case 'send_zip_certificates':
send_zip_certificates();
break;
case 'print_certificate':
print_certificate();
break;
case 'preview':
preview();
break;
default:
}
}
Re: "Certificati rilasciati" da errore - Forma LMS 4.0.7
Posted: Mon Aug 19, 2024 10:55 am
by alfa24
Perdonami, il numero di riga è fuorviante, occorrono le 10 righe successive a:
Re: "Certificati rilasciati" da errore - Forma LMS 4.0.7
Posted: Mon Aug 19, 2024 4:43 pm
by giovanni.fantoni
Ciao Alfa,
ho trovato alla riga 493
function report_certificate()
{
require_once _base_ . '/lib/lib.form.php';
require_once \FormaLms\lib\Forma::inc(_lms_ . '/lib/lib.certificate.php');
require_once _lms_ . '/lib/lib.course.php';
require_once _base_ . '/lib/lib.table.php';
checkPerm('view');
$out = &$GLOBALS['page'];
$out->setWorkingZone('content');
$form = new Form();
$certificate = new Certificate();
$lang = &FormaLanguage::createInstance('certificate', 'lms');
Re: "Certificati rilasciati" da errore - Forma LMS 4.0.7
Posted: Mon Aug 19, 2024 4:46 pm
by alfa24
Non vedo problemi, posta tutto il codice da questo punto fino alla riga 540.
Re: "Certificati rilasciati" da errore - Forma LMS 4.0.7
Posted: Mon Aug 19, 2024 5:39 pm
by giovanni.fantoni
function report_certificate()
{
require_once _base_ . '/lib/lib.form.php';
require_once \FormaLms\lib\Forma::inc(_lms_ . '/lib/lib.certificate.php');
require_once _lms_ . '/lib/lib.course.php';
require_once _base_ . '/lib/lib.table.php';
checkPerm('view');
$out = &$GLOBALS['page'];
$out->setWorkingZone('content');
$form = new Form();
$certificate = new Certificate();
$lang = &FormaLanguage::createInstance('certificate', 'lms');
if (isset($_GET['id_certificate'])) {
$id_certificate = importVar('id_certificate', true, 0);
$man_course = new Man_Course();
$id_course = [];
$id_course = $certificate->getCourseForCertificate($id_certificate);
$course_info = [];
$out->add(
getTitleArea([
'index.php?modname=certificate&op=certificate' => $lang->def('_TITLE_CERTIFICATE'),
$lang->def('_COURSES'),
])
. '<div class="std_block">'
. getBackUi('index.php?modname=certificate&op=certificate', $lang->def('_BACK'))
);
$tb = new Table(FormaLms\lib\Get::sett('visuItem'), $lang->def('_CHOOSE_COURSE'), $lang->def('_COURSE_LIST'));
$type_h = ['', '', 'min-cell'];
$cont_h = [
$lang->def('_CODE'),
$lang->def('_NAME'),
$lang->def('_CERTIFICATE_REPORT'),
];
$tb->setColsStyle($type_h);
$tb->addHead($cont_h);
foreach ($id_course as $course_id) {
$course_info = Man_Course()::getCourseInfo($course_id);
Re: "Certificati rilasciati" da errore - Forma LMS 4.0.7
Posted: Mon Aug 19, 2024 5:42 pm
by alfa24
Sostituisci
$course_info = Man_Course()::getCourseInfo($course_id);
Con
$course_info = Man_Course::getCourseInfo($course_id);