public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanProjectTheme(CRequest::getInt("id"));
     $plan = $object->plan_id;
     $object->remove();
     $this->redirect("workplanprojectthemes.php?action=index&plan_id=" . $plan);
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanCriteriaOfEvaluation(CRequest::getInt("id"));
     $plan = $object->plan;
     $type = $object->type;
     $object->remove();
     $order = 1;
     if ($object->type == 1) {
         foreach ($plan->criteriaExamOfEvaluation as $criteriaExamOfEvaluation) {
             $criteriaExamOfEvaluation->ordering = $order++;
             $criteriaExamOfEvaluation->save();
         }
     } elseif ($object->type == 2) {
         foreach ($plan->criteriaCreditOfEvaluation as $criteriaCreditOfEvaluation) {
             $criteriaCreditOfEvaluation->ordering = $order++;
             $criteriaCreditOfEvaluation->save();
         }
     } elseif ($object->type == 3) {
         foreach ($plan->criteriaMaterialsOfEvaluation as $criteriaMaterialsOfEvaluation) {
             $criteriaMaterialsOfEvaluation->ordering = $order++;
             $criteriaMaterialsOfEvaluation->save();
         }
     }
     $this->redirect("workplancriteriaofevaluation.php?action=index&plan_id=" . $plan->getId() . "&type=" . $type);
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanTask(CRequest::getInt("id"));
     $goal = $object->goal_id;
     $object->remove();
     $this->redirect("workplangoals.php?action=edit&id=" . $goal);
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanCompetention(CRequest::getInt("id"));
     $plan = $object->plan_id;
     $object->remove();
     $this->redirect("workplancompetentions.php?action=index&plan_id=" . $plan);
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanSelfEducationBlock(CRequest::getInt("id"));
     $load = $object->load_id;
     $object->remove();
     $this->redirect("workplancontentloads.php?action=edit&id=" . $load);
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanGoal(CRequest::getInt("id"));
     $plan = $object->plan_id;
     $object->remove();
     $this->redirect("workplans.php?action=edit&id=" . $plan);
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanContentSectionLoad(CRequest::getInt("id"));
     $section = $object->section_id;
     $object->remove();
     $this->redirect("workplancontentloads.php?action=index&section_id=" . $section);
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanLiterature(CRequest::getInt("id"));
     $plan = $object->plan;
     $type = $object->type;
     $object->remove();
     $order = 1;
     if ($object->type == 1) {
         foreach ($plan->baseLiterature as $baseLiterature) {
             $baseLiterature->ordering = $order++;
             $baseLiterature->save();
         }
     } elseif ($object->type == 2) {
         foreach ($plan->additionalLiterature as $additionalLiterature) {
             $additionalLiterature->ordering = $order++;
             $additionalLiterature->save();
         }
     } elseif ($object->type == 3) {
         foreach ($plan->internetResources as $internetResources) {
             $internetResources->ordering = $order++;
             $internetResources->save();
         }
     }
     $this->redirect("workplanliterature.php?action=index&plan_id=" . $plan->getId() . "&type=" . $type);
 }
 public function execute($contextObject)
 {
     $result = 0;
     if (!is_null($contextObject->terms)) {
         $terms = array();
         foreach ($contextObject->terms->getItems() as $term) {
             $terms[] = $term->number;
         }
     }
     $termSectionsData = new CArrayList();
     foreach ($contextObject->terms->getItems() as $term) {
         $query = new CQuery();
         $query->select("sum(if(term.alias = 'lecture', l.value, 0)) as lecture")->from(TABLE_WORK_PLAN_CONTENT_SECTIONS . " as section")->innerJoin(TABLE_WORK_PLAN_CONTENT_LOADS . " as l", "l.section_id = section.id")->innerJoin(TABLE_TAXONOMY_TERMS . " as term", "term.id = l.load_type_id")->leftJoin(TABLE_WORK_PLAN_SELFEDUCATION . " as selfedu", "selfedu.load_id = l.id")->group("l.section_id")->condition("l.term_id = " . $term->getId());
         $items = $query->execute();
         if ($items->getCount() > 0) {
             $termSectionsData->add($term->getId(), $items);
         }
     }
     foreach ($termSectionsData->getItems() as $termId => $termData) {
         if (CBaseManager::getWorkPlanTerm($termId)->number == $terms[0]) {
             $result = 0;
             foreach ($termData as $row) {
                 $result += $row["lecture"];
             }
         }
     }
     return $result;
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanContentSectionLoadTechnology(CRequest::getInt("id"));
     $load = $object->load_id;
     $object->remove();
     $this->redirect("workplancontentloads.php?action=edit&id=" . $load);
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanContentSection(CRequest::getInt("id"));
     $module = $object->module_id;
     $object->remove();
     $this->redirect("workplancontentmodules.php?action=edit&id=" . $module);
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanAdditionalSupply(CRequest::getInt("id"));
     $plan = $object->plan_id;
     $object->remove();
     $this->redirect("workplansupplies.php?action=index&plan_id=" . $plan);
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanContentSection(CRequest::getInt("id"));
     $category = $object->category_id;
     $object->remove();
     $this->redirect("workplancontentcategories.php?action=edit&id=" . $category);
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanLiterature(CRequest::getInt("id"));
     $plan = $object->plan_id;
     $type = $object->type;
     $object->remove();
     $this->redirect("workplanliterature.php?action=index&plan_id=" . $plan . "&type=" . $type);
 }
