get_records_sql($sql, array('studentid'=>$USER->id)); $data = array(); if (count($records)) { foreach ($records as $key => $value) { if (!array_key_exists($value->gst_name, $data)) $data[$value->gst_name] = array(); $data[$value->gst_name][] = array($value->gs_name, $value->grade, $value->fileid); } } return $data; } } // // INSERT INTO `mdl_gradeimporter_feedback` (`id`, `submissionid`, `studentid`, `grade`, `comment`, `fileid`, `usermodified`, `timecreated`, `timemodified`) // VALUES // (1, 10, 1, 10.00, 'ok muito bem', 100, 0, 0, 0); //