Skip to content

Commit

Permalink
MDL-23102, scorm, show previously uploaded package file
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongsheng Cai committed Jul 12, 2010
1 parent 718afe5 commit b76f2e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mod/scorm/mod_form.php
Expand Up @@ -266,6 +266,11 @@ function data_preprocessing(&$default_values) {
}
$scorms = get_all_instances_in_course('scorm', $COURSE);
$coursescorm = current($scorms);

$draftitemid = file_get_submitted_draft_itemid('packagefile');
file_prepare_draft_area(&$draftitemid, $this->context->id, 'mod_scorm', 'package', 0);
$default_values['packagefile'] = $draftitemid;

if (($COURSE->format == 'scorm') && ((count($scorms) == 0) || ($default_values['instance'] == $coursescorm->id))) {
$default_values['redirect'] = 'yes';
$default_values['redirecturl'] = '../course/view.php?id='.$default_values['course'];
Expand Down

0 comments on commit b76f2e6

Please sign in to comment.