Ejemplo n.º 15
0
 public function initialize(IConfigParameter $configuration)
 {
     $this->inited = true;
     $this->_initialized = true;
     session_set_save_handler(array($this, 'open'), array($this, 'close'), array($this, 'read'), array($this, 'write'), array($this, 'destroy'), array($this, 'gc'));
     session_name("SSID");
     session_start();
     parent::init();
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanMarkType(CRequest::getInt("id"));
     $plan = $object->plan;
     $object->remove();
     $order = 1;
     foreach ($plan->markTypes as $markType) {
         $markType->ordering = $order++;
         $markType->save();
     }
     $this->redirect("workplanmarktypes.php?action=index&plan_id=" . $plan->getId());
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanSoftware(CRequest::getInt("id"));
     $plan = $object->plan;
     $object->remove();
     $order = 1;
     foreach ($plan->software as $soft) {
         $soft->ordering = $order++;
         $soft->save();
     }
     $this->redirect("workplansoftware.php?action=index&plan_id=" . $plan->getId());
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanAdditionalSupply(CRequest::getInt("id"));
     $plan = $object->plan;
     $object->remove();
     $order = 1;
     foreach ($plan->additionalSupply as $add) {
         $add->ordering = $order++;
         $add->save();
     }
     $this->redirect("workplansupplies.php?action=index&plan_id=" . $plan->getId());
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanMarkStudyActivity(CRequest::getInt("id"));
     $activity = $object->activity;
     $object->remove();
     $order = 1;
     foreach ($activity->marks as $mark) {
         $mark->ordering = $order++;
         $mark->save();
     }
     $this->redirect("workplanmarksstudyactivity.php?action=index&id=" . $activity->getId());
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanGoal(CRequest::getInt("id"));
     $plan = $object->plan;
     $object->remove();
     $order = 1;
     foreach ($plan->goals as $goal) {
         $goal->ordering = $order++;
         $goal->save();
     }
     $this->redirect("workplans.php?action=edit&id=" . $plan->getId());
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanEvaluationMaterial(CRequest::getInt("id"));
     $plan = $object->plan;
     $object->remove();
     $order = 1;
     foreach ($plan->materialsOfEvaluation as $materialsOfEvaluation) {
         $materialsOfEvaluation->ordering = $order++;
         $materialsOfEvaluation->save();
     }
     $this->redirect("workplanevaluationmaterials.php?action=index&plan_id=" . $plan->getId());
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanControlTypes(CRequest::getInt("id"));
     $section = $object->section;
     $object->remove();
     $order = 1;
     foreach ($section->controlTypes as $controlType) {
         $controlType->ordering = $order++;
         $controlType->save();
     }
     $this->redirect("workplantypescontrol.php?action=index&id=" . $section->getId());
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanFinalControl(CRequest::getInt("id"));
     $plan = $object->plan;
     $object->remove();
     $order = 1;
     foreach ($plan->finalControls as $finalControl) {
         $finalControl->ordering = $order++;
         $finalControl->save();
     }
     $this->redirect("workplanfinalcontrol.php?action=index&plan_id=" . $plan->getId());
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanTerm(CRequest::getInt("id"));
     $plan = $object->plan;
     $object->remove();
     $order = 1;
     foreach ($plan->terms as $term) {
         $term->ordering = $order++;
         $term->save();
     }
     $this->redirect("workplanterms.php?action=index&plan_id=" . $plan->getId());
 }
 /**
  * Автоподстановка индексов
  */
 public function actionGetIndexes()
 {
     $indexes = $_GET["data"]["term"];
     $res = array();
     $tmpRes = new CArrayList();
     foreach (CActiveRecordProvider::getWithCondition(TABLE_PUBLICATIONS_TYPES, "name LIKE '%{$indexes}%'")->getItems() as $item) {
         $index = CBaseManager::getPublicationByTypes($item->getItemValue("id"));
         if (!is_null($index)) {
             $tmpRes->add($index->name, $index);
         }
     }
     foreach ($tmpRes->getItems() as $index) {
         $res[] = array("label" => $index->name, "value" => $index->name);
     }
     echo json_encode($res);
 }
 public function execute($contextObject)
 {
     $result = array();
     if (!is_null($contextObject->terms)) {
         $terms = array();
         foreach ($contextObject->terms->getItems() as $term) {
             $terms[] = $term->number;
         }
     }
     $termSectionsData = new CArrayList();
     foreach ($contextObject->terms->getItems() as $term) {
         $query = new CQuery();
         $select = array();
         $select[] = "section.sectionIndex";
         $select[] = "section.name";
         $select[] = "sum(if(term.alias in ('lecture', 'practice', 'labwork'), l.value, 0)) + sum(ifnull(selfedu.question_hours, 0)) as total";
         $select[] = "sum(if(term.alias = 'lecture', l.value, 0)) as lecture";
         $select[] = "sum(if(term.alias = 'practice', l.value, 0)) as practice";
         $select[] = "sum(if(term.alias = 'labwork', l.value, 0)) as labwork";
         $select[] = "sum(ifnull(selfedu.question_hours, 0)) as selfedu";
         $query->select(join(", ", $select))->from(TABLE_WORK_PLAN_CONTENT_SECTIONS . " as section")->innerJoin(TABLE_WORK_PLAN_CONTENT_LOADS . " as l", "l.section_id = section.id")->innerJoin(TABLE_TAXONOMY_TERMS . " as term", "term.id = l.load_type_id")->leftJoin(TABLE_WORK_PLAN_SELFEDUCATION . " as selfedu", "selfedu.load_id = l.id")->group("l.section_id")->condition("l.term_id = " . $term->getId());
         $items = $query->execute();
         if ($items->getCount() > 0) {
             $termSectionsData->add($term->getId(), $items);
         }
     }
     foreach ($termSectionsData->getItems() as $termId => $termData) {
         if (CBaseManager::getWorkPlanTerm($termId)->number == $terms[1]) {
             foreach ($termData as $row) {
                 $dataRow = array();
                 $dataRow[0] = $row["sectionIndex"];
                 $dataRow[1] = $row["name"];
                 $dataRow[2] = $row["total"];
                 $dataRow[3] = $row["lecture"];
                 $dataRow[4] = $row["practice"];
                 $dataRow[5] = $row["labwork"];
                 $dataRow[6] = $row["selfedu"];
                 $result[] = $dataRow;
             }
         }
     }
     return $result;
 }
 public function actionGetObject($id)
 {
     return CBaseManager::getWorkPlanTerm($id);
 }
 public function actionGetObject($id)
 {
     return CBaseManager::getCorriculumDiscipline($id);
 }
 function render()
 {
     /* @var $section CWorkPlanContentSection */
     $section = CBaseManager::getWorkPlanContentSection(CRequest::getInt("id"));
     $this->addActionsMenuItem(array("title" => "Обновить", "link" => "workplancontentloads.php?id=" . $section->getId() . '&bean=' . $this->getStatefullFormBean()->getBeanId(), "icon" => "actions/view-refresh.png"));
     $this->setData("bean", $this->getStatefullFormBean());
     $this->setData("section", $section);
     $this->renderView("_corriculum/_workplan/contentLoads/index.tpl");
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanFundMarkType(CRequest::getInt("id"));
     $section = $object->section;
     $object->remove();
     $order = 1;
     foreach ($section->fundMarkTypes as $fundMarkType) {
         $fundMarkType->ordering = $order++;
         $fundMarkType->save();
     }
     $this->redirect("workplanfundmarktypes.php?action=index&id=" . $section->getId());
 }