[SOLVED] Exam Centre issuses

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.

Any help would be great

Thanks

SKW Virtual

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.

1 Like

Thank you so much for your reply, Il let you know if it works, thanks

Thank you so much for your help,

Fully working now

I can not go to exams_admin page gives me

[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]

how can i fix this please?

tpl or php version of phpvms?

Make sure you upload all the files, then rename them to .tpl instead of .php iif your running that version.

Yes i did upload files second time and it’s working. Thanks my friend.

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?