Jump to content

[SOLVED] Exam Centre issuses


SkyWestVirtual

Recommended Posts

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

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

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?

Edited by OmerAslan
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...