$record=$DB->get_record_sql('SELECT max(order_axis) as order_max FROM {assignfeedback_editpp_axis} WHERE contextid = :contextid',array('contextid'=>$context));
$record=$DB->get_record_sql('SELECT max(order_tool) as order_max FROM {assignfeedback_editpp_tool} WHERE contextid = :contextid',array('axis'=>$axeNew->id,'contextid'=>$context));