Hi, I have tried to installed the Exam Centre for PHPVMS and having trouble getting it to work.
I have got 3 erros come up on the exam centre its self:
Strict Standards : Non-static method ExamsData::get_setting_info() should not be called statically, assuming $this from incompatible context in /home/u966377323/public_html/core/modules/Exams/Exams.php on line 20
Strict Standards : Non-static method ExamsData::get_exams() should not be called statically, assuming $this from incompatible context in /home/u966377323/public_html/core/modules/Exams/Exams.php on line 29
Notice : The template file â/home/u966377323/public_html/core/templates/exams/exam_list.phpâ doesnât exist in /home/u966377323/public_html/core/classes/TemplateSet.class.php on line 231
I also got errors come up on the Admin page for the Exam Centre:
Warning : call_user_func_array() expects parameter 1 to be a valid callback, class âExamsâ does not have a method âadminâ in /home/u966377323/public_html/core/classes/MainController.class.php on line 218
I have added my self as an admin level 1 to the php table and donât know what to try next.
The first two, go to core/common/ExamsData.class.php
and change the following
public function get_setting_info($id) {
$query = "SELECT *
FROM ".TABLE_PREFIX."exams_settings
WHERE id='$id'";
return DB::get_row($query);
}
public function get_exams() {
$query = "SELECT *
FROM ".TABLE_PREFIX."exams
WHERE active='1'
ORDER BY cost ASC";
return DB::get_results($query);
}
to
public static function get_setting_info($id) {
$query = "SELECT *
FROM ".TABLE_PREFIX."exams_settings
WHERE id='$id'";
return DB::get_row($query);
}
public static function get_exams() {
$query = "SELECT *
FROM ".TABLE_PREFIX."exams
WHERE active='1'
ORDER BY cost ASC";
return DB::get_results($query);
}
and you may as well change then all to âstaticâ to avoid future issues.
Third Issue: go to core/templates/exams and change all .tpl files to .php
Fourth Issue: Make sure you are going to YOURSITEURL/index.php/ Exams_admin not just /Exams and make sure you have uploaded all the files correctly.
Iâve made some amendments to this here, but not sure if it will work (and I canât offer any support). Just as an example of what I have said to do above.
[b]Notice[/b]: The template file "/home/pilotomeraslan/public_html/a/core/templates/exams/frontpage_main.php" doesn't exist in [b]/home/pilotomeraslan/public_html/a/core/classes/TemplateSet.class.php[/b] on line [b]231[/b]
I create an exam, i purchased and i passed the exam; all works great. Only the thing is, when i see my answers on the left side was broken pic. icons. What can i do to show those icons there?