Skip to content

Commit

Permalink
Merge branch 'MDL-37037-master' of git://github.com/damyon/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Dec 24, 2012
2 parents 5066f30 + afa3e63 commit b20d65f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion mod/assign/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2040,11 +2040,26 @@ private function download_submissions() {
}
}
}
if ($zipfile = $this->pack_files($filesforzipping)) {
$result = '';
if (count($filesforzipping) == 0) {
$header = new assign_header($this->get_instance(),
$this->get_context(),
'',
$this->get_course_module()->id,
get_string('downloadall', 'assign'));
$result .= $this->get_renderer()->render($header);
$result .= $this->get_renderer()->notification(get_string('nosubmission', 'assign'));
$url = new moodle_url('/mod/assign/view.php', array('id'=>$this->get_course_module()->id,
'action'=>'grading'));
$result .= $this->get_renderer()->continue_button($url);
$result .= $this->view_footer();
} else if ($zipfile = $this->pack_files($filesforzipping)) {
$this->add_to_log('download all submissions', get_string('downloadall', 'assign'));
// Send file and delete after sending.
send_temp_file($zipfile, $filename);
// We will not get here - send_temp_file calls exit.
}
return $result;
}

/**
Expand Down

0 comments on commit b20d65f

Please sign in to comment.