public function actionSave()
 {
     $object = new CWorkPlanProjectTheme();
     $object->setAttributes(CRequest::getArray($object::getClassName()));
     if ($object->validate()) {
         $object->save();
         if ($this->continueEdit()) {
             $this->redirect("workplanprojectthemes.php?action=edit&id=" . $object->getId());
         } else {
             $this->redirect("workplanprojectthemes.php?action=index&plan_id=" . $object->plan_id);
         }
         return true;
     }
     $this->setData("object", $object);
     $this->renderView("_corriculum/_workplan/projectThemes/edit.tpl");
 }
 public function actionSaveGroup()
 {
     $group = new CWorkPlanProjectThemeGroupAdd();
     $group->setAttributes(CRequest::getArray($group::getClassName()));
     $texts = explode(chr(13), $group->project_title);
     foreach ($texts as $text) {
         $q = new CWorkPlanProjectTheme();
         $q->plan_id = $group->plan_id;
         $q->type = $group->type;
         $q->project_title = trim($text);
         $q->save();
     }
     $this->redirect("workplanprojectthemes.php?action=index&plan_id=" . $q->plan_id . "&type=" . $q->type);
 }