Commit 74a9631f authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Prepend 'Copy of' to titles of copied blogs

parent 64a8cf2c
......@@ -332,6 +332,11 @@ class ArtefactTypeBlog extends ArtefactType {
get_string('blogsettings', 'artefact.blog') => $wwwroot . 'artefact/blog/settings/?id=' . $id,
);
}
public function copy_extra($new) {
$new->set('title', get_string('Copyof', 'mahara', $this->get('title')));
}
}
/**
......
......@@ -787,4 +787,6 @@ $string['importedfrom'] = 'Imported from %s';
$string['incomingfolderdesc'] = 'Files imported from other networked hosts';
$string['remotehost'] = 'Remote host %s';
$string['Copyof'] = 'Copy of %s';
?>
......@@ -277,7 +277,6 @@ $string['noownersfound'] = 'No owners found';
$string['viewsby'] = 'Views by %s';
$string['Preview'] = 'Preview';
$string['close'] = 'Close';
$string['Copyof'] = 'Copy of %s';
$string['blockcopypermission'] = 'Block copy permission';
$string['blockcopypermissiondesc'] = 'If you allow other users to copy this View, you may choose how this block will be copied';
......
......@@ -2115,7 +2115,7 @@ function createview_submit(Pieform $form, $values) {
if ($templateid) {
$template = new View($templateid);
if (!$template->get('deleted') && ($template->get('template') && can_view_view($templateid)) || $USER->can_edit_view($template)) {
$view->set('title', View::new_title(get_string('Copyof', 'view', $template->get('title')), $owner, $group, $institution));
$view->set('title', View::new_title(get_string('Copyof', 'mahara', $template->get('title')), $owner, $group, $institution));
$view->set('dirty', true);
$copystatus = $view->copy_contents($template);
$SESSION->add_ok_msg(get_string('copiedblocksandartefactsfromtemplate', 'view', $copystatus['blocks'], $copystatus['artefacts'], $template->get('title')));
......
Markdown is supported
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