Commit 3b90636a authored by Kristina Hoeppner's avatar Kristina Hoeppner
Browse files

Bug 1926519: Restrict the block types to use on 'Portfolio completion'

behatnotneeded

Change-Id: Ie6426e1fb1d7fa206f94553ac9435327f32a3951
parent 28fa960a
...@@ -37,6 +37,9 @@ class PluginBlocktypeBlog extends MaharaCoreBlocktype { ...@@ -37,6 +37,9 @@ class PluginBlocktypeBlog extends MaharaCoreBlocktype {
public static function get_categories() { public static function get_categories() {
return array('blog' => 10000); return array('blog' => 10000);
} }
public static function get_viewtypes() {
return array('dashboard', 'portfolio', 'profile', 'grouphomepage');
}
public static function get_link(BlockInstance $instance) { public static function get_link(BlockInstance $instance) {
$configdata = $instance->get('configdata'); $configdata = $instance->get('configdata');
......
...@@ -12,5 +12,5 @@ ...@@ -12,5 +12,5 @@
defined('INTERNAL') || die(); defined('INTERNAL') || die();
$config = new stdClass(); $config = new stdClass();
$config->version = 2008040201; $config->version = 2021042900;
$config->release = '1.0.1'; $config->release = '1.0.2';
...@@ -43,6 +43,10 @@ class PluginBlocktypeBlogpost extends MaharaCoreBlocktype { ...@@ -43,6 +43,10 @@ class PluginBlocktypeBlogpost extends MaharaCoreBlocktype {
return array('blog' => 11000); return array('blog' => 11000);
} }
public static function get_viewtypes() {
return array('dashboard', 'portfolio', 'profile', 'grouphomepage');
}
public static function render_instance(BlockInstance $instance, $editing=false, $versioning=false) { public static function render_instance(BlockInstance $instance, $editing=false, $versioning=false) {
$configdata = $instance->get('configdata'); $configdata = $instance->get('configdata');
......
...@@ -12,5 +12,5 @@ ...@@ -12,5 +12,5 @@
defined('INTERNAL') || die(); defined('INTERNAL') || die();
$config = new stdClass(); $config = new stdClass();
$config->version = 2008040201; $config->version = 2021042900;
$config->release = '1.0.1'; $config->release = '1.0.2';
...@@ -26,6 +26,10 @@ class PluginBlocktypeRecentposts extends MaharaCoreBlocktype { ...@@ -26,6 +26,10 @@ class PluginBlocktypeRecentposts extends MaharaCoreBlocktype {
return array('blog' => 12000); return array('blog' => 12000);
} }
public static function get_viewtypes() {
return array('dashboard', 'portfolio', 'profile', 'grouphomepage');
}
public static function get_instance_javascript(BlockInstance $bi) { public static function get_instance_javascript(BlockInstance $bi) {
$blockid = $bi->get('id'); $blockid = $bi->get('id');
$viewid = $bi->get('view'); $viewid = $bi->get('view');
......
...@@ -12,5 +12,5 @@ ...@@ -12,5 +12,5 @@
defined('INTERNAL') || die(); defined('INTERNAL') || die();
$config = new stdClass(); $config = new stdClass();
$config->version = 2008040201; $config->version = 2021042900;
$config->release = '1.0.1'; $config->release = '1.0.2';
...@@ -28,6 +28,10 @@ class PluginBlocktypeTaggedposts extends MaharaCoreBlocktype { ...@@ -28,6 +28,10 @@ class PluginBlocktypeTaggedposts extends MaharaCoreBlocktype {
return array('blog' => 13000); return array('blog' => 13000);
} }
public static function get_viewtypes() {
return array('dashboard', 'portfolio', 'profile', 'grouphomepage');
}
public static function get_instance_javascript(BlockInstance $bi) { public static function get_instance_javascript(BlockInstance $bi) {
$blockid = $bi->get('id'); $blockid = $bi->get('id');
$viewid = $bi->get('view'); $viewid = $bi->get('view');
......
...@@ -12,5 +12,5 @@ ...@@ -12,5 +12,5 @@
defined('INTERNAL') || die(); defined('INTERNAL') || die();
$config = new stdClass(); $config = new stdClass();
$config->version = 2015020200; $config->version = 2021042900;
$config->release = '1.1.1'; $config->release = '1.1.2';
...@@ -25,6 +25,10 @@ class PluginBlocktypeFiledownload extends MaharaCoreBlocktype { ...@@ -25,6 +25,10 @@ class PluginBlocktypeFiledownload extends MaharaCoreBlocktype {
return array('fileimagevideo' => 3000); return array('fileimagevideo' => 3000);
} }
public static function get_viewtypes() {
return array('dashboard', 'portfolio', 'profile', 'grouphomepage');
}
public static function render_instance_export(BlockInstance $instance, $editing=false, $versioning=false, $exporting=null) { public static function render_instance_export(BlockInstance $instance, $editing=false, $versioning=false, $exporting=null) {
if ($exporting != 'pdf') { if ($exporting != 'pdf') {
return self::render_instance($instance, $editing, $versioning); return self::render_instance($instance, $editing, $versioning);
......
...@@ -12,5 +12,5 @@ ...@@ -12,5 +12,5 @@
defined('INTERNAL') || die(); defined('INTERNAL') || die();
$config = new stdClass(); $config = new stdClass();
$config->version = 2010090801; $config->version = 2021042900;
$config->release = '1.0.1'; $config->release = '1.0.2';
...@@ -38,6 +38,10 @@ class PluginBlocktypeFolder extends MaharaCoreBlocktype { ...@@ -38,6 +38,10 @@ class PluginBlocktypeFolder extends MaharaCoreBlocktype {
return array('fileimagevideo' => 4000); return array('fileimagevideo' => 4000);
} }
public static function get_viewtypes() {
return array('dashboard', 'portfolio', 'profile');
}
public static function render_instance_export(BlockInstance $instance, $editing=false, $versioning=false, $exporting=null) { public static function render_instance_export(BlockInstance $instance, $editing=false, $versioning=false, $exporting=null) {
if ($exporting != 'pdf') { if ($exporting != 'pdf') {
return self::render_instance($instance, $editing, $versioning); return self::render_instance($instance, $editing, $versioning);
......
...@@ -12,5 +12,5 @@ ...@@ -12,5 +12,5 @@
defined('INTERNAL') || die(); defined('INTERNAL') || die();
$config = new stdClass(); $config = new stdClass();
$config->version = 2013120901; $config->version = 2021042900;
$config->release = '1.0.2'; $config->release = '1.0.3';
...@@ -35,6 +35,10 @@ class PluginBlocktypeGallery extends MaharaCoreBlocktype { ...@@ -35,6 +35,10 @@ class PluginBlocktypeGallery extends MaharaCoreBlocktype {
return array('fileimagevideo' => 5000); return array('fileimagevideo' => 5000);
} }
public static function get_viewtypes() {
return array('dashboard', 'portfolio', 'profile', 'grouphomepage');
}
public static function get_instance_javascript(BlockInstance $instance) { public static function get_instance_javascript(BlockInstance $instance) {
$blockid = $instance->get('id'); $blockid = $instance->get('id');
// The initjs for the fancybox will be applied to all galleries on the page // The initjs for the fancybox will be applied to all galleries on the page
......
...@@ -12,5 +12,5 @@ ...@@ -12,5 +12,5 @@
defined('INTERNAL') || die(); defined('INTERNAL') || die();
$config = new stdClass(); $config = new stdClass();
$config->version = 2011060801; $config->version = 2021042900;
$config->release = '2.0.1'; $config->release = '2.0.2';
...@@ -25,6 +25,10 @@ class PluginBlocktypeHtml extends MaharaCoreBlocktype { ...@@ -25,6 +25,10 @@ class PluginBlocktypeHtml extends MaharaCoreBlocktype {
return array('fileimagevideo' => 9000); return array('fileimagevideo' => 9000);
} }
public static function get_viewtypes() {
return array('dashboard', 'portfolio', 'profile');
}
public static function single_artefact_per_block() { public static function single_artefact_per_block() {
return true; return true;
} }
......
...@@ -12,5 +12,5 @@ ...@@ -12,5 +12,5 @@
defined('INTERNAL') || die(); defined('INTERNAL') || die();
$config = new stdClass(); $config = new stdClass();
$config->version = 2010090801; $config->version = 2021042900;
$config->release = '1.0.1'; $config->release = '1.0.2';
...@@ -33,6 +33,10 @@ class PluginBlocktypePdf extends MaharaCoreBlocktype { ...@@ -33,6 +33,10 @@ class PluginBlocktypePdf extends MaharaCoreBlocktype {
return array('fileimagevideo' => 8000); return array('fileimagevideo' => 8000);
} }
public static function get_viewtypes() {
return array('dashboard', 'portfolio', 'profile', 'grouphomepage');
}
public static function render_instance_export(BlockInstance $instance, $editing=false, $versioning=false, $exporting=null) { public static function render_instance_export(BlockInstance $instance, $editing=false, $versioning=false, $exporting=null) {
if ($exporting != 'pdf') { if ($exporting != 'pdf') {
return self::render_instance($instance, $editing, $versioning); return self::render_instance($instance, $editing, $versioning);
......
...@@ -12,5 +12,5 @@ ...@@ -12,5 +12,5 @@
defined('INTERNAL') || die(); defined('INTERNAL') || die();
$config = new stdClass(); $config = new stdClass();
$config->version = 2015020200; $config->version = 2021042900;
$config->release = '1.0.2'; $config->release = '1.0.3';
...@@ -25,6 +25,10 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype { ...@@ -25,6 +25,10 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
return array('internal' => 26000); return array('internal' => 26000);
} }
public static function get_viewtypes() {
return array('dashboard', 'portfolio', 'profile');
}
public static function get_css_icon_type($blockname) { public static function get_css_icon_type($blockname) {
return 'icon-regular'; return 'icon-regular';
} }
......
...@@ -12,5 +12,5 @@ ...@@ -12,5 +12,5 @@
defined('INTERNAL') || die(); defined('INTERNAL') || die();
$config = new stdClass(); $config = new stdClass();
$config->version = 2008040201; $config->version = 2021042900;
$config->release = '1.0.1'; $config->release = '1.0.2';
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