$no_grade = false; } if ($instance->startdate > 0) { $startdate = true; } if ($instance->duedate > 0) { $duedate = true; } } //if no instance with grade $grader = $grader && !$no_grade; $student = $student && !$no_grade; //usort of old PHP versions don't call static class functions if ($sort > '') { $corder = new vpl_list_util(); $corder->set_order($sort, $sortdir == 'down'); usort($vpls, array($corder, 'cpm')); } //Generate table $table = new html_table(); $table->attributes['class'] = 'generaltable mod_index'; $table->head = array('#', $strname, $strshortdescription); $table->align = array('left', 'left', 'left'); if ($startdate) { $table->head[] = $strstartdate; $table->align[] = 'center'; } if ($duedate) { $table->head[] = $strduedate; $table->align[] = 'center'; }