Generated Completion Reports Problem

Generated Completion Reports Problem

by Sam Christy -
Number of replies: 2

Hi everyone,

I have set up a Moodle installation on a Linux VPS to test Moodle - Release: 2.2.2+ (Build: 20120329). Everything is working fine except for one problem that I ran into. Now I'm not sure if anyone else has encountered this but I couldn't find anything on the bug tracker, so I thought that it would be best to post it here.

The problem is to do with the UTF-8 .csv and .csv reports that Moodle generates for Course Completion and Activity Completion reports. For some reason the generated reports display each activity like this (when viewed in a spreadsheet program):

Completed: {$a} Tuesday, 24 April 2012, 12:11 PM
Completed: {$a} Monday, 23 April 2012, 12:45 PM
Completed: {$a} Thursday, 19 April 2012, 09:29 AM
Completed: {$a} Monday, 23 April 2012, 12:52 PM
Not completed: {$a}  

It would appear that the intended behaviour was to print a PHP variable $a - it would make more sense to me to display each activity in a single column like: ,"Completed: Tuesday, 24 April 2012, 12:10 PM",

Perhaps the function that generates the reports has enclosed the string in '' (single quoted string) rather than the "" (double quoted string) required to print a variable in PHP?

I have attached a copy of one of the course completion reports to provide an example of what I'm talking about. I have removed the names and email addresses of the students, for their privacy.

-Sam

Average of ratings: -
In reply to Sam Christy

Re: Generated Completion Reports Problem

by Andrea Bicciolo -

Your problem is probably related to the following issue: http://tracker.moodle.org/browse/MDL-32535

Average of ratings: Useful (1)
In reply to Andrea Bicciolo

Re: Generated Completion Reports Problem

by Sam Christy -

Thanks Andrea, I replaced the files in Sam's patch and the activities are now rendered like so:

"Completed","Tuesday, 24 April 2012, 12:10 PM",

This should avoid confusing our users. However, I still feel that it would make more sense to to store each activity in a single column, e.g.

"Completed: Tuesday, 24 April 2012, 12:10 PM",

I can customise the code to do this but I see little point unless others agree with me?

I also don't understand why the course completion reports lack column headers (email address, activity 1 title, activity 2 title, etc.) whereas the activity completion reports have them.

I am interested to see what other people think about these features.

-Sam