diff --git a/main/admin/specific_fields_add.php b/main/admin/specific_fields_add.php
index da9c9d2e21..1af83ad663 100755
--- a/main/admin/specific_fields_add.php
+++ b/main/admin/specific_fields_add.php
@@ -1,5 +1,6 @@
'index.php', 'name' => get_lang('PlatformAdmin'));
-$interbreadcrumb[] = array('url' => 'settings.php?category=Search', 'name' => get_lang('PlatformConfigSettings'));
-$interbreadcrumb[] = array('url' => 'specific_fields.php', 'name' => get_lang('SpecificSearchFields'));
+$interbreadcrumb[] = array(
+ 'url' => 'index.php',
+ 'name' => get_lang('PlatformAdmin'),
+);
+$interbreadcrumb[] = array(
+ 'url' => 'settings.php?category=Search',
+ 'name' => get_lang('PlatformConfigSettings'),
+);
+$interbreadcrumb[] = array(
+ 'url' => 'specific_fields.php',
+ 'name' => get_lang('SpecificSearchFields'),
+);
$tool_name = get_lang('AddSpecificSearchField');
if (isset($_GET['action']) && $_GET['action'] === 'edit') {
- $tool_name = get_lang('EditSpecificSearchField');
+ $tool_name = get_lang('EditSpecificSearchField');
}
// Create the form
$form = new FormValidator('specific_fields_add');
diff --git a/main/auth/ldap/newUser.php b/main/auth/ldap/newUser.php
index 71c8a4983f..31e73b4d5a 100755
--- a/main/auth/ldap/newUser.php
+++ b/main/auth/ldap/newUser.php
@@ -1,37 +1,34 @@
deleteCategory();
} else {
@@ -524,6 +528,8 @@ abstract class Question
VALUES (".$courseId.", $question_id, $categoryId)";
Database::query($sql);
}
+
+ return true;
}
}
diff --git a/main/inc/ajax/skill.ajax.php b/main/inc/ajax/skill.ajax.php
index e9387314d1..b091b8be85 100755
--- a/main/inc/ajax/skill.ajax.php
+++ b/main/inc/ajax/skill.ajax.php
@@ -17,7 +17,6 @@ api_block_anonymous_users();
$skill = new Skill();
$gradebook = new Gradebook();
$skill_gradebook = new SkillRelGradebook();
-
$userId = api_get_user_id();
switch ($action) {
@@ -128,9 +127,7 @@ switch ($action) {
$skill_info = $skill->get_skill_info($id);
$courses = $skill->get_courses_by_skill($id);
$sessions = $skill->getSessionsBySkill($id);
-
$html = '';
-
if (!empty($courses) || !empty($sessions)) {
Display::display_no_header();
Display::$global_template->assign('skill', $skill_info);
@@ -175,7 +172,7 @@ switch ($action) {
echo json_encode($info);
break;
case 'load_children':
- $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : null;
+ $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : null;
$load_user_data = isset($_REQUEST['load_user_data']) ? $_REQUEST['load_user_data'] : null;
$skills = $skill->get_children($id, $load_user_data);
@@ -337,7 +334,6 @@ switch ($action) {
case 'delete_profile':
if (api_is_platform_admin() || api_is_drh()) {
$profileId = $_REQUEST['profile'];
-
$skillProfile = new SkillProfile();
$isDeleted = $skillProfile->delete($profileId);
diff --git a/main/reports/templates/exercicesMultiCourses.reports.php b/main/reports/templates/exercicesMultiCourses.reports.php
index a772b9209b..9fc3e0d414 100755
--- a/main/reports/templates/exercicesMultiCourses.reports.php
+++ b/main/reports/templates/exercicesMultiCourses.reports.php
@@ -1,70 +1,71 @@
'Result of each test per student',
- 'getSQL' => 'reports_template_exercicesMultiCourses_getSQL',
- 'wizard' =>
+ 'description' => 'Result of each test per student',
+ 'getSQL' => 'reports_template_exercicesMultiCourses_getSQL',
+ 'wizard' =>
'
- Result of each test per student
+ Result of each test per student
-
');
-function reports_template_exercicesMultiCourses_getSQL() {
- // foreach quiz
- $result = array();
- $columns = Database::query('select r.id as kid, c.title as course, '.
- 'r.child_name as test from '.
- Database::get_main_table(TABLE_MAIN_REPORTS_KEYS).' r, '.
- Database::get_main_table(TABLE_MAIN_COURSE).' c '.
- 'where r.course_id=c.id and r.tool_id='.
- reports_getToolId(TOOL_QUIZ).
- ' order by r.course_id, r.child_name');
- if (Database::num_rows($columns) == 0)
- die(''.get_lang('no data found').'');
- $query = 'select u.lastname Name, u.firstname Firstname';
- $columns = Database::store_result($columns);
- if ($_REQUEST['tattempt'] == 'min' || $_REQUEST['tattempt'] == 'max')
- $function = $_REQUEST['tattempt'];
- else
- $function = 'avg';
- foreach ($columns as $key => $column)
- $query .= ', '.$function.'(k'.$key.'.score) as `'.
- $column['course'].' - '.
- $column['test'].'` ';
- $query .= ' from '.Database::get_main_table(TABLE_MAIN_USER).' u ';
- foreach ($columns as $key => $column) // fixme sessions
- $query .= 'left outer join '.
- Database::get_main_table(TABLE_MAIN_REPORTS_VALUES).
- ' k'.$key.
- ' on k'.$key.'.key_id = '.$column['kid'].
- ' and k'.$key.'.user_id = u.user_id ';
- $query .= ' group by ';
- foreach ($columns as $key => $column) // grouping attempt
- $query .= 'k'.$key.'.attempt, ';
- $query = substr($query, 0, -2); // removing last ', ';
+function reports_template_exercicesMultiCourses_getSQL()
+{
+ // foreach quiz
+ $result = array();
+ $columns = Database::query('select r.id as kid, c.title as course, '.
+ 'r.child_name as test from '.
+ Database::get_main_table(TABLE_MAIN_REPORTS_KEYS).' r, '.
+ Database::get_main_table(TABLE_MAIN_COURSE).' c '.
+ 'where r.course_id=c.id and r.tool_id='.
+ reports_getToolId(TOOL_QUIZ).
+ ' order by r.course_id, r.child_name');
+ if (Database::num_rows($columns) == 0)
+ die(''.get_lang('no data found').'');
+ $query = 'select u.lastname Name, u.firstname Firstname';
+ $columns = Database::store_result($columns);
+ if ($_REQUEST['tattempt'] == 'min' || $_REQUEST['tattempt'] == 'max')
+ $function = $_REQUEST['tattempt'];
+ else
+ $function = 'avg';
+ foreach ($columns as $key => $column)
+ $query .= ', '.$function.'(k'.$key.'.score) as `'.
+ $column['course'].' - '.
+ $column['test'].'` ';
+ $query .= ' from '.Database::get_main_table(TABLE_MAIN_USER).' u ';
+ foreach ($columns as $key => $column) // fixme sessions
+ $query .= 'left outer join '.
+ Database::get_main_table(TABLE_MAIN_REPORTS_VALUES).
+ ' k'.$key.
+ ' on k'.$key.'.key_id = '.$column['kid'].
+ ' and k'.$key.'.user_id = u.user_id ';
+ $query .= ' group by ';
+ foreach ($columns as $key => $column) // grouping attempt
+ $query .= 'k'.$key.'.attempt, ';
+ $query = substr($query, 0, -2); // removing last ', ';
-
- return $query;
+ return $query;
}
diff --git a/main/session/add_students_to_session.php b/main/session/add_students_to_session.php
index 0a0b544a31..22188af7fe 100644
--- a/main/session/add_students_to_session.php
+++ b/main/session/add_students_to_session.php
@@ -24,9 +24,7 @@ if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') {
$form_sent = 0;
$errorMsg = '';
$users = $sessions = array();
-
$id = isset($_GET['id']) ? intval($_GET['id']) : null;
-
SessionManager::protectSession($id);
$htmlResult = null;
diff --git a/plugin/openmeetings/lib/openmeetings.class.php b/plugin/openmeetings/lib/openmeetings.class.php
index f41d37cec3..42448715c0 100755
--- a/plugin/openmeetings/lib/openmeetings.class.php
+++ b/plugin/openmeetings/lib/openmeetings.class.php
@@ -4,9 +4,7 @@
* to OpenMeetings from Chamilo by calling its web services
* @package chamilo.plugin.openmeetings
*/
-/**
- * Initialization
- */
+
namespace Chamilo\Plugin\OpenMeetings;
include_once __DIR__.'/session.class.php';
diff --git a/src/Chamilo/CoreBundle/Admin/UserGroupAdmin.php b/src/Chamilo/CoreBundle/Admin/UserGroupAdmin.php
index 924c549771..31d4117064 100644
--- a/src/Chamilo/CoreBundle/Admin/UserGroupAdmin.php
+++ b/src/Chamilo/CoreBundle/Admin/UserGroupAdmin.php
@@ -25,18 +25,22 @@ class UserGroupAdmin extends AbstractAdmin
$formMapper
->add('name')
->add('description', 'ckeditor')
- ->add('users', 'sonata_type_collection', array(
+ ->add(
+ 'users',
+ 'sonata_type_collection',
+ array(
'cascade_validation' => true,
- ), array(
- // 'allow_delete' => true,
+ ),
+ array(
+ // 'allow_delete' => true,
'by_reference' => false,
- 'edit' => 'inline',
- 'inline' => 'table',
+ 'edit' => 'inline',
+ 'inline' => 'table',
//'btn_add' => true,
//'multiple' => true
//'sortable' => 'position',
//'link_parameters' => array('content' => $users),
- 'admin_code' => 'sonata.admin.user_group_rel_user'
+ 'admin_code' => 'sonata.admin.user_group_rel_user',
)
)
;
diff --git a/src/Chamilo/CoreBundle/Entity/MessageAttachment.php b/src/Chamilo/CoreBundle/Entity/MessageAttachment.php
index 837ad4a150..ce2a454c8a 100644
--- a/src/Chamilo/CoreBundle/Entity/MessageAttachment.php
+++ b/src/Chamilo/CoreBundle/Entity/MessageAttachment.php
@@ -13,6 +13,15 @@ use Doctrine\ORM\Mapping as ORM;
*/
class MessageAttachment
{
+ /**
+ * @var integer
+ *
+ * @ORM\Column(name="id", type="integer")
+ * @ORM\Id
+ * @ORM\GeneratedValue(strategy="IDENTITY")
+ */
+ private $id;
+
/**
* @var string
*
@@ -48,17 +57,6 @@ class MessageAttachment
*/
private $filename;
- /**
- * @var integer
- *
- * @ORM\Column(name="id", type="integer")
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="IDENTITY")
- */
- private $id;
-
-
-
/**
* Set path
*
diff --git a/src/Chamilo/CoreBundle/Menu/NavBuilder.php b/src/Chamilo/CoreBundle/Menu/NavBuilder.php
index 3cbda53756..a1ee7469d2 100644
--- a/src/Chamilo/CoreBundle/Menu/NavBuilder.php
+++ b/src/Chamilo/CoreBundle/Menu/NavBuilder.php
@@ -66,7 +66,6 @@ class NavBuilder extends ContainerAware
);
if ($checker->isGranted('IS_AUTHENTICATED_FULLY')) {
-
$menu->addChild(
$translator->trans('My courses'),
array('route' => 'userportal')
@@ -103,7 +102,6 @@ class NavBuilder extends ContainerAware
);
if ($checker->isGranted('ROLE_ADMIN')) {
-
$menu->addChild(
$translator->trans('Dashboard'),
array(
@@ -136,7 +134,7 @@ class NavBuilder extends ContainerAware
);
/** @var Category $category */
foreach ($categories as $category) {
- $faq->addChild(
+ $faq->addChild(
$category->getHeadline(),
array(
'route' => 'faq',
@@ -227,7 +225,6 @@ class NavBuilder extends ContainerAware
//