Hi,

I have been using Quiz 4.x to put some psychological tests and surveys online at Universiteit Leiden. Is working out great! There was only one hiccup: there did not seem to be an easy way to export the full results.

Since this is an absolute necessity if one wants to use Quiz for research purposes (in our case we have to easily be able to export CSV data for further analysis in SPSS), I have drafted a quick solution building on the available results_export_as_full_view stub in includes/results_export/results_export.admin.inc.

In order to call the function I reused a CSV export image to add an extra button to the admin/quiz/reports/results page.

Following: patch

Comments

robin van emden’s picture

StatusFileSize
new21.26 KB
new5 KB

Attached: patch, screenshot of export screen with added full csv button

robin van emden’s picture

Title: Results export as full csv export, patch » Results export as full csv export
StatusFileSize
new5 KB

Made a small typo, new version of above patch.

falcon’s picture

Status: Needs review » Fixed

Thanks!

Your patch has been commited.

Do you see any reasons to still keep the old CSV export? (I don't, but I'm not very focused on the import/export part of quiz at the moment...)

robin van emden’s picture

Hi Falcon,

Great that my patch has been committed! The other/old CSV export is a "one level up" view of the data, no need for it myself, but might still be of some interest to other users (anyone care to comment?)

I will do some more work on the results export next week, will change the new CSV button to a different colour & make some extra options available for the bulk export as well.

falcon’s picture

Ok, I'm looking forward to getting the new Icon!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

patcon’s picture

Status: Closed (fixed) » Active

Would anyone have any interest in my migrating this functionality to the views_export functionality of Views Bonus module? It would effectively be the same thing, but more configurable and adaptable.

So if default export views were programmatically created, they could easily be altered to export in tab-delimited format, or with different field formatting, or with addition or removal of certain fields (say, student name from a content profile).

I know some people get irritated by dependencies, but its VIEWS :)

Views Bonus Pack is more obscure, but I think the pay-off in flexibility would be much-appreciated.

Let me know if there's any interest in committing, and I'll put it on the to-do list! (And open a new issue! Eep.)

xenophyle’s picture

Version: 6.x-4.x-dev » 6.x-4.1

I would like to export but I can't seem to find the code from this patch anywhere in the module. There is also a line in quiz.admin.inc

$exp = module_exists('results_export');

but I can't find the results_export module anywhere in the quiz module or on Drupal.org.

patcon’s picture

xenophyle’s picture

Ah, interesting... Thanks.

djdevin’s picture

Component: Code - Import/Export » Code - Quiz core
Issue summary: View changes
Status: Active » Closed (duplicate)
Related issues: +#2521904: Export results with answers