Minor - formatting code.

1.9.x
Julio Montoya 12 years ago
parent 2fcd765bf7
commit 20525ccc80
  1. 13
      main/course_description/add.php
  2. 1
      main/inc/lib/internationalization.lib.php
  3. 6
      main/newscorm/learnpath.class.php
  4. 2
      main/user/user.php

@ -2,16 +2,13 @@
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
/** /**
* View (MVC patter) for adding a course description * View (MVC patter) for adding a course description
* @author Christian Fasanando <christian1827@gmail.com> * @author Christian Fasanando <christian1827@gmail.com>
* @package chamilo.course_description * @package chamilo.course_description
*/ */
// protect a course script // protect a course script
api_protect_course_script(true); api_protect_course_script(true);
//var_dump($_SESSION['studentview']);
// display categories // display categories
$categories = array (); $categories = array ();
foreach ($default_description_titles as $id => $title) { foreach ($default_description_titles as $id => $title) {
@ -35,8 +32,8 @@ foreach ($categories as $id => $title) {
echo '</div>'; echo '</div>';
// error messages // error messages
if (isset($error) && intval($error) == 1) { if (isset($error) && intval($error) == 1) {
Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false); Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false);
} }
// default header title form // default header title form
@ -64,7 +61,7 @@ if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
} }
$form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"'); $form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"');
// display default questions // display default questions
if (isset ($question[$description_type])) { if (isset ($question[$description_type])) {
$message = '<strong>'.get_lang('QuestionPlan').'</strong><br />'; $message = '<strong>'.get_lang('QuestionPlan').'</strong><br />';
$message .= $question[$description_type]; $message .= $question[$description_type];
@ -76,4 +73,4 @@ if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
$form->display(); $form->display();
if (api_get_setting('wcag_anysurfer_public_pages')=='true') { if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
echo (WCAG_Rendering::editor_footer()); echo (WCAG_Rendering::editor_footer());
} }

@ -1116,7 +1116,6 @@ function api_is_western_name_order($format = null, $language = null) {
$language = api_get_interface_language(false, true); $language = api_get_interface_language(false, true);
} }
if (!isset($order[$format][$language])) { if (!isset($order[$format][$language])) {
$test_name = api_get_person_name('%f', '%l', '%t', $format, $language); $test_name = api_get_person_name('%f', '%l', '%t', $format, $language);
$order[$format][$language] = stripos($test_name, '%f') <= stripos($test_name, '%l'); $order[$format][$language] = stripos($test_name, '%f') <= stripos($test_name, '%l');
} }

@ -3125,7 +3125,11 @@ class learnpath
$lp_item_id = Database::escape_string($lp_item_id); $lp_item_id = Database::escape_string($lp_item_id);
$lp_view_id = Database::escape_string($lp_view_id); $lp_view_id = Database::escape_string($lp_view_id);
$sql = "SELECT count(*) FROM $lp_item_view_table $sql = "SELECT count(*) FROM $lp_item_view_table
WHERE c_id = $course_id AND lp_item_id='" . (int) $lp_item_id . "' AND lp_view_id ='" . (int) $lp_view_id . "' AND status='completed'"; WHERE
c_id = $course_id AND
lp_item_id='" . (int) $lp_item_id . "' AND
lp_view_id ='" . (int) $lp_view_id . "' AND
status='completed'";
$result = Database::query($sql); $result = Database::query($sql);
$row_count = Database :: fetch_row($result); $row_count = Database :: fetch_row($result);
$count_item_view = (int) $row_count[0]; $count_item_view = (int) $row_count[0];

@ -776,4 +776,4 @@ if (api_get_setting('allow_user_headings') == 'true' && $is_courseAdmin && api_i
} }
if ($origin != 'learnpath') { if ($origin != 'learnpath') {
Display::display_footer(); Display::display_footer();
} }

Loading…
Cancel
Save