Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c42353
)
data MDL-23573 made database activity export only include the requested fields
author
Andrew Davis
<andrew@affinitysoftware.net>
Thu, 29 Jul 2010 06:24:47 +0000
(06:24 +0000)
committer
Andrew Davis
<andrew@affinitysoftware.net>
Thu, 29 Jul 2010 06:24:47 +0000
(06:24 +0000)
mod/data/export.php
patch
|
blob
|
blame
|
history
diff --git
a/mod/data/export.php
b/mod/data/export.php
index
bd031b1
..
e108b4d
100644
(file)
--- a/
mod/data/export.php
+++ b/
mod/data/export.php
@@
-98,10
+98,12
@@
if($mform->is_cancelled()) {
$selectedfields = array();
foreach ($formdata as $key => $value) {
- if (strpos($key, 'field_') === 0) {
+ //field form elements are field_1 field_2 etc. 0 if not selected. 1 if selected.
+ if (strpos($key, 'field_')===0 && !empty($value)) {
$selectedfields[] = substr($key, 6);
}
}
+
$exportdata = data_get_exportdata($data->id, $fields, $selectedfields);
$count = count($exportdata);
switch ($formdata['exporttype']) {