Changing headers, cleaning code

skala
Julio Montoya 15 years ago
parent 878c7a806c
commit b22ca96ca8
  1. 4
      main/glossary/index.php
  2. 3
      main/group/group_category.php
  3. 13
      main/group/group_creation.php
  4. 18
      main/group/group_edit.php
  5. 6
      main/group/group_overview.php
  6. 13
      main/group/group_space.php
  7. 18
      main/user/user_add.php

@ -1,7 +1,7 @@
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
/* For licensing terms, see /license.txt */
/**
* @package dokeos.glossary
* @package chamilo.glossary
* @author Christian Fasanando, initial version
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium, refactoring and tighter integration in Dokeos
*/

@ -3,8 +3,7 @@
/**
* @package chamilo.group
*/
/* INIT SECTION */
/* INIT SECTION */
// name of the language file that needs to be included
$language_file = "group";

@ -3,8 +3,7 @@
/**
* @package chamilo.group
*/
/* INIT SECTION */
/* INIT SECTION */
// name of the language file that needs to be included
$language_file = "group";
@ -16,9 +15,7 @@ require_once (api_get_path(LIBRARY_PATH).'classmanager.lib.php');
require_once (api_get_path(LIBRARY_PATH).'course.lib.php');
require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
/*
--------------------------------------
Create the groups
--------------------------------------
*/
if (isset ($_POST['action']))
{
@ -258,9 +255,7 @@ EOT;
$form->addElement('style_submit_button', 'submit', get_lang('CreateGroup'), 'class="save"');
$form->display();
}
}
else
{
} else {
/*
* Show form to generate new groups
*/
@ -387,9 +382,7 @@ else
}
}
/*
===============================================================================
DOKEOS FOOTER
===============================================================================
FOOTER
*/
Display :: display_footer();
?>

@ -18,23 +18,17 @@ include ('../inc/global.inc.php');
$this_section = SECTION_COURSES;
/*
-----------------------------------------------------------
Libraries & settings
-----------------------------------------------------------
*/
require_once (api_get_path(LIBRARY_PATH).'course.lib.php');
require_once (api_get_path(LIBRARY_PATH).'groupmanager.lib.php');
require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
/*
-----------------------------------------------------------
Constants & variables
-----------------------------------------------------------
*/
$current_group = GroupManager :: get_group_properties($_SESSION['_gid']);
/*
-----------------------------------------------------------
Header
-----------------------------------------------------------
*/
$nameTools = get_lang('EditGroup');
$interbreadcrumb[] = array ("url" => "group.php", "name" => get_lang('Groups'));
@ -42,11 +36,7 @@ $interbreadcrumb[] = array ("url" => "group.php", "name" => get_lang('Groups'));
if (!api_is_allowed_to_edit(false,true)) {
api_not_allowed(true);
}
/*
==============================================================================
FUNCTIONS
==============================================================================
*/
/* FUNCTIONS */
/**
* function to sort users after getting the list in the db. Necessary because there are 2 or 3 queries. Called by usort()
@ -104,9 +94,7 @@ function check_group_members($value) {
return true;
}
/*
==============================================================================
MAIN CODE
==============================================================================
*/
// Build form
@ -320,9 +308,7 @@ $defaults['referer'] = $referer;
$form->setDefaults($defaults);
$form->display();
/*
==============================================================================
FOOTER
==============================================================================
*/
Display :: display_footer();
?>
?>

@ -22,9 +22,7 @@ $this_section=SECTION_COURSES;
$nameTools = get_lang("GroupOverview");
/*
-----------------------------------------------------------
Libraries
-----------------------------------------------------------
*/
include_once (api_get_path(LIBRARY_PATH).'course.lib.php'); //necessary
include_once (api_get_path(LIBRARY_PATH).'groupmanager.lib.php');
@ -64,9 +62,7 @@ if( isset($_GET['action']))
}
/*
-----------------------------------------------------------
Header
-----------------------------------------------------------
*/
$interbreadcrumb[]=array("url" => "group.php","name" => get_lang('Groups'));
if (!isset ($_GET['origin']) || $_GET['origin'] != 'learnpath')
@ -120,9 +116,7 @@ foreach($categories as $index => $category)
echo '</ul>';
}
/*
==============================================================================
FOOTER
==============================================================================
*/
if (!isset ($_GET['origin']) || $_GET['origin'] != 'learnpath')
{

@ -1,13 +1,11 @@
<?php //$Id: group_space.php 21933 2009-07-09 06:08:22Z ivantcholakov $
/* For licensing terms, see /license.txt */
/**
==============================================================================
* This script shows the group space for one specific group, possibly displaying
* a list of users in the group, subscribe or unsubscribe option, tutors...
*
* @package chamilo.group
* @todo Display error message if no group ID specified
==============================================================================
*/
/* INIT SECTION*/
@ -16,9 +14,7 @@
$language_file = "group";
require_once '../inc/global.inc.php';
/*
-----------------------------------------------------------
Libraries & config files
-----------------------------------------------------------
*/
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
@ -26,9 +22,7 @@ require_once api_get_path(LIBRARY_PATH).'sortabletable.class.php';
require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php';
require_once api_get_path(SYS_CODE_PATH).'forum/forumconfig.inc.php';
/*
==============================================================================
MAIN CODE
==============================================================================
MAIN CODE
*/
$current_group = GroupManager :: get_group_properties($_SESSION['_gid']);
if (!is_array($current_group) ) {
@ -39,9 +33,8 @@ $nameTools = get_lang("GroupSpace");
$interbreadcrumb[] = array ("url" => "group.php", "name" => get_lang("Groups"));
/*
-----------------------------------------------------------
Ensure all private groups // Juan Carlos Ra<EFBFBD>a Trabado
-----------------------------------------------------------
*/
$forums_of_groups = get_forums_of_group($current_group['id']);
@ -487,4 +480,4 @@ if ($orig != 'learnpath')
{
Display::display_footer();
}
?>
?>

@ -1,15 +1,10 @@
<?php
/* For licensing terms, see /license.txt*/
/**
==============================================================================
* @package dokeos.user
==============================================================================
* @package chamilo.user
*/
/*==========================
INIT
==========================*/
/* INIT */
// name of the language file that needs to be included
$language_file="registration";
@ -28,17 +23,14 @@ $tbl_courseUser = "course_rel_user";
/*==========================
DATA CHECKING
==========================*/
/* DATA CHECKING */
if($register)
{
if($register) {
/*
* Fields Checking
*/
$lastname_form = trim($lastname_form);
$lastname_form = trim($lastname_form);
$firstname_form = trim($firstname_form);
$password_form = trim($password_form);
$username_form = trim($username_form);

Loading…
Cancel
Save