diff --git a/mod/choice/lang/en/choice.php b/mod/choice/lang/en/choice.php
index 1b07e86..bde5890 100644
--- a/mod/choice/lang/en/choice.php
+++ b/mod/choice/lang/en/choice.php
@@ -85,3 +85,7 @@ $string['timerestrict'] = 'Restrict answering to this time period';
 $string['viewallresponses'] = 'View {$a} responses';
 $string['withselected'] = 'With selected';
 $string['yourselection'] = 'Your selection';
+$string['exportinstitution'] = 'Institution';
+$string['exportdepartment'] = 'Department';
+$string['exportsettings'] = 'Export';
+$string['exportsettings_desc'] = 'Specify additional user information to include in the exports, by enabling selections below.';
diff --git a/mod/choice/lib.php b/mod/choice/lib.php
index 7bceb33..0b3f222 100644
--- a/mod/choice/lib.php
+++ b/mod/choice/lib.php
@@ -851,6 +851,7 @@ function choice_reset_userdata($data) {
 function choice_get_response_data($choice, $cm, $groupmode) {
     global $CFG, $USER, $DB;
 
+    $plugin_config = get_config('choice');
     $context = get_context_instance(CONTEXT_MODULE, $cm->id);
 
 /// Get the current group
@@ -865,7 +866,14 @@ function choice_get_response_data($choice, $cm, $groupmode) {
 
 /// First get all the users who have access here
 /// To start with we assume they are all "unanswered" then move them later
-    $allresponses[0] = get_enrolled_users($context, 'mod/choice:choose', $currentgroup, user_picture::fields('u', array('idnumber')), 'u.lastname ASC,u.firstname ASC');
+    $userdata = array('idnumber');
+    if (!empty($plugin_config->exportuserinstitution)) {
+        $userdata[] = 'institution';        // Include institution
+    }
+    if (!empty($plugin_config->exportuserdepartment)) {
+        $userdata[] = 'department';         // Include department
+    }
+    $allresponses[0] = get_enrolled_users($context, 'mod/choice:choose', $currentgroup, user_picture::fields('u', $userdata), 'u.lastname ASC,u.firstname ASC');
 
 /// Get all the recorded responses for this choice
     $rawresponses = $DB->get_records('choice_answers', array('choiceid' => $choice->id));
diff --git a/mod/choice/report.php b/mod/choice/report.php
index 48872af..1e0ef5b 100644
--- a/mod/choice/report.php
+++ b/mod/choice/report.php
@@ -32,6 +32,7 @@
     require_login($course->id, false, $cm);
 
     $context = get_context_instance(CONTEXT_MODULE, $cm->id);
+    $plugin_config = get_config('choice');
 
     require_capability('mod/choice:readresponses', $context);
 
@@ -79,11 +80,19 @@
         $myxls =& $workbook->add_worksheet($strresponses);
 
     /// Print names of all the fields
-        $myxls->write_string(0,0,get_string("lastname"));
-        $myxls->write_string(0,1,get_string("firstname"));
-        $myxls->write_string(0,2,get_string("idnumber"));
-        $myxls->write_string(0,3,get_string("group"));
-        $myxls->write_string(0,4,get_string("choice","choice"));
+        $colcount = 0;
+        $myxls->write_string(0,$colcount++,get_string("lastname"));
+        $myxls->write_string(0,$colcount++,get_string("firstname"));
+        $myxls->write_string(0,$colcount++,get_string("idnumber"));
+        $myxls->write_string(0,$colcount++,get_string("group"));
+
+        if (!empty($plugin_config->exportuserinstitution)) {
+            $myxls->write_string(0,$colcount++,get_string("institution"));
+        }
+        if (!empty($plugin_config->exportuserdepartment)) {
+            $myxls->write_string(0,$colcount++,get_string("department"));
+        }
+        $myxls->write_string(0,$colcount++,get_string("choice","choice"));
 
     /// generate the data for the body of the spreadsheet
         $i=0;
@@ -92,20 +101,27 @@
             foreach ($users as $option => $userid) {
                 $option_text = choice_get_option_text($choice, $option);
                 foreach($userid as $user) {
-                    $myxls->write_string($row,0,$user->lastname);
-                    $myxls->write_string($row,1,$user->firstname);
+                    $colcount = 0;
+                    $myxls->write_string($row,$colcount++,$user->lastname);
+                    $myxls->write_string($row,$colcount++,$user->firstname);
                     $studentid=(!empty($user->idnumber) ? $user->idnumber : " ");
-                    $myxls->write_string($row,2,$studentid);
+                    $myxls->write_string($row,$colcount++,$studentid);
                     $ug2 = '';
                     if ($usergrps = groups_get_all_groups($course->id, $user->id)) {
                         foreach ($usergrps as $ug) {
                             $ug2 = $ug2. $ug->name;
                         }
                     }
-                    $myxls->write_string($row,3,$ug2);
+                    $myxls->write_string($row,$colcount++,$ug2);
+                    if (!empty($plugin_config->exportuserinstitution)) {
+                        $myxls->write_string($row,$colcount++,$user->institution);
+                    }
+                    if (!empty($plugin_config->exportuserdepartment)) {
+                        $myxls->write_string($row,$colcount++,$user->department);
+                    }
 
                     if (isset($option_text)) {
-                        $myxls->write_string($row,4,format_string($option_text,true));
+                        $myxls->write_string($row,$colcount++,format_string($option_text,true));
                     }
                     $row++;
                     $pos=4;
@@ -132,11 +148,18 @@
         $myxls =& $workbook->add_worksheet($strresponses);
 
     /// Print names of all the fields
-        $myxls->write_string(0,0,get_string("lastname"));
-        $myxls->write_string(0,1,get_string("firstname"));
-        $myxls->write_string(0,2,get_string("idnumber"));
-        $myxls->write_string(0,3,get_string("group"));
-        $myxls->write_string(0,4,get_string("choice","choice"));
+        $colcount = 0;
+        $myxls->write_string(0,$colcount++,get_string("lastname"));
+        $myxls->write_string(0,$colcount++,get_string("firstname"));
+        $myxls->write_string(0,$colcount++,get_string("idnumber"));
+        $myxls->write_string(0,$colcount++,get_string("group"));
+        if (!empty($plugin_config->exportuserinstitution)) {
+            $myxls->write_string(0,$colcount++,get_string("institution"));
+        }
+        if (!empty($plugin_config->exportuserdepartment)) {
+            $myxls->write_string(0,$colcount++,get_string("department"));
+        }
+        $myxls->write_string(0,$colcount++,get_string("choice","choice"));
 
 
     /// generate the data for the body of the spreadsheet
@@ -144,21 +167,29 @@
         $row=1;
         if ($users) {
             foreach ($users as $option => $userid) {
+                $colcount = 0;
                 $option_text = choice_get_option_text($choice, $option);
                 foreach($userid as $user) {
-                    $myxls->write_string($row,0,$user->lastname);
-                    $myxls->write_string($row,1,$user->firstname);
+                    $myxls->write_string($row,$colcount++,$user->lastname);
+                    $myxls->write_string($row,$colcount++,$user->firstname);
                     $studentid=(!empty($user->idnumber) ? $user->idnumber : " ");
-                    $myxls->write_string($row,2,$studentid);
+                    $myxls->write_string($row,$colcount++,$studentid);
                     $ug2 = '';
                     if ($usergrps = groups_get_all_groups($course->id, $user->id)) {
                         foreach ($usergrps as $ug) {
                             $ug2 = $ug2. $ug->name;
                         }
                     }
-                    $myxls->write_string($row,3,$ug2);
+                    $myxls->write_string($row,$colcount++,$ug2);
+                    if (!empty($plugin_config->exportuserinstitution)) {
+                        $myxls->write_string($row,$colcount++,$user->institution);
+                    }
+                    if (!empty($plugin_config->exportuserdepartment)) {
+                        $myxls->write_string($row,$colcount++,$user->department);
+                    }
+
                     if (isset($option_text)) {
-                        $myxls->write_string($row,4,format_string($option_text,true));
+                        $myxls->write_string($row,$colcount++,format_string($option_text,true));
                     }
                     $row++;
                 }
@@ -184,6 +215,12 @@
 
         echo get_string("firstname")."\t".get_string("lastname") . "\t". get_string("idnumber") . "\t";
         echo get_string("group"). "\t";
+        if (!empty($plugin_config->exportuserinstitution)) {
+            echo get_string("institution"). "\t";
+        }
+        if (!empty($plugin_config->exportuserdepartment)) {
+            echo get_string("department"). "\t";
+        }
         echo get_string("choice","choice"). "\n";
 
         /// generate the data for the body of the spreadsheet
@@ -206,6 +243,12 @@
                         }
                     }
                     echo $ug2. "\t";
+                    if (!empty($plugin_config->exportuserinstitution)) {
+                        echo $user->institution."\t";
+                    }
+                    if (!empty($plugin_config->exportuserdepartment)) {
+                        echo $user->department."\t";
+                    }
                     if (isset($option_text)) {
                         echo format_string($option_text,true);
                     }
diff --git a/mod/choice/settings.php b/mod/choice/settings.php
new file mode 100644
index 0000000..a1b7cb3
--- /dev/null
+++ b/mod/choice/settings.php
@@ -0,0 +1,37 @@
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Folder module admin settings and defaults
+ *
+ * @package   mod-choice
+ * @copyright 2010 Eugene Venter
+ * @author Eugene Venter - based on code by others
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die;
+
+if ($ADMIN->fulltree) {
+    //--- general settings -----------------------------------------------------------------------------------
+    $settings->add(new admin_setting_heading('mod_choice_export',
+        get_string('exportsettings', 'choice'), get_string('exportsettings_desc', 'choice')));
+    $settings->add(new admin_setting_configcheckbox('choice/exportuserinstitution',
+        get_string('exportinstitution', 'choice'), '', 0));
+    $settings->add(new admin_setting_configcheckbox('choice/exportuserdepartment',
+        get_string('exportdepartment', 'choice'), '', 0));
+}
