Skip to content

Commit

Permalink
MDL-33404 Fix defaults for ordinary files that are drag/dropped into …
Browse files Browse the repository at this point in the history
…the course page
  • Loading branch information
moodler committed May 29, 2012
1 parent 4631e39 commit 5fece0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mod/resource/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.