Permalink
Browse files

MDL-33404 Fix defaults for ordinary files that are drag/dropped into …

…the course page
  • Loading branch information...
moodler committed May 29, 2012
1 parent 4631e39 commit 5fece0f28dcff610f945da7978e6213776167c20
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/resource/lib.php
View
@@ -500,7 +500,7 @@ function mod_resource_dndupload_handle($uploadinfo) {
$data = new stdClass();
$data->course = $uploadinfo->course->id;
$data->name = $uploadinfo->displayname;
- $data->intro = '<p>'.$uploadinfo->displayname.'</p>';
+ $data->intro = '';
$data->introformat = FORMAT_HTML;
$data->coursemodule = $uploadinfo->coursemodule;
$data->files = $uploadinfo->draftitemid;
@@ -512,6 +512,8 @@ function mod_resource_dndupload_handle($uploadinfo) {
$data->popupwidth = $config->popupwidth;
$data->printheading = $config->printheading;
$data->printintro = $config->printintro;
+ $data->showsize = $config->showsize;
+ $data->showtype = $config->showtype;
return resource_add_instance($data, null);
}

0 comments on commit 5fece0f

Please sign in to comment.