Minor - format code

pull/3291/head
Julio Montoya 6 years ago
parent f5a86a0395
commit 8fa4e1bf9a
  1. 15
      main/gradebook/gradebook_display_certificate.php
  2. 3
      main/gradebook/lib/be/category.class.php
  3. 3
      main/lp/lp_edit_item_prereq.php

@ -1,11 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Script.
*
* @package chamilo.gradebook
*/
require_once __DIR__.'/../inc/global.inc.php';
$current_course_tool = TOOL_GRADEBOOK;
@ -58,7 +54,7 @@ if ($filter === 'true') {
if ($form->validate()) {
$officialCode = $form->getSubmitValue('filter');
if ($officialCode == 'all') {
if ($officialCode === 'all') {
$certificate_list = GradebookUtils::get_list_users_certificates($categoryId);
} else {
$userList = UserManager::getUsersByOfficialCode($officialCode);
@ -77,10 +73,8 @@ if ($filter === 'true') {
}
$content = '';
$courseCode = api_get_course_id();
$allowExportToZip = api_get_plugin_setting('customcertificate', 'enable_plugin_customcertificate') == 'true' &&
$allowExportToZip = api_get_plugin_setting('customcertificate', 'enable_plugin_customcertificate') === 'true' &&
api_get_course_setting('customcertificate_course_enable', $courseInfo) == 1;
$tags = Certificate::notificationTags();
@ -189,7 +183,7 @@ $interbreadcrumb[] = ['url' => '#', 'name' => get_lang('GradebookListOfStudentsC
$this_section = SECTION_COURSES;
Display::display_header('');
if (isset($_GET['action']) && $_GET['action'] == 'delete') {
if ($action === 'delete') {
$check = Security::check_token('get');
if ($check) {
$certificate = new Certificate($_GET['certificate_id']);
@ -293,7 +287,6 @@ if (count($certificate_list) > 0 && $hideCertificateExport !== 'true') {
}
echo Display::toolbarAction('actions', [$actions]);
echo $filterForm;
if (count($certificate_list) == 0) {

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\GradebookCategory;
@ -2275,7 +2276,7 @@ class Category implements GradebookItem
$params['right'] = 0;
$params['top'] = 0;
$params['bottom'] = 0;
$page_format = $params['orientation'] == 'landscape' ? 'A4-L' : 'A4';
$page_format = $params['orientation'] === 'landscape' ? 'A4-L' : 'A4';
$pdf = new PDF($page_format, $params['orientation'], $params);
$certificate_list = GradebookUtils::get_list_users_certificates($catId, $userList);

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
@ -10,8 +11,6 @@ use ChamiloSession as Session;
* @author Denes Nagy
* @author Roan Embrechts, refactoring and code cleaning
* @author Yannick Warnier <ywarnier@beeznest.org> - cleaning and update for new SCORM tool
*
* @package chamilo.learnpath
*/
$this_section = SECTION_COURSES;

Loading…
Cancel
Save