Merge branch 'w50_MDL-37171_m23_outdatedexcel' of git://github.com/skodak/moodle...
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 17 Dec 2012 23:14:04 +0000 (00:14 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 17 Dec 2012 23:14:04 +0000 (00:14 +0100)
admin/user/user_bulk_download.php
course/lib.php
grade/export/ods/grade_export_ods.php
grade/export/xls/grade_export_xls.php
lib/odslib.class.php
mod/choice/report.php
mod/data/lib.php
mod/feedback/analysis_to_excel.php
mod/scorm/report/basic/report.php
mod/scorm/report/interactions/report.php
mod/survey/download.php

index 27fc9b9..b7a1d3f 100644 (file)
@@ -81,7 +81,7 @@ function user_download_ods($fields) {
 
     $worksheet = array();
 
-    $worksheet[0] =& $workbook->add_worksheet('');
+    $worksheet[0] = $workbook->add_worksheet('');
     $col = 0;
     foreach ($fields as $fieldname) {
         $worksheet[0]->write(0, $col, $fieldname);
@@ -119,7 +119,7 @@ function user_download_xls($fields) {
 
     $worksheet = array();
 
-    $worksheet[0] =& $workbook->add_worksheet('');
+    $worksheet[0] = $workbook->add_worksheet('');
     $col = 0;
     foreach ($fields as $fieldname) {
         $worksheet[0]->write(0, $col, $fieldname);
index c2d0f78..5ce677f 100644 (file)
@@ -655,7 +655,7 @@ function print_log_xls($course, $user, $date, $order='l.time DESC', $modname,
     // Creating worksheets
     for ($wsnumber = 1; $wsnumber <= $nroPages; $wsnumber++) {
         $sheettitle = get_string('logs').' '.$wsnumber.'-'.$nroPages;
-        $worksheet[$wsnumber] =& $workbook->add_worksheet($sheettitle);
+        $worksheet[$wsnumber] = $workbook->add_worksheet($sheettitle);
         $worksheet[$wsnumber]->set_column(1, 1, 30);
         $worksheet[$wsnumber]->write_string(0, 0, get_string('savedat').
                                     userdate(time(), $strftimedatetime));
@@ -769,7 +769,7 @@ function print_log_ods($course, $user, $date, $order='l.time DESC', $modname,
     // Creating worksheets
     for ($wsnumber = 1; $wsnumber <= $nroPages; $wsnumber++) {
         $sheettitle = get_string('logs').' '.$wsnumber.'-'.$nroPages;
-        $worksheet[$wsnumber] =& $workbook->add_worksheet($sheettitle);
+        $worksheet[$wsnumber] = $workbook->add_worksheet($sheettitle);
         $worksheet[$wsnumber]->set_column(1, 1, 30);
         $worksheet[$wsnumber]->write_string(0, 0, get_string('savedat').
                                     userdate(time(), $strftimedatetime));
index e366131..48ae321 100644 (file)
@@ -41,7 +41,7 @@ class grade_export_ods extends grade_export {
     /// Sending HTTP headers
         $workbook->send($downloadfilename);
     /// Adding the worksheet
-        $myxls =& $workbook->add_worksheet($strgrades);
+        $myxls = $workbook->add_worksheet($strgrades);
 
     /// Print names of all the fields
         $myxls->write_string(0,0,get_string("firstname"));
index a89c910..8b04bf4 100644 (file)
@@ -40,7 +40,7 @@ class grade_export_xls extends grade_export {
     /// Sending HTTP headers
         $workbook->send($downloadfilename);
     /// Adding the worksheet
-        $myxls =& $workbook->add_worksheet($strgrades);
+        $myxls = $workbook->add_worksheet($strgrades);
 
     /// Print names of all the fields
         $myxls->write_string(0,0,get_string("firstname"));
index be1a5d9..8192a37 100644 (file)
@@ -50,7 +50,7 @@ class MoodleODSWorkbook {
     /* Create one Moodle Worksheet
      * @param string $name Name of the sheet
      */
-    function &add_worksheet($name = '') {
+    function add_worksheet($name = '') {
     /// Create the Moodle Worksheet. Returns one pointer to it
         $ws = new MoodleODSWorksheet($name);
         $this->worksheets[] =& $ws;
index b1723dd..aaa80d3 100644 (file)
@@ -76,7 +76,7 @@
     /// Send HTTP headers
         $workbook->send($filename);
     /// Creating the first worksheet
-        $myxls =& $workbook->add_worksheet($strresponses);
+        $myxls = $workbook->add_worksheet($strresponses);
 
     /// Print names of all the fields
         $myxls->write_string(0,0,get_string("lastname"));
     /// Send HTTP headers
         $workbook->send($filename);
     /// Creating the first worksheet
-        $myxls =& $workbook->add_worksheet($strresponses);
+        $myxls = $workbook->add_worksheet($strresponses);
 
     /// Print names of all the fields
         $myxls->write_string(0,0,get_string("lastname"));
index 011588b..ca109e6 100644 (file)
@@ -2698,7 +2698,7 @@ function data_export_xls($export, $dataname, $count) {
     $workbook = new MoodleExcelWorkbook($filearg);
     $workbook->send($filename);
     $worksheet = array();
-    $worksheet[0] =& $workbook->add_worksheet('');
+    $worksheet[0] = $workbook->add_worksheet('');
     $rowno = 0;
     foreach ($export as $row) {
         $colno = 0;
@@ -2732,7 +2732,7 @@ function data_export_ods($export, $dataname, $count) {
     $workbook = new MoodleODSWorkbook($filearg);
     $workbook->send($filename);
     $worksheet = array();
-    $worksheet[0] =& $workbook->add_worksheet('');
+    $worksheet[0] = $workbook->add_worksheet('');
     $rowno = 0;
     foreach ($export as $row) {
         $colno = 0;
index d6320ef..47d3bff 100644 (file)
@@ -125,8 +125,8 @@ $xls_formats->procent = $workbook->add_format(array(
 // Creating the worksheets
 $sheetname = clean_param($feedback->name, PARAM_ALPHANUM);
 error_reporting(0);
-$worksheet1 =& $workbook->add_worksheet(substr($sheetname, 0, 31));
-$worksheet2 =& $workbook->add_worksheet('detailed');
+$worksheet1 = $workbook->add_worksheet(substr($sheetname, 0, 31));
+$worksheet2 = $workbook->add_worksheet('detailed');
 error_reporting($CFG->debug);
 $worksheet1->hide_gridlines();
 $worksheet1->set_column(0, 0, 10);
index e201ea4..954c0f3 100644 (file)
@@ -192,24 +192,24 @@ class scorm_basic_report extends scorm_default_report {
                 $workbook->send($filename);
                 // Creating the first worksheet
                 $sheettitle = get_string('report', 'scorm');
-                $myxls =& $workbook->add_worksheet($sheettitle);
+                $myxls = $workbook->add_worksheet($sheettitle);
                 // format types
-                $format =& $workbook->add_format();
+                $format = $workbook->add_format();
                 $format->set_bold(0);
-                $formatbc =& $workbook->add_format();
+                $formatbc = $workbook->add_format();
                 $formatbc->set_bold(1);
                 $formatbc->set_align('center');
-                $formatb =& $workbook->add_format();
+                $formatb = $workbook->add_format();
                 $formatb->set_bold(1);
-                $formaty =& $workbook->add_format();
+                $formaty = $workbook->add_format();
                 $formaty->set_bg_color('yellow');
-                $formatc =& $workbook->add_format();
+                $formatc = $workbook->add_format();
                 $formatc->set_align('center');
-                $formatr =& $workbook->add_format();
+                $formatr = $workbook->add_format();
                 $formatr->set_bold(1);
                 $formatr->set_color('red');
                 $formatr->set_align('center');
-                $formatg =& $workbook->add_format();
+                $formatg = $workbook->add_format();
                 $formatg->set_bold(1);
                 $formatg->set_color('green');
                 $formatg->set_align('center');
@@ -231,24 +231,24 @@ class scorm_basic_report extends scorm_default_report {
                 $workbook->send($filename);
                 // Creating the first worksheet
                 $sheettitle = get_string('report', 'scorm');
-                $myxls =& $workbook->add_worksheet($sheettitle);
+                $myxls = $workbook->add_worksheet($sheettitle);
                 // format types
-                $format =& $workbook->add_format();
+                $format = $workbook->add_format();
                 $format->set_bold(0);
-                $formatbc =& $workbook->add_format();
+                $formatbc = $workbook->add_format();
                 $formatbc->set_bold(1);
                 $formatbc->set_align('center');
-                $formatb =& $workbook->add_format();
+                $formatb = $workbook->add_format();
                 $formatb->set_bold(1);
-                $formaty =& $workbook->add_format();
+                $formaty = $workbook->add_format();
                 $formaty->set_bg_color('yellow');
-                $formatc =& $workbook->add_format();
+                $formatc = $workbook->add_format();
                 $formatc->set_align('center');
-                $formatr =& $workbook->add_format();
+                $formatr = $workbook->add_format();
                 $formatr->set_bold(1);
                 $formatr->set_color('red');
                 $formatr->set_align('center');
-                $formatg =& $workbook->add_format();
+                $formatg = $workbook->add_format();
                 $formatg->set_bold(1);
                 $formatg->set_color('green');
                 $formatg->set_align('center');
index 43c5395..26e6a0c 100644 (file)
@@ -259,24 +259,24 @@ class scorm_interactions_report extends scorm_default_report {
                 $workbook->send($filename);
                 // Creating the first worksheet
                 $sheettitle = get_string('report', 'scorm');
-                $myxls =& $workbook->add_worksheet($sheettitle);
+                $myxls = $workbook->add_worksheet($sheettitle);
                 // format types
-                $format =& $workbook->add_format();
+                $format = $workbook->add_format();
                 $format->set_bold(0);
-                $formatbc =& $workbook->add_format();
+                $formatbc = $workbook->add_format();
                 $formatbc->set_bold(1);
                 $formatbc->set_align('center');
-                $formatb =& $workbook->add_format();
+                $formatb = $workbook->add_format();
                 $formatb->set_bold(1);
-                $formaty =& $workbook->add_format();
+                $formaty = $workbook->add_format();
                 $formaty->set_bg_color('yellow');
-                $formatc =& $workbook->add_format();
+                $formatc = $workbook->add_format();
                 $formatc->set_align('center');
-                $formatr =& $workbook->add_format();
+                $formatr = $workbook->add_format();
                 $formatr->set_bold(1);
                 $formatr->set_color('red');
                 $formatr->set_align('center');
-                $formatg =& $workbook->add_format();
+                $formatg = $workbook->add_format();
                 $formatg->set_bold(1);
                 $formatg->set_color('green');
                 $formatg->set_align('center');
@@ -298,24 +298,24 @@ class scorm_interactions_report extends scorm_default_report {
                 $workbook->send($filename);
                 // Creating the first worksheet
                 $sheettitle = get_string('report', 'scorm');
-                $myxls =& $workbook->add_worksheet($sheettitle);
+                $myxls = $workbook->add_worksheet($sheettitle);
                 // format types
-                $format =& $workbook->add_format();
+                $format = $workbook->add_format();
                 $format->set_bold(0);
-                $formatbc =& $workbook->add_format();
+                $formatbc = $workbook->add_format();
                 $formatbc->set_bold(1);
                 $formatbc->set_align('center');
-                $formatb =& $workbook->add_format();
+                $formatb = $workbook->add_format();
                 $formatb->set_bold(1);
-                $formaty =& $workbook->add_format();
+                $formaty = $workbook->add_format();
                 $formaty->set_bg_color('yellow');
-                $formatc =& $workbook->add_format();
+                $formatc = $workbook->add_format();
                 $formatc->set_align('center');
-                $formatr =& $workbook->add_format();
+                $formatr = $workbook->add_format();
                 $formatr->set_bold(1);
                 $formatr->set_color('red');
                 $formatr->set_align('center');
-                $formatg =& $workbook->add_format();
+                $formatg = $workbook->add_format();
                 $formatg->set_bold(1);
                 $formatg->set_color('green');
                 $formatg->set_align('center');
index 562e84e..c83a7d7 100644 (file)
@@ -159,7 +159,7 @@ if ($type == "ods") {
 /// Sending HTTP headers
     $workbook->send($downloadfilename);
 /// Creating the first worksheet
-    $myxls =& $workbook->add_worksheet(textlib::substr(strip_tags(format_string($survey->name,true)), 0, 31));
+    $myxls = $workbook->add_worksheet(textlib::substr(strip_tags(format_string($survey->name,true)), 0, 31));
 
     $header = array("surveyid","surveyname","userid","firstname","lastname","email","idnumber","time", "notes");
     $col=0;
@@ -234,7 +234,7 @@ if ($type == "xls") {
 /// Sending HTTP headers
     $workbook->send($downloadfilename);
 /// Creating the first worksheet
-    $myxls =& $workbook->add_worksheet(textlib::substr(strip_tags(format_string($survey->name,true)), 0, 31));
+    $myxls = $workbook->add_worksheet(textlib::substr(strip_tags(format_string($survey->name,true)), 0, 31));
 
     $header = array("surveyid","surveyname","userid","firstname","lastname","email","idnumber","time", "notes");
     $col=0;