Merge branch 'wip-MDL-44501-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE

This commit is contained in:
Eloy Lafuente (stronk7) 2014-06-09 18:59:37 +02:00
commit 4d7544a3a0

View file

@ -348,7 +348,9 @@ class data_portfolio_caller extends portfolio_module_caller_base {
$includedfiles = array();
foreach ($fields as $singlefield) {
if (is_callable(array($singlefield, 'get_file'))) {
$includedfiles[] = $singlefield->get_file($record->id);
if ($file = $singlefield->get_file($record->id)) {
$includedfiles[] = $file;
}
}
}
if (count($includedfiles) == 1 && count($fields) == 1) {