Permalink
Browse files

Merge branch 'w50_MDL-37171_m24_outdatedexcel' of git://github.com/sk…

…odak/moodle into MOODLE_24_STABLE
  • Loading branch information...
2 parents 730271a + dc7c91a commit 1f60fe8a2335740118623b197a422510e55da624 @stronk7 stronk7 committed Dec 17, 2012
@@ -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);
View
@@ -665,7 +665,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));
@@ -779,7 +779,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));
@@ -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.
@@ -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
$profilefields = grade_helper::get_user_profile_fields($this->course->id, $this->usercustomfields);
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;
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"));
View
@@ -2686,7 +2686,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;
@@ -2720,7 +2720,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;
@@ -123,8 +123,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);
@@ -193,24 +193,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');
@@ -232,24 +232,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');
@@ -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');
@@ -327,8 +327,8 @@ function display($scorm, $cm, $course, $download) {
}
$rownum = 1;
} else if ($download == 'CSV') {
- $csvexport = new csv_export_writer("tab");
- $csvexport->set_filename($filename, ".txt");
+ $csvexport = new csv_export_writer("tab");
+ $csvexport->set_filename($filename, ".txt");
$csvexport->add_data($headers);
}

0 comments on commit 1f60fe8

Please sign in to comment.