Minor - format code.

pull/2487/head
jmontoyaa 8 years ago
parent 0d172d0d83
commit c60f63f049
  1. 27
      main/lp/blank.php
  2. 11
      main/mySpace/myStudents.php
  3. 16
      main/session/add_students_to_session.php
  4. 24
      main/session/add_teachers_to_session.php

@ -21,24 +21,39 @@ $message = '';
if (isset($_GET['error'])) {
switch ($_GET['error']) {
case 'document_deleted':
$message = Display::return_message(get_lang('DocumentHasBeenDeleted'), 'error');
$message = Display::return_message(
get_lang('DocumentHasBeenDeleted'),
'error'
);
break;
case 'prerequisites':
$message = Display::return_message(get_lang('LearnpathPrereqNotCompleted'), 'warning');
$message = Display::return_message(
get_lang('LearnpathPrereqNotCompleted'),
'warning'
);
break;
case 'document_not_found':
$message = Display::return_message(get_lang('FileNotFound'), 'warning');
$message = Display::return_message(
get_lang('FileNotFound'),
'warning'
);
break;
case 'reached_one_attempt':
$message = Display::return_message(get_lang('ReachedOneAttempt'), 'warning');
$message = Display::return_message(
get_lang('ReachedOneAttempt'),
'warning'
);
break;
case 'x_frames_options':
$src = Session::read('x_frame_source');
if (!empty($src)) {
$icon = '<em class="icon-play-sign icon-2x" aria-hidden="true"></em>';
$message = Display::return_message(
Display::url($icon.$src, $src, ['class' => 'btn generated', 'target' => '_blank']),
Display::url(
$icon.$src,
$src,
['class' => 'btn generated', 'target' => '_blank']
),
'normal',
false
);

@ -588,7 +588,8 @@ $userGroups = $userGroupManager->getNameListByUser(
if (!empty($course_code)) {
?>
<tr>
<td colspan="2"><?php
<td colspan="2">
<?php
echo Display::url(
get_lang('SeeAccesses'),
'access_details.php?'.http_build_query([
@ -599,7 +600,8 @@ $userGroups = $userGroupManager->getNameListByUser(
'id_session' => $sessionId
])
);
?></td>
?>
</td>
</tr>
<?php
}
@ -689,7 +691,10 @@ $userGroups = $userGroupManager->getNameListByUser(
$isBoss = UserManager::userIsBossOfStudent(api_get_user_id(), $student_id);
if ($isBoss || api_is_platform_admin()) {
$extraFieldValue = new ExtraFieldValue('user');
$value = $extraFieldValue->get_values_by_handler_and_field_variable($student_id, 'legal_accept');
$value = $extraFieldValue->get_values_by_handler_and_field_variable(
$student_id,
'legal_accept'
);
$icon = Display::return_icon('accept_na.png');
if (isset($value['value'])) {
list($legalId, $legalLanguageId, $legalTime) = explode(':', $value['value']);

@ -1,5 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
@ -13,7 +14,10 @@ require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_PLATFORM_ADMIN;
// setting breadcrumbs
$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList'));
$interbreadcrumb[] = array(
'url' => 'session_list.php',
'name' => get_lang('SessionList')
);
// Setting the name of the tool
$tool_name = get_lang('SubscribeStudentsToSession');
@ -24,17 +28,19 @@ if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') {
$form_sent = 0;
$errorMsg = '';
$users = $sessions = array();
$id = isset($_GET['id']) ? intval($_GET['id']) : null;
$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
SessionManager::protectSession($id);
$htmlResult = null;
$htmlResult = '';
if (isset($_POST['form_sent']) && $_POST['form_sent']) {
$form_sent = $_POST['form_sent'];
if ($form_sent == 1) {
$sessionSourceList = $_POST['sessions'];
$sessionDestinationList = $_POST['sessions_destination'];
$result = SessionManager::copyStudentsFromSession($sessionSourceList, $sessionDestinationList);
$result = SessionManager::copyStudentsFromSession(
$sessionSourceList,
$sessionDestinationList
);
foreach ($result as $message) {
$htmlResult .= $message;
}

@ -1,5 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
@ -9,12 +10,14 @@ $cidReset = true;
// including some necessary files
require_once __DIR__.'/../inc/global.inc.php';
// setting the section (for the tabs)
// Setting the section (for the tabs)
$this_section = SECTION_PLATFORM_ADMIN;
// setting breadcrumbs
//$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList'));
// Setting breadcrumbs
$interbreadcrumb[] = array(
'url' => 'session_list.php',
'name' => get_lang('SessionList')
);
// Setting the name of the tool
$tool_name = get_lang('EnrollTrainersFromExistingSessions');
@ -25,16 +28,19 @@ $id = intval($_GET['id']);
SessionManager::protectSession($id);
$htmlResult = null;
$htmlResult = '';
if (isset($_POST['form_sent']) && $_POST['form_sent']) {
$form_sent = $_POST['form_sent'];
if ($form_sent == 1 && isset($_POST['sessions']) && isset($_POST['courses'])) {
if ($form_sent == 1 &&
isset($_POST['sessions']) && isset($_POST['courses'])
) {
$sessions = $_POST['sessions'];
$courses = $_POST['courses'];
$htmlResult = SessionManager::copyCoachesFromSessionToCourse($sessions, $courses);
$htmlResult = SessionManager::copyCoachesFromSessionToCourse(
$sessions,
$courses
);
}
}

Loading…
Cancel
Save