Commit 5e95e362 authored by Lisa Seeto's avatar Lisa Seeto Committed by Gerrit Code Review
Browse files

Merge "Bug 1911824: Change the copy setting for artefact annotation to 'nocopy'" into 21.04_STABLE

parents 5dbaf555 d31993dd
...@@ -415,10 +415,17 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype { ...@@ -415,10 +415,17 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype {
return $values; return $values;
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'fullinclself'; if ($instance->get_view()->get('owner') == $view->get('owner')) {
return 'fullinclself';
}
return 'nocopy';
} }
/**
* To stop original annotation getting copies of the feedback
* when we copy a page
*/
public static function ignore_copy_artefacttypes() { public static function ignore_copy_artefacttypes() {
return array('annotationfeedback'); return array('annotationfeedback');
} }
......
...@@ -263,7 +263,7 @@ class PluginBlocktypeBlog extends MaharaCoreBlocktype { ...@@ -263,7 +263,7 @@ class PluginBlocktypeBlog extends MaharaCoreBlocktype {
); );
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'nocopy'; return 'nocopy';
} }
......
...@@ -195,7 +195,7 @@ class PluginBlocktypeBlogpost extends MaharaCoreBlocktype { ...@@ -195,7 +195,7 @@ class PluginBlocktypeBlogpost extends MaharaCoreBlocktype {
array('fieldname' => 'ctime', 'order' => 'DESC')); array('fieldname' => 'ctime', 'order' => 'DESC'));
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'nocopy'; return 'nocopy';
} }
......
...@@ -207,7 +207,7 @@ class PluginBlocktypeRecentposts extends MaharaCoreBlocktype { ...@@ -207,7 +207,7 @@ class PluginBlocktypeRecentposts extends MaharaCoreBlocktype {
); );
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'nocopy'; return 'nocopy';
} }
......
...@@ -556,7 +556,7 @@ EOF; ...@@ -556,7 +556,7 @@ EOF;
return $artefacts; return $artefacts;
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'nocopy'; return 'nocopy';
} }
......
...@@ -15,6 +15,8 @@ $string['pluginname'] = 'Comment'; ...@@ -15,6 +15,8 @@ $string['pluginname'] = 'Comment';
$string['Comment'] = 'Comment'; $string['Comment'] = 'Comment';
$string['Comments'] = 'Comments'; $string['Comments'] = 'Comments';
$string['comment'] = 'comment'; $string['comment'] = 'comment';
$string['artefactcomments'] = 'Artefact comments for block';
$string['viewcomments'] = 'Page comments';
$string['comments'] = 'comments'; $string['comments'] = 'comments';
$string['Details'] = 'Details'; $string['Details'] = 'Details';
$string['anddetails'] = 'and details'; $string['anddetails'] = 'and details';
......
...@@ -160,7 +160,7 @@ class PluginBlocktypeFiledownload extends MaharaCoreBlocktype { ...@@ -160,7 +160,7 @@ class PluginBlocktypeFiledownload extends MaharaCoreBlocktype {
return $element; return $element;
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'full'; return 'full';
} }
......
...@@ -236,7 +236,7 @@ class PluginBlocktypeFolder extends MaharaCoreBlocktype { ...@@ -236,7 +236,7 @@ class PluginBlocktypeFolder extends MaharaCoreBlocktype {
return $element; return $element;
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'full'; return 'full';
} }
......
...@@ -916,7 +916,7 @@ class PluginBlocktypeGallery extends MaharaCoreBlocktype { ...@@ -916,7 +916,7 @@ class PluginBlocktypeGallery extends MaharaCoreBlocktype {
public static function artefactchooser_element($default=null) { public static function artefactchooser_element($default=null) {
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'full'; return 'full';
} }
......
...@@ -121,7 +121,7 @@ class PluginBlocktypeHtml extends MaharaCoreBlocktype { ...@@ -121,7 +121,7 @@ class PluginBlocktypeHtml extends MaharaCoreBlocktype {
); );
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'full'; return 'full';
} }
......
...@@ -166,7 +166,7 @@ class PluginBlocktypeImage extends MaharaCoreBlocktype { ...@@ -166,7 +166,7 @@ class PluginBlocktypeImage extends MaharaCoreBlocktype {
return ArtefactTypeFileBase::artefactchooser_get_file_data($artefact); return ArtefactTypeFileBase::artefactchooser_get_file_data($artefact);
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'full'; return 'full';
} }
} }
...@@ -303,7 +303,7 @@ class PluginBlocktypeInternalmedia extends MaharaCoreBlocktype { ...@@ -303,7 +303,7 @@ class PluginBlocktypeInternalmedia extends MaharaCoreBlocktype {
} }
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'full'; return 'full';
} }
......
...@@ -201,7 +201,7 @@ class PluginBlocktypePdf extends MaharaCoreBlocktype { ...@@ -201,7 +201,7 @@ class PluginBlocktypePdf extends MaharaCoreBlocktype {
); );
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'full'; return 'full';
} }
......
...@@ -428,7 +428,7 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype { ...@@ -428,7 +428,7 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
return $configdata; return $configdata;
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'shallow'; return 'shallow';
} }
......
...@@ -205,7 +205,7 @@ class PluginBlocktypeSocialprofile extends MaharaCoreBlocktype { ...@@ -205,7 +205,7 @@ class PluginBlocktypeSocialprofile extends MaharaCoreBlocktype {
return $configdata; return $configdata;
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'shallow'; return 'shallow';
} }
......
...@@ -612,7 +612,7 @@ EOF; ...@@ -612,7 +612,7 @@ EOF;
return $element; return $element;
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'full'; return 'full';
} }
......
...@@ -168,7 +168,7 @@ class PluginBlocktypeEntireresume extends MaharaCoreBlocktype { ...@@ -168,7 +168,7 @@ class PluginBlocktypeEntireresume extends MaharaCoreBlocktype {
return $return; return $return;
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'shallow'; return 'shallow';
} }
......
...@@ -191,7 +191,7 @@ class PluginBlocktypeResumefield extends MaharaCoreBlocktype { ...@@ -191,7 +191,7 @@ class PluginBlocktypeResumefield extends MaharaCoreBlocktype {
return $configdata; return $configdata;
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'shallow'; return 'shallow';
} }
......
...@@ -225,7 +225,7 @@ class PluginBlocktypeCourseinfo extends MaharaCoreBlocktype { ...@@ -225,7 +225,7 @@ class PluginBlocktypeCourseinfo extends MaharaCoreBlocktype {
'body' => get_string('plugininfo', 'blocktype.courseinfo')); 'body' => get_string('plugininfo', 'blocktype.courseinfo'));
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'shallow'; return 'shallow';
} }
......
...@@ -183,7 +183,7 @@ class PluginBlocktypeCreativecommons extends MaharaCoreBlocktype { ...@@ -183,7 +183,7 @@ class PluginBlocktypeCreativecommons extends MaharaCoreBlocktype {
); );
} }
public static function default_copy_type() { public static function default_copy_type(BlockInstance $instance, View $view) {
return 'full'; return 'full';
} }
......
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