I am creating local plugin. Here I want to insert admin setting in my custom table. I can't understand how to insert it. it always show error. unknown parameter. here is my code. I also search for admin hook or something helpful to me. But I get nothing. Please help me to sort out this issue.
<?php
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/local/exam/lib.php');
if ($hassiteconfig) {
$oya =array();
$choices = array('1'=>'true', '0'=>'false');
$opt=array();
$options = exam_get_numbering_types();
foreach($options as $option){
$sdbr = $option->id;
$pno = $option->subject;
$oya[$sdbr] = $pno;
}
$setting = new admin_settingpage('local_question',get_string('Add_Questions', 'local_exam'), 'moodle/site:config');
$setting->add(new admin_setting_configselect('exam/select','Subject', 'veverve', 'none', $oya));
$setting->add(new admin_setting_confightmleditor('Exam/Question', 'Question', '','','','50'));
$setting->add(new admin_setting_configtext('Exam/Marks', 'Marks', '','','','62'));
$ADMIN->add('localplugins', $setting);
}
?>