Minor - format code

pull/2821/head
Julio 7 years ago
parent b9a622e660
commit a085fcd6dd
  1. 2
      main/survey/surveyUtil.class.php
  2. 50
      plugin/apaexportsurvey/ApaExportSurvey.php

@ -2936,7 +2936,7 @@ class SurveyUtil
}
/**
* Get the additional actions added in survey_additional_teacher_modify_actions configuration
* Get the additional actions added in survey_additional_teacher_modify_actions configuration.
*
* @param int $surveyId
* @param int $iconSize

@ -1,8 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CourseBundle\Entity\CTool;
/**
* Class ApaExportSurvey.
*/
@ -37,30 +35,6 @@ class ApaExportSurvey extends Plugin
{
}
/**
* Create tools for all courses.
*/
private function createLinkToCourseTools()
{
$result = Database::getManager()
->createQuery('SELECT c.id FROM ChamiloCoreBundle:Course c')
->getResult();
foreach ($result as $item) {
$this->createLinkToCourseTool($this->get_name().':teacher', $item['id'], 'survey.png');
}
}
/**
* Remove all course tools created by plugin.
*/
private function removeLinkToCourseTools()
{
Database::getManager()
->createQuery('DELETE FROM ChamiloCourseBundle:CTool t WHERE t.link LIKE :link AND t.category = :category')
->execute(['link' => 'apaexportsurvey/start.php%', 'category' => 'plugin']);
}
/**
* Uninstallation process.
*/
@ -93,4 +67,28 @@ class ApaExportSurvey extends Plugin
api_get_path(WEB_PLUGIN_PATH).'apaexportsurvey/export.php?survey='.$surveyId.'&'.api_get_cidreq()
);
}
/**
* Create tools for all courses.
*/
private function createLinkToCourseTools()
{
$result = Database::getManager()
->createQuery('SELECT c.id FROM ChamiloCoreBundle:Course c')
->getResult();
foreach ($result as $item) {
$this->createLinkToCourseTool($this->get_name().':teacher', $item['id'], 'survey.png');
}
}
/**
* Remove all course tools created by plugin.
*/
private function removeLinkToCourseTools()
{
Database::getManager()
->createQuery('DELETE FROM ChamiloCourseBundle:CTool t WHERE t.link LIKE :link AND t.category = :category')
->execute(['link' => 'apaexportsurvey/start.php%', 'category' => 'plugin']);
}
}

Loading…
Cancel
Save