Set title if "work_title" key is set see BT#12882

pull/2487/head
jmontoyaa 8 years ago
parent 3d3a285b8e
commit 578bf94b21
  1. 3
      main/work/work.lib.php

@ -4129,12 +4129,13 @@ function addDir($formValues, $user_id, $courseInfo, $groupId, $session_id)
$dirName = '/'.$created_dir;
$today = new DateTime(api_get_utc_datetime(), new DateTimeZone('UTC'));
$title = isset($formValues['work_title']) ? $formValues['work_title'] : $formValues['new_dir'];
$workTable = new CStudentPublication();
$workTable
->setCId($course_id)
->setUrl($dirName)
->setTitle($formValues['new_dir'])
->setTitle($title)
->setDescription($formValues['description'])
->setActive(true)
->setAccepted(true)

Loading…
Cancel
Save