[svn r18551] Various minor fixes (warning and notice level)

skala
Yannick Warnier 16 years ago
parent 7f81c60794
commit 4b64462e45
  1. 63
      main/dropbox/dropbox_class.inc.php
  2. 39
      main/dropbox/dropbox_config.inc.php
  3. 25
      main/dropbox/dropbox_download.php
  4. 41
      main/dropbox/dropbox_functions.inc.php
  5. 24
      main/dropbox/dropbox_init.inc.php
  6. 29
      main/dropbox/dropbox_submit.php
  7. 25
      main/dropbox/dropbox_zipdownload.inc.php
  8. 28
      main/dropbox/index.php

@ -1,26 +1,5 @@
<?php
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2006 Dokeos S.A.
Copyright (c) 2006 Ghent University (UGent)
Copyright (c) various contributors
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
/**
* Dropbox module for Dokeos
@ -64,18 +43,18 @@
* @package dokeos.dropbox
**/
class Dropbox_Work {
var $id;
var $uploader_id;
var $uploaderName;
var $filename;
var $filesize;
var $title;
var $description;
var $author;
var $upload_date;
var $last_upload_date;
var $isOldWork;
var $feedback_date, $feedback; // RH: Feedback
public $id;
public $uploader_id;
public $uploaderName;
public $filename;
public $filesize;
public $title;
public $description;
public $author;
public $upload_date;
public $last_upload_date;
public $isOldWork;
public $feedback_date, $feedback; // RH: Feedback
/**
* Constructor calls private functions to create a new work or retreive an existing work from DB
@ -247,7 +226,7 @@ class Dropbox_Work {
class Dropbox_SentWork extends Dropbox_Work
{
var $recipients; //array of ["id"]["name"] arrays
public $recipients; //array of ["id"]["name"] arrays
/**
* Constructor calls private functions to create a new work or retreive an existing work from DB
@ -371,12 +350,12 @@ class Dropbox_SentWork extends Dropbox_Work
class Dropbox_Person
{
var $receivedWork; //array of Dropbox_Work objects
var $sentWork; //array of Dropbox_SentWork objects
var $userId = 0;
var $isCourseAdmin = FALSE;
var $isCourseTutor = FALSE;
var $_orderBy = ''; //private property that determines by which field
public $receivedWork; //array of Dropbox_Work objects
public $sentWork; //array of Dropbox_SentWork objects
public $userId = 0;
public $isCourseAdmin = FALSE;
public $isCourseTutor = FALSE;
public $_orderBy = ''; //private property that determines by which field
//the receivedWork and the sentWork arrays are sorted
/**

@ -1,36 +1,16 @@
<?php
/*
==============================================================================
Dokeos - elearning and course management software
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
Copyright (c) 2006 Dokeos S.A.
Copyright (c) 2006 Ghent University (UGent)
Copyright (c) various contributors
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
/**
* --------------------------------------
*       DEBUGGING VARS
* DEBUGGING VARS
* --------------------------------------
*/
$DEBUG = TRUE;
/**
* --------------------------------------
*       DATABASE TABLE VARIABLES
* DATABASE TABLE VARIABLES
* --------------------------------------
*/
$dropbox_cnf['tbl_post'] = Database::get_course_table(TABLE_DROPBOX_POST);
@ -44,7 +24,7 @@ $dropbox_cnf['tbl_feedback'] = Database::get_course_table(TABLE_DROPBOX_FEEDBAC
/**
* --------------------------------------
*       INITIALISE OTHER VARIABLES & CONSTANTS
* INITIALISE OTHER VARIABLES & CONSTANTS
* --------------------------------------
*/
$dropbox_cnf["courseId"] = $_cid;
@ -59,7 +39,7 @@ $dropbox_cnf["allowGroup"] = string_2_boolean(api_get_setting("dropbox_allow
/**
* --------------------------------------
* RH:   INITIALISE MAILING VARIABLES
* RH: INITIALISE MAILING VARIABLES
* --------------------------------------
*/
$dropbox_cnf["allowMailing"] = string_2_boolean(api_get_setting("dropbox_allow_mailing")); // false = no mailing functionality
@ -72,9 +52,4 @@ $dropbox_cnf["mailingWhereUSERID"] = "username";
$dropbox_cnf["mailingWhereLOGINNAME"] = "username";
$dropbox_cnf["mailingFileRegexp"] = '/^(.+)\.\w{1,4}$/';
$dropbox_cnf['sent_received_tabs']=true;
?>
$dropbox_cnf['sent_received_tabs']=true;

@ -1,26 +1,5 @@
<?php
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2006 Dokeos S.A.
Copyright (c) 2006 Ghent University (UGent)
Copyright (c) various contributors
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
/*
==============================================================================
INIT SECTION

@ -1,26 +1,5 @@
<?php
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2006-2008 Dokeos SPRL
Copyright (c) 2006 Ghent University (UGent)
Copyright (c) various contributors
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, rue du Corbeau, 108, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
/**
* This file contains additional dropbox functions. Initially there were some
@ -488,10 +467,7 @@ function display_addcategory_form($category_name='', $id='')
*/
function display_add_form()
{
global $_user;
global $is_courseAdmin;
global $is_courseTutor;
global $course_info; // this
global $_user, $is_courseAdmin, $is_courseTutor, $course_info, $origin, $dropbox_unid;
$token = Security::get_token();
$dropbox_person = new Dropbox_Person( $_user['user_id'], $is_courseAdmin, $is_courseTutor);
@ -505,8 +481,8 @@ function display_add_form()
<td>
<input type="hidden" name="MAX_FILE_SIZE" value='<?php echo dropbox_cnf("maxFilesize")?>' />
<input type="file" name="file" size="20" <?php if (dropbox_cnf("allowOverwrite")) echo 'onChange="checkfile(this.value)"'; ?> />
<input type="hidden" name="dropbox_unid" value="<?php echo $dropbox_unid?>" />
<input type="hidden" name="sec_token" value="<?php echo $token?>" />
<input type="hidden" name="dropbox_unid" value="<?php echo $dropbox_unid ?>" />
<input type="hidden" name="sec_token" value="<?php echo $token ?>" />
<?php
if ($origin=='learnpath')
{
@ -621,7 +597,7 @@ function display_add_form()
{
if ($current_group['number_of_members'] > 0)
{
echo '<option value="group_'.$current_group['id'].'">G: '.$current_group['name'].' - '.$current_group['number_of_members'].' '.$langUsers.'</option>';
echo '<option value="group_'.$current_group['id'].'">G: '.$current_group['name'].' - '.$current_group['number_of_members'].' '.api_get_lang('Users').'</option>';
}
}
}
@ -1193,7 +1169,8 @@ function zip_download ($array)
}
// create the zip file
$temp_zip_file=$temp_zip_dir.'/dropboxdownload-'.$_user['user_id'].'-'.mktime().'.zip';
$name = 'dropboxdownload-'.$_user['user_id'].'-'.mktime().'.zip';
$temp_zip_file=$temp_zip_dir.'/'.$name;
$zip_folder=new PclZip($temp_zip_file);
foreach ($files as $key=>$value)
@ -1279,7 +1256,7 @@ function zip_download_alternative($files)
$zip_folder->add($overview_file,PCLZIP_OPT_REMOVE_PATH, api_get_path(SYS_COURSE_PATH).$_course['path']."/temp");
// Step 5: send the file for download;
DocumentManager::file_send_for_download($temp_zip_file,true,$name);
DocumentManager::file_send_for_download($temp_zip_file,true);
// Step 6: remove the files in the temp dir
foreach ($files as $key=>$value)

@ -1,26 +1,6 @@
<?php // $Id: dropbox_init1.inc.php,v 1.29 2005/09/12 08:16:16 renehaentjens Exp $
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2006 Dokeos S.A.
Copyright (c) 2006 Ghent University (UGent)
Copyright (c) various contributors
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
/**
==============================================================================
* First initialisation file with initialisation of variables and

@ -1,26 +1,6 @@
<?php // $Id: dropbox_submit.php,v 1.27 2005/05/17 08:02:03 renehaentjens Exp $
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2006 Dokeos S.A.
Copyright (c) 2006 Ghent University (UGent)
Copyright (c) various contributors
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
/*
* ========================================
@ -353,7 +333,10 @@ if ( isset( $_GET['mailingIndex'])) // examine or send
{
// string result = error message, array result = [user_id, lastname, firstname]
global $var, $sel; unset($students);
global $var, $sel;
if (isset($students)) {
unset($students);
}
$result = api_sql_query($sel . $thisRecip . "'",__FILE__,__LINE__);
while ( ($res = mysql_fetch_array($result))) {$students[] = $res;}

@ -1,26 +1,5 @@
<?php
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2006 Dokeos S.A.
Copyright (c) 2006 Ghent University (UGent)
Copyright (c) various contributors
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
// the file that contains all the initialisation stuff (and includes all the configuration stuff)
require_once( "dropbox_init.inc.php");

@ -1,27 +1,5 @@
<?php // $Id: index.php,v 1.46 2005/09/26 10:20:25 pcool Exp $
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2006-2008 Dokeos S.A.
Copyright (c) 2006 Ghent University (UGent)
Copyright (c) various contributors
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
* @desc The dropbox is a personal (peer to peer) file exchange module that allows
@ -30,7 +8,7 @@
* @version 1.3
*
* @author Jan Bols <jan@ivpv.UGent.be>, main programmer, initial version
* @author Ren<EFBFBD> Haentjens <rene.haentjens@UGent.be>, several contributions (see RH)
* @author René Haentjens <rene.haentjens@UGent.be>, several contributions (see RH)
* @author Roan Embrechts, virtual course support
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University (see history version 1.3)
*

Loading…
Cancel
Save