function hotpot_update_instance(&$hotpot) { if (hotpot_set_form_values($hotpot)) { $hotpot->id = $hotpot->instance; if ($result = update_record('hotpot', $hotpot)) { hotpot_update_events($hotpot); } } else { $result = false; } return $result; }
function hotpot_update_instance(&$hotpot) { if (hotpot_set_form_values($hotpot)) { $hotpot->id = $hotpot->instance; if ($result = update_record('hotpot', $hotpot)) { hotpot_update_events($hotpot); //hotpot_grade_item_update(stripslashes_recursive($hotpot)); hotpot_update_grades(stripslashes_recursive($hotpot)); } } else { $result = false; } return $result; }
/** * @global object * @param object $hotpot * @return bool */ function hotpot_update_instance($hotpot) { global $DB; if (hotpot_set_form_values($hotpot)) { $hotpot->id = $hotpot->instance; if ($result = $DB->update_record('hotpot', $hotpot)) { hotpot_update_events($hotpot); hotpot_update_grades($hotpot); } } else { $result = false; } return $result; }