Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-37171 fix multiple spreadsheet related PHP4isms

  • Loading branch information...
commit a530b69dd5099f2025e07908fb3f193064891392 1 parent 7d2c5cd
Petr Skoda skodak authored
4 admin/user/user_bulk_download.php
View
@@ -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);
4 course/lib.php
View
@@ -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));
2  grade/export/ods/grade_export_ods.php
View
@@ -41,7 +41,7 @@ function print_grades() {
/// 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"));
2  grade/export/xls/grade_export_xls.php
View
@@ -40,7 +40,7 @@ public function print_grades() {
/// 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"));
2  lib/odslib.class.php
View
@@ -50,7 +50,7 @@ function MoodleODSWorkbook($filename) {
/* 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;
4 mod/choice/report.php
View
@@ -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"));
@@ -129,7 +129,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"));
4 mod/data/lib.php
View
@@ -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;
4 mod/feedback/analysis_to_excel.php
View
@@ -125,8 +125,8 @@
// 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);
32 mod/scorm/report/basic/report.php
View
@@ -192,24 +192,24 @@ function display($scorm, $cm, $course, $download) {
$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 @@ function display($scorm, $cm, $course, $download) {
$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');
32 mod/scorm/report/interactions/report.php
View
@@ -259,24 +259,24 @@ function display($scorm, $cm, $course, $download) {
$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 @@ function display($scorm, $cm, $course, $download) {
$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');
4 mod/survey/download.php
View
@@ -159,7 +159,7 @@
/// 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 @@
/// 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;
Please sign in to comment.
Something went wrong with that request. Please try again.