Commit 53d2f535 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Set old extension for feedback attachments

parent 56774249
......@@ -73,6 +73,9 @@ $data = (object) array('owner' => $viewdata->owner,
'title' => $filename,
'description' => get_string_from_language($ownerlang, 'feedbackonviewbytutorofgroup', 'view',
$viewdata->title, display_name($USER), $viewdata->name));
if (preg_match("/\.([^\.]+)$/", $um->file['name'], $saved)) {
$data->oldextension = $saved[1];
}
$f = ArtefactTypeFile::new_file($um->file['tmp_name'], $data);
$f->commit();
$fileid = $f->get('id');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment