Loading htdocs/api/xmlrpc/lib.php +1 −1 Original line number Diff line number Diff line Loading @@ -877,7 +877,7 @@ function submit_view_for_assessment($username, $id, $iscollection = false, $apil $access = View::get_invisible_token($id); } else { View::_db_submit(array($id), null, $remotehost, $userid); $view->submit(null, $remotehost, $userid); $access = View::new_token($id, false); } $token = $access->token; Loading htdocs/artefact/plans/view/submit.php +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ function submitview_submit(Pieform $form, $values) { global $SESSION, $USER, $portfolioType, $portfolioElement, $group; if (!empty($portfolioElement)) { $portfolioElement->submit($group, $USER); $portfolioElement->submit($group, null, null, true); $SESSION->add_ok_msg(get_string($portfolioType .'submitted', 'view')); } redirect(gotoURL()); Loading htdocs/lib/view.php +27 −6 Original line number Diff line number Diff line Loading @@ -6944,23 +6944,44 @@ class View { return $data; } public function submit($group, $sendnotification=true) { /** * Submit this View to a group or a remote host. * * While $group and $submittedhost are optional, at least one is required. * * The notification is only sent if we have a $group and $sendnotification * is true. * * @param object|null $group The Group object. * @param string|null $submittedhost A URL for the remote host. * @param int|null $owner A User ID. * @param bool $sendnotification Should we send a notification for this submission? */ public function submit($group = null, $submittedhost = null, $owner = null, $sendnotification=true) { global $USER; // One of these is needed. if (!$group && !$submittedhost) { throw new SystemException('Group or Submitted Host is needed.'); } if ($this->is_submitted()) { throw new SystemException('Attempting to submit a submitted view'); } if ($group) { $group->roles = get_column('grouptype_roles', 'role', 'grouptype', $group->grouptype, 'see_submitted_views', 1); } self::_db_submit(array($this->id), $group, $submittedhost, $owner); self::_db_submit(array($this->id), $group); handle_event('addsubmission', array('id' => $this->id, 'eventfor' => 'view', 'name' => $this->title, 'group' => $group->id, 'groupname' => $group->name)); 'group' => ($group) ? $group->id : null, 'groupname' => ($group) ? $group->name : null)); if ($sendnotification) { if ($group && $sendnotification) { activity_occurred( 'groupmessage', array( Loading htdocs/module/lti/lib.php +1 −1 Original line number Diff line number Diff line Loading @@ -373,7 +373,7 @@ class PluginModuleLti extends PluginModule { else { $view = new View($viewid); $view->submit(get_group_by_id($assessment->group), false); $view->submit(get_group_by_id($assessment->group), null, null, false); $submissionname = $view->get('title'); } Loading htdocs/view/submit.php +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ function submitview_submit(Pieform $form, $values) { $SESSION->add_ok_msg(get_string('collectionsubmitted', 'view')); } else if (!empty($view)) { $view->submit($group, $USER); $view->submit($group, null, $USER->get('id')); $SESSION->add_ok_msg(get_string('viewsubmitted', 'view')); } Loading Loading
htdocs/api/xmlrpc/lib.php +1 −1 Original line number Diff line number Diff line Loading @@ -877,7 +877,7 @@ function submit_view_for_assessment($username, $id, $iscollection = false, $apil $access = View::get_invisible_token($id); } else { View::_db_submit(array($id), null, $remotehost, $userid); $view->submit(null, $remotehost, $userid); $access = View::new_token($id, false); } $token = $access->token; Loading
htdocs/artefact/plans/view/submit.php +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ function submitview_submit(Pieform $form, $values) { global $SESSION, $USER, $portfolioType, $portfolioElement, $group; if (!empty($portfolioElement)) { $portfolioElement->submit($group, $USER); $portfolioElement->submit($group, null, null, true); $SESSION->add_ok_msg(get_string($portfolioType .'submitted', 'view')); } redirect(gotoURL()); Loading
htdocs/lib/view.php +27 −6 Original line number Diff line number Diff line Loading @@ -6944,23 +6944,44 @@ class View { return $data; } public function submit($group, $sendnotification=true) { /** * Submit this View to a group or a remote host. * * While $group and $submittedhost are optional, at least one is required. * * The notification is only sent if we have a $group and $sendnotification * is true. * * @param object|null $group The Group object. * @param string|null $submittedhost A URL for the remote host. * @param int|null $owner A User ID. * @param bool $sendnotification Should we send a notification for this submission? */ public function submit($group = null, $submittedhost = null, $owner = null, $sendnotification=true) { global $USER; // One of these is needed. if (!$group && !$submittedhost) { throw new SystemException('Group or Submitted Host is needed.'); } if ($this->is_submitted()) { throw new SystemException('Attempting to submit a submitted view'); } if ($group) { $group->roles = get_column('grouptype_roles', 'role', 'grouptype', $group->grouptype, 'see_submitted_views', 1); } self::_db_submit(array($this->id), $group, $submittedhost, $owner); self::_db_submit(array($this->id), $group); handle_event('addsubmission', array('id' => $this->id, 'eventfor' => 'view', 'name' => $this->title, 'group' => $group->id, 'groupname' => $group->name)); 'group' => ($group) ? $group->id : null, 'groupname' => ($group) ? $group->name : null)); if ($sendnotification) { if ($group && $sendnotification) { activity_occurred( 'groupmessage', array( Loading
htdocs/module/lti/lib.php +1 −1 Original line number Diff line number Diff line Loading @@ -373,7 +373,7 @@ class PluginModuleLti extends PluginModule { else { $view = new View($viewid); $view->submit(get_group_by_id($assessment->group), false); $view->submit(get_group_by_id($assessment->group), null, null, false); $submissionname = $view->get('title'); } Loading
htdocs/view/submit.php +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ function submitview_submit(Pieform $form, $values) { $SESSION->add_ok_msg(get_string('collectionsubmitted', 'view')); } else if (!empty($view)) { $view->submit($group, $USER); $view->submit($group, null, $USER->get('id')); $SESSION->add_ok_msg(get_string('viewsubmitted', 'view')); } Loading