set_url('/blocks/autoattend/grade_settings.php', $urlparams); $wwwBlock = $CFG->wwwroot.'/blocks/autoattend'; $wwwMyURL = $wwwBlock.'/grade_settings.php'; $course = $DB->get_record('course', array('id'=>$courseid)); if (!$course) { print_error('courseidwrong', 'block_autoattend'); } require_login($course->id); $context = get_context_instance(CONTEXT_COURSE, $course->id); $isteacher = jbxl_is_teacher($USER->id, $context); if (!$isteacher) { print_error('notaccessnoteacher', 'block_autoattend'); } $user = $DB->get_record('user', array('id'=>$USER->id)); if (!$user) { print_error('nosuchuser', 'block_autoattend'); } ////////////////////////////////////////////////////////////////////////////////////////// // function grade_settings_show_table($settings) { $table = new html_table(); // $table->head [] = '#'; $table->align[] = 'center'; $table->size [] = '20px'; $table->wrap [] = 'nowrap'; $table->head [] = get_string('acronym','block_autoattend'); $table->align[] = 'center'; $table->size [] = '60px'; $table->wrap [] = 'nowrap'; $table->head [] = get_string('description'); $table->align[] = 'center'; $table->size [] = '60px'; $table->wrap [] = 'nowrap'; $table->head [] = get_string('grade'); $table->align[] = 'center'; $table->size [] = '60px'; $table->wrap [] = 'nowrap'; // $i = 0; foreach($settings as $set) { if ($set->status!='Y') { $table->data[$i][] = $i + 1; $table->data[$i][] = get_string($set->status.'acronym', 'block_autoattend'); $table->data[$i][] = get_string($set->status.'acronymfull','block_autoattend'); $table->data[$i][] = ''; $i++; } } echo '