Textarea export in CSV format

Re: Textarea export in CSV format

by AL Rachels -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Don't know if there is a tracker issue for this. I just took a quick look at the code for the database export and I think it would require a good bit of work to implement changes needed to give a human readable date/time from the data in date fields, and also to strip out the HTML tags from text fields.
In /data/lib.php, function data_get_exportdata($dataid, $fields, $selectedfields, $currentgroup=0, $context=null, $userdetails=false, $time=false, $approval=false, $tags = false), the SQL would need to be worked on as right now it does not consider the field type at all. It just gets raw content. The content and field type are kept in two totally different tables.
You would need the code rewritten to also get the field type, then "change/fix as needed" the raw data_content to, clean the contents of text fields, and convert the Unix time in date fields. You would also need a new setting for how you want the date/time formatted, as not all countries do it the same way.
It's a shame Moodle participation in the Google Summer of Code is canceled. This would be one of those very nice to have, easily achieved projects.
Average of ratings: Useful (1)