My level of SQL is really basic. I have never use Left join before. I found that before but Im still don't get how to use the function. The checkbox Im trying to load it status I created with this code:
$mform->addElement('advcheckbox', 'notwoquizrequire', 'Do you want this quiz not to open if the student has another open quiz in this class?: ',
'by selecting this check box it will set that restiction. ', array(0, 1));
on add_settings_form_fields. Then on get_settings_sql I have the following code: public static function get_settings_sql($quizid) {
return array(
'notwoquizrequired',
"LEFT JOIN {quizaccess_notwoatsametime} notwoquizrequire ON quizid = quiz.id",
array());
}
and is not loading the status of the checkbox. Also when I write after the ON notwoquizatthetime.quizid I get an error saying that the column can't be find. Any idea of what Im doing wrong?