Changing headers, cleaning code

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

@ -1,7 +1,7 @@
<?php //$id: $ <?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 Christian Fasanando, initial version
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium, refactoring and tighter integration in Dokeos * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium, refactoring and tighter integration in Dokeos
*/ */

@ -5,7 +5,6 @@
*/ */
/* INIT SECTION */ /* INIT SECTION */
// name of the language file that needs to be included // name of the language file that needs to be included
$language_file = "group"; $language_file = "group";
require_once ('../inc/global.inc.php'); require_once ('../inc/global.inc.php');

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

@ -18,23 +18,17 @@ include ('../inc/global.inc.php');
$this_section = SECTION_COURSES; $this_section = SECTION_COURSES;
/* /*
-----------------------------------------------------------
Libraries & settings Libraries & settings
-----------------------------------------------------------
*/ */
require_once (api_get_path(LIBRARY_PATH).'course.lib.php'); 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).'groupmanager.lib.php');
require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'); require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
/* /*
-----------------------------------------------------------
Constants & variables Constants & variables
-----------------------------------------------------------
*/ */
$current_group = GroupManager :: get_group_properties($_SESSION['_gid']); $current_group = GroupManager :: get_group_properties($_SESSION['_gid']);
/* /*
-----------------------------------------------------------
Header Header
-----------------------------------------------------------
*/ */
$nameTools = get_lang('EditGroup'); $nameTools = get_lang('EditGroup');
$interbreadcrumb[] = array ("url" => "group.php", "name" => get_lang('Groups')); $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)) { if (!api_is_allowed_to_edit(false,true)) {
api_not_allowed(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() * 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; return true;
} }
/* /*
==============================================================================
MAIN CODE MAIN CODE
==============================================================================
*/ */
// Build form // Build form
@ -320,9 +308,7 @@ $defaults['referer'] = $referer;
$form->setDefaults($defaults); $form->setDefaults($defaults);
$form->display(); $form->display();
/* /*
==============================================================================
FOOTER FOOTER
==============================================================================
*/ */
Display :: display_footer(); Display :: display_footer();
?> ?>

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

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

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

Loading…
Cancel
Save