function Create_SelectList($course_id, $cur_pts, $box_name) { global $JLMS_DB; $query = "SELECT id as value, scale_name as text FROM #__lms_gradebook_scale WHERE course_id = {$course_id} ORDER BY ordering, scale_name"; $JLMS_DB->SetQuery($query); $gb_scale = array(); $gb_scale[] = mosHTML::makeOption(0, '-'); $gb_scale = array_merge($gb_scale, $JLMS_DB->LoadObjectList()); $hidden_field = '<input type="hidden" name="gb_item[]" value="' . $box_name . '" />'; $list = mosHTML::SelectList($gb_scale, 'gbi_val[]', 'class="inputbox" size="1" style="width:75px"', 'value', 'text', $cur_pts); return $hidden_field . $list; }