Format code, remove var_dumps, update docs

1.10.x
Julio Montoya 10 years ago
parent f28384fbac
commit 9e234ee1aa
  1. 1
      main/admin/index.php
  2. 18
      main/admin/skills_profile.php
  3. 4
      main/document/download_scorm.php
  4. 85
      main/exercice/addlimits.php
  5. 8
      main/inc/ajax/timeline.ajax.php
  6. 4
      main/inc/lib/social.lib.php

@ -481,7 +481,6 @@ if (api_is_platform_admin()) {
if (!empty($extraData['block'])) {
if (!is_dir($adminExtraContentDir)) {
var_dump($adminExtraContentDir);
mkdir(
$adminExtraContentDir,
api_get_permissions_for_new_directories(),

@ -15,7 +15,10 @@ if (api_get_setting('allow_skills_tool') != 'true') {
api_not_allowed();
}
$interbreadcrumb[] = array('url' => 'index.php',"name" => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array(
'url' => 'index.php',
"name" => get_lang('PlatformAdmin'),
);
$skill = new Skill();
$skill_profile = new SkillProfile();
@ -70,14 +73,16 @@ if (!empty($users)) {
$my_user_skills = $skill_rel_user->get_user_skills($user['user_id']);
$user_skills = array();
$found_counts = 0 ;
foreach($my_user_skills as $my_skill) {
foreach ($my_user_skills as $my_skill) {
$found = false;
if (in_array($my_skill['skill_id'], $skills)) {
$found = true;
$found_counts++;
}
$user_skills[] = array('skill_id' => $my_skill['skill_id'], 'found' => $found);
$user_skills[] = array(
'skill_id' => $my_skill['skill_id'],
'found' => $found,
);
$total_skills_to_search[$my_skill['skill_id']] = $my_skill['skill_id'];
}
$user_list[$user['user_id']]['skills'] = $user_skills;
@ -140,14 +145,9 @@ foreach ($total_skills_to_search as $skill_info) {
$tpl->assign('skill_list', $skill_list);
$tpl->assign('search_skill_list', $skills);
$form_to_html = $form->return_form();
//var_dump($total_skills_to_search);
$tpl->assign('form', $form_to_html);
$tpl->assign('url', $url);
$content = $tpl->fetch('default/skill/profile.tpl');
$tpl->assign('content', $content);
$tpl->display_one_col_template();

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This file is responsible for passing requested documents to the browser.
* This file is responsible for passing requested documents to the browser.
*
* @package chamilo.document
*/
@ -45,8 +45,6 @@ if (strpos($doc_url,'../') OR strpos($doc_url,'/..')) {
$sys_course_path = api_get_path(SYS_COURSE_PATH).$_course['path'].'/scorm';
//var_dump($sys_course_path);
if (is_dir($sys_course_path.$doc_url)) {
api_not_allowed();
}

@ -1,68 +1,53 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Adding limits
* @package chamilo.exercise
* @author
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
/**
* including the global file
* Adding limits
* @package chamilo.exercise
* @deprecated ?
*/
require_once '../inc/global.inc.php';
/* section (for the tabs) */
$this_section=SECTION_COURSES;
$this_section = SECTION_COURSES;
api_protect_course_script();
$dsp_percent = false;
$debug=0;
if($debug>0) {
echo str_repeat('&nbsp;',0).'Entered exercise_result.php'."<br />\n";var_dump($_POST);
$debug = 0;
if ($debug > 0) {
echo str_repeat('&nbsp;', 0).'Entered exercise_result.php'."<br />\n";
}
// general parameters passed via POST/GET
if ( empty ( $origin ) )
{
if (empty ($origin)) {
$origin = $_REQUEST['origin'];
}
if ( empty ( $learnpath_id ) )
{
$learnpath_id = $_REQUEST['learnpath_id'];
if (empty ($learnpath_id)) {
$learnpath_id = $_REQUEST['learnpath_id'];
}
if ( empty ( $learnpath_item_id ) )
{
$learnpath_item_id = $_REQUEST['learnpath_item_id'];
if (empty ($learnpath_item_id)) {
$learnpath_item_id = $_REQUEST['learnpath_item_id'];
}
if ( empty ( $formSent ) )
{
$formSent= $_REQUEST['formSent'];
if (empty ($formSent)) {
$formSent = $_REQUEST['formSent'];
}
if ( empty ( $exerciseResult ) )
{
if (empty ($exerciseResult)) {
$exerciseResult = $_SESSION['exerciseResult'];
}
if ( empty ( $questionId ) )
{
if (empty ($questionId)) {
$questionId = $_REQUEST['questionId'];
}
if ( empty ( $choice ) ) {
if (empty ($choice)) {
$choice = $_REQUEST['choice'];
}
if ( empty ( $questionNum ) )
{
$questionNum = $_REQUEST['questionNum'];
if (empty ($questionNum)) {
$questionNum = $_REQUEST['questionNum'];
}
if ( empty ( $nbrQuestions ) )
{
$nbrQuestions = $_REQUEST['nbrQuestions'];
if (empty ($nbrQuestions)) {
$nbrQuestions = $_REQUEST['nbrQuestions'];
}
if ( empty ( $questionList ) )
{
if (empty ($questionList)) {
$questionList = $_SESSION['questionList'];
}
if ( empty ( $objExercise ) )
{
if (empty ($objExercise)) {
$objExercise = $_SESSION['objExercise'];
}
$exercise_id = intval($_GET['exercise_id']);
@ -79,7 +64,10 @@ if (!empty($gradebook) && $gradebook=='view') {
);
}
$nameTools=get_lang('Exercises');
$interbreadcrumb[]=array("url" => "exercise.php","name" => get_lang('Exercises'));
$interbreadcrumb[] = array(
"url" => "exercise.php",
"name" => get_lang('Exercises'),
);
Display::display_header($nameTools,"Exercises");
if (isset($_POST['ok'])) {
@ -87,16 +75,14 @@ if (isset($_POST['ok'])) {
Display::display_normal_message($message);
}
?>
<script type="text/javascript">
function selectlimited()
{
document.getElementById('limited').checked="checked";
}
function selectattempts()
{
document.getElementById('attemptlimited').checked="checked";
}
</script>
<script type="text/javascript">
function selectlimited() {
document.getElementById('limited').checked="checked";
}
function selectattempts() {
document.getElementById('attemptlimited').checked="checked";
}
</script>
<h3><?php echo get_lang('AddLimits'); ?></h3>
<br>
<form action="addlimits.php" name="frmlimit" method="post">
@ -172,4 +158,3 @@ if (isset($_POST['ok'])) {
Database::query($query);
}
}
?>

@ -8,12 +8,8 @@ $timeline = new Timeline();
$action = $_GET['a'];
switch ($action) {
case 'get_timeline_content':
case 'get_timeline_content':
$items = $timeline->get_timeline_content($_GET['id']);
echo json_encode($items);
/*echo '<pre>';
echo json_encode($items);
echo '</pre>';
var_dump($items);*/
break;
break;
}

@ -1019,7 +1019,6 @@ class SocialManager extends UserManager
}
$column_size = '12';
$add_row = false;
//var_dump(api_set_anonymous());
if (api_is_anonymous()) {
$add_row = true;
}
@ -1058,10 +1057,8 @@ class SocialManager extends UserManager
} else {
$url = '?id='.$uid.$course_url;
}
} else {
$url = null;
}
$name = '<a href="'.$url.'">'.$firstname.'<br>'.$lastname.'</a>';
@ -1088,6 +1085,7 @@ class SocialManager extends UserManager
if ($wrap && $add_row) {
$html .= '</div>';
}
return $html;
}

Loading…
Cancel
Save