/**
  * Save assignment
  */
 function save($a_eph)
 {
     global $ilDB;
     if ($this->getOrderNr() == 0) {
         $this->setOrderNr(ilEphAssignment::lookupMaxOrderNrForEp($this->getEphorusId()) + 10);
     }
     $next_id = $ilDB->nextId("rep_robj_xeph_assign");
     $ilDB->insert("rep_robj_xeph_assign", array("id" => array("integer", $next_id), "eph_id" => array("integer", $this->getEphorusId()), "deadline" => array("integer", $this->getDeadline()), "instruction" => array("clob", $this->getInstruction()), "title" => array("text", $this->getTitle()), "start_time" => array("integer", $this->getStartTime()), "mandatory" => array("integer", $this->getMandatory()), "order_nr" => array("integer", $this->getOrderNr())));
     $this->setId($next_id);
     $a_eph->updateAllUsersStatus();
     ilEphAssignment::createNewAssignmentRecords($next_id, $a_eph);
 }