Commit 86cb3d29 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1783042: Allowing some portfolio only blocks to be added to other pages



And handle how we configure / render them when not on normal portfolio
page

Change-Id: Ib5407a32b52edd0df4ecc2907f8a5c9455f7aa64
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 9614ed8b
...@@ -2553,8 +2553,8 @@ class ArtefactTypeProfileIcon extends ArtefactTypeImage { ...@@ -2553,8 +2553,8 @@ class ArtefactTypeProfileIcon extends ArtefactTypeImage {
} }
// No profile icon file selected. Go through fallback icons. // No profile icon file selected. Go through fallback icons.
// Look for an appropriate image on gravatar.com // Look for an appropriate image on gravatar.com if not 'root' user
$useremail = !empty($data) ? $data->email : false; $useremail = (!empty($data) && $userid !== 0) ? $data->email : false;
if ($useremail and $gravatarurl = remote_avatar_url($useremail, $size)) { if ($useremail and $gravatarurl = remote_avatar_url($useremail, $size)) {
redirect($gravatarurl); redirect($gravatarurl);
} }
......
...@@ -21,6 +21,6 @@ $string['useintroductioninstead'] = 'You can use your introduction profile field ...@@ -21,6 +21,6 @@ $string['useintroductioninstead'] = 'You can use your introduction profile field
$string['dontshowprofileicon'] = "Don't show a profile picture"; $string['dontshowprofileicon'] = "Don't show a profile picture";
$string['dontshowemail'] = "Don't show email address"; $string['dontshowemail'] = "Don't show email address";
$string['uploadaprofileicon'] = "You have no profile pictures. <a href=\"%sartefact/file/profileicons.php\">Upload one</a>."; $string['uploadaprofileicon'] = "You have no profile pictures. <a href=\"%sartefact/file/profileicons.php\">Upload one</a>.";
$string['noprofilesselectone'] = "No profile items selected";
$string['dontshowsocialprofiles'] = "Don't show social media accounts"; $string['dontshowsocialprofiles'] = "Don't show social media accounts";
$string['showsocialprofiles'] = "Show selected social media accounts"; $string['showsocialprofiles'] = "Show selected social media accounts";
...@@ -30,11 +30,12 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype { ...@@ -30,11 +30,12 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
} }
public static function render_instance(BlockInstance $instance, $editing=false) { public static function render_instance(BlockInstance $instance, $editing=false) {
require_once(get_config('docroot') . 'artefact/lib.php'); safe_require('artefact', 'internal');
$smarty = smarty_core(); $smarty = smarty_core();
$configdata = $instance->get('configdata'); $configdata = $instance->get('configdata');
$data = array(); $data = array();
$data['internalprofiles'] = array();
$data['socialprofiles'] = array(); $data['socialprofiles'] = array();
// add in the selected email address // add in the selected email address
...@@ -43,7 +44,7 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype { ...@@ -43,7 +44,7 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
} }
$viewowner = get_field('view', 'owner', 'id', $instance->get('view')); $viewowner = get_field('view', 'owner', 'id', $instance->get('view'));
$sortorder = array_keys(ArtefactTypeProfile::get_all_fields());
// Get data about the profile fields in this blockinstance // Get data about the profile fields in this blockinstance
if (!empty($configdata['artefactids'])) { if (!empty($configdata['artefactids'])) {
foreach ($configdata['artefactids'] as $id) { foreach ($configdata['artefactids'] as $id) {
...@@ -65,7 +66,16 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype { ...@@ -65,7 +66,16 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
} }
} }
else { else {
$data[$artefacttype] = $rendered['html']; if ($artefacttype == 'introduction') {
$data['introduction'] = $rendered['html'];
}
else {
$data['internalprofiles'][] = array(
'type' => $artefacttype,
'description' => $rendered['html'],
'order' => array_search($artefacttype, $sortorder),
);
}
} }
} }
} }
...@@ -76,6 +86,12 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype { ...@@ -76,6 +86,12 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
log_debug($e->getMessage()); log_debug($e->getMessage());
} }
} }
// Sort internal profiles by how they display on Content -> Profile page
$orders = array();
foreach ($data['internalprofiles'] as $key => $row) {
$orders[$key] = $row['order'];
}
array_multisort($orders, SORT_ASC, $data['internalprofiles']);
// Sort social profiles alphabetically (in ASC order) // Sort social profiles alphabetically (in ASC order)
$description = array(); $description = array();
foreach ($data['socialprofiles'] as $key => $row) { foreach ($data['socialprofiles'] as $key => $row) {
...@@ -83,15 +99,39 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype { ...@@ -83,15 +99,39 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
} }
array_multisort($description, SORT_ASC, $data['socialprofiles']); array_multisort($description, SORT_ASC, $data['socialprofiles']);
} }
else if ($editing && !empty($configdata['templateids'])) {
foreach ($configdata['templateids'] as $artefacttype) {
$data['internalprofiles'][] = array(
'type' => $artefacttype,
'description' => '',
'order' => array_search($artefacttype, $sortorder),
);
}
// Sort internal profiles by how they display on Content -> Profile page
$orders = array();
foreach ($data['internalprofiles'] as $key => $row) {
$orders[$key] = $row['order'];
}
array_multisort($orders, SORT_ASC, $data['internalprofiles']);
}
else if ($editing) {
$data['nodata'] = get_string('noprofilesselectone', 'blocktype.internal/profileinfo');
}
// Work out the path to the thumbnail for the profile image // Work out the path to the thumbnail for the profile image
if (!empty($configdata['profileicon'])) { if (!empty($configdata['profileicon'])) {
$downloadpath = get_config('wwwroot') . 'thumb.php?type=profileiconbyid&id=' . $configdata['profileicon'] . '&view=' . $instance->get('view'); if (!empty($configdata['templateids'])) {
$downloadpath .= '&maxwidth=80'; $downloadpath = get_config('wwwroot') . 'thumb.php?type=profileicon&id=0';
$smarty->assign('profileiconpath', $downloadpath); $smarty->assign('profileiconpath', $downloadpath);
$smarty->assign('profileiconalt', get_string('profileimagetext', 'mahara', display_default_name(get_user($viewowner)))); $smarty->assign('profileiconalt', get_string('profileimagetexttemplate', 'mahara'));
}
else {
$downloadpath = get_config('wwwroot') . 'thumb.php?type=profileiconbyid&id=' . $configdata['profileicon'] . '&view=' . $instance->get('view');
$downloadpath .= '&maxwidth=80';
$smarty->assign('profileiconpath', $downloadpath);
$smarty->assign('profileiconalt', get_string('profileimagetext', 'mahara', display_default_name(get_user($viewowner))));
}
} }
// Override the introduction text if the user has any for this // Override the introduction text if the user has any for this
// particular blockinstance // particular blockinstance
if (!empty($configdata['introtext'])) { if (!empty($configdata['introtext'])) {
...@@ -132,66 +172,93 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype { ...@@ -132,66 +172,93 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
$configdata = $instance->get('configdata'); $configdata = $instance->get('configdata');
$form = array(); $form = array();
$owner = $instance->get_view()->get('owner');
// Which fields does the user want if (!$owner) {
$form[] = self::artefactchooser_element((isset($configdata['artefactids'])) ? $configdata['artefactids'] : null); $configdata['artefactids'] = array();
if (isset($configdata['templateids']) && !empty($configdata['templateids'])) {
// Profile icon $element = self::artefactchooser_element(null, $owner);
if (!$result = get_records_sql_array('SELECT a.id, a.artefacttype, a.title, a.note foreach ($element['artefacttypes'] as $key => $type) {
FROM {artefact} a if (array_search($type, $configdata['templateids']) !== false) {
WHERE (artefacttype = \'profileicon\' OR artefacttype = \'email\') $configdata['artefactids'][] = $key;
AND a.owner = ( }
SELECT "owner" }
FROM {view} $configdata['templateids'] = array();
WHERE id = ? }
) $form['blocktemplatehtml'] = array(
ORDER BY a.id', array($instance->get('view')))) { 'type' => 'html',
$result = array(); 'value' => get_string('blockinstanceconfigownerchange', 'mahara'),
);
} }
// Which fields does the user want
$form[] = self::artefactchooser_element((isset($configdata['artefactids'])) ? $configdata['artefactids'] : null, $owner);
if ($owner) {
// Profile icon
if (!$result = get_records_sql_array('SELECT a.id, a.artefacttype, a.title, a.note
FROM {artefact} a
WHERE (artefacttype = \'profileicon\' OR artefacttype = \'email\')
AND a.owner = (
SELECT "owner"
FROM {view}
WHERE id = ?
)
ORDER BY a.id', array($instance->get('view')))) {
$result = array();
}
$iconoptions = array( $iconoptions = array(
0 => get_string('dontshowprofileicon', 'blocktype.internal/profileinfo'), 0 => get_string('dontshowprofileicon', 'blocktype.internal/profileinfo'),
); );
$emailoptions = array( $emailoptions = array(
0 => get_string('dontshowemail', 'blocktype.internal/profileinfo'), 0 => get_string('dontshowemail', 'blocktype.internal/profileinfo'),
); );
foreach ($result as $profilefield) { foreach ($result as $profilefield) {
if ($profilefield->artefacttype == 'profileicon') { if ($profilefield->artefacttype == 'profileicon') {
$iconoptions[$profilefield->id] = ($profilefield->title) ? $profilefield->title : $profilefield->note; $iconoptions[$profilefield->id] = ($profilefield->title) ? $profilefield->title : $profilefield->note;
}
else {
$emailoptions[$profilefield->id] = $profilefield->title;
}
}
if (count($iconoptions) == 1) {
$form['noprofileicon'] = array(
'type' => 'html',
'title' => get_string('profileicon', 'artefact.file'),
'description' => get_string('uploadaprofileicon', 'blocktype.internal/profileinfo', get_config('wwwroot')),
'value' => '',
);
$form['profileicon'] = array(
'type' => 'hidden',
'value' => 0,
);
} }
else { else {
$emailoptions[$profilefield->id] = $profilefield->title; $form['profileicon'] = array(
'type' => 'radio',
'title' => get_string('profileicon', 'artefact.file'),
'options' => $iconoptions,
'defaultvalue' => (isset($configdata['profileicon'])) ? $configdata['profileicon'] : 0,
);
} }
}
if (count($iconoptions) == 1) { $form['email'] = array(
$form['noprofileicon'] = array( 'type' => 'radio',
'type' => 'html', 'title' => get_string('email', 'artefact.internal'),
'title' => get_string('profileicon', 'artefact.file'), 'options' => $emailoptions,
'description' => get_string('uploadaprofileicon', 'blocktype.internal/profileinfo', get_config('wwwroot')), 'defaultvalue' => (isset($configdata['email'])) ? $configdata['email'] : 0,
'value' => '',
);
$form['profileicon'] = array(
'type' => 'hidden',
'value' => 0,
); );
} }
else { else {
$form['profileicon'] = array( $form['profileicon'] = array(
'type' => 'radio', 'title' => get_string('profileicon', 'artefact.file'),
'title' => get_string('profileicon', 'artefact.file'), 'type' => 'switchbox',
'options' => $iconoptions, 'defaultvalue' => (isset($configdata['profileicon'])) ? boolval($configdata['profileicon']) : 0,
'defaultvalue' => (isset($configdata['profileicon'])) ? $configdata['profileicon'] : 0, );
$form['blocktemplate'] = array(
'type' => 'hidden',
'value' => 1,
); );
} }
$form['email'] = array(
'type' => 'radio',
'title' => get_string('email', 'artefact.internal'),
'options' => $emailoptions,
'defaultvalue' => (isset($configdata['email'])) ? $configdata['email'] : 0,
);
// Introduction // Introduction
$form['introtext'] = array( $form['introtext'] = array(
'type' => 'wysiwyg', 'type' => 'wysiwyg',
...@@ -215,6 +282,19 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype { ...@@ -215,6 +282,19 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
else { else {
EmbeddedImage::delete_embedded_images('introtext', $instance->get('id')); EmbeddedImage::delete_embedded_images('introtext', $instance->get('id'));
} }
if (isset($values['blocktemplate']) && !empty($values['blocktemplate'])) {
// Need to adjust info to be a template
$owner = $instance->get_view()->get('owner');
$values['templateids'] = array();
$element = self::artefactchooser_element(null, $owner);
foreach ($element['artefacttypes'] as $key => $type) {
if (array_search($key, $values['artefactids']) !== false) {
$values['templateids'][] = $type;
}
}
$values['artefactids'] = array();
}
return $values; return $values;
} }
...@@ -223,9 +303,13 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype { ...@@ -223,9 +303,13 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
EmbeddedImage::delete_embedded_images('introtext', $instance->get('id')); EmbeddedImage::delete_embedded_images('introtext', $instance->get('id'));
} }
public static function artefactchooser_element($default=null) { public static function artefactchooser_element($default=null, $owner=true) {
safe_require('artefact', 'internal'); safe_require('artefact', 'internal');
$artefacttypes = array_diff(PluginArtefactInternal::get_profile_artefact_types(), array('email')); $artefacttypes = PluginArtefactInternal::get_profile_artefact_types();
if ($owner) {
$artefacttypes = array_diff($artefacttypes, array('email'));
}
if (!get_record('blocktype_installed', 'active', 1, 'name', 'socialprofile')) { if (!get_record('blocktype_installed', 'active', 1, 'name', 'socialprofile')) {
$artefacttypes = array_diff($artefacttypes, array('socialprofile')); $artefacttypes = array_diff($artefacttypes, array('socialprofile'));
} }
...@@ -236,6 +320,7 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype { ...@@ -236,6 +320,7 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
'title' => get_string('fieldstoshow', 'blocktype.internal/profileinfo'), 'title' => get_string('fieldstoshow', 'blocktype.internal/profileinfo'),
'defaultvalue' => $default, 'defaultvalue' => $default,
'blocktype' => 'profileinfo', 'blocktype' => 'profileinfo',
'blocktemplate' => empty($owner),
'limit' => 655360, // 640K profile fields is enough for anyone! 'limit' => 655360, // 640K profile fields is enough for anyone!
'selectone' => false, 'selectone' => false,
'search' => false, 'search' => false,
...@@ -281,9 +366,29 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype { ...@@ -281,9 +366,29 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
if (!get_record('blocktype_installed', 'active', 1, 'name', 'socialprofile')) { if (!get_record('blocktype_installed', 'active', 1, 'name', 'socialprofile')) {
$artefacttypes = array_diff($artefacttypes, array('socialprofile')); $artefacttypes = array_diff($artefacttypes, array('socialprofile'));
} }
$artefactids = get_column_sql(' if (!empty($configdata['blocktemplate'])) {
SELECT a.id FROM {artefact} a if (!empty($configdata['templateids'])) {
WHERE a.owner = ? AND a.artefacttype IN (' . join(',', array_map('db_quote', $artefacttypes)) . ')', array($view->get('owner'))); $artefactids = get_column_sql('
SELECT a.id FROM {artefact} a
WHERE a.owner = ? AND a.artefacttype != ? AND a.artefacttype IN (' . join(',', array_map('db_quote', $configdata['templateids'])) . ')', array($view->get('owner'), 'email'));
if (in_array('email', $configdata['templateids'])) {
if ($newemail = get_field('artefact_internal_profile_email', 'artefact', 'principal', 1, 'owner', $view->get('owner'))) {
$configdata['email'] = $newemail;
}
}
}
else {
$artefactids = array();
}
unset($configdata['blocktemplatehtml']);
unset($configdata['templateids']);
unset($configdata['blocktemplate']);
}
else {
$artefactids = get_column_sql('
SELECT a.id FROM {artefact} a
WHERE a.owner = ? AND a.artefacttype IN (' . join(',', array_map('db_quote', $artefacttypes)) . ')', array($view->get('owner')));
}
$configdata['artefactids'] = $artefactids; $configdata['artefactids'] = $artefactids;
if (isset($configdata['email'])) { if (isset($configdata['email'])) {
if ($newemail = get_field('artefact_internal_profile_email', 'artefact', 'principal', 1, 'owner', $view->get('owner'))) { if ($newemail = get_field('artefact_internal_profile_email', 'artefact', 'principal', 1, 'owner', $view->get('owner'))) {
...@@ -317,7 +422,7 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype { ...@@ -317,7 +422,7 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
* there's no such thing as group/site profiles * there's no such thing as group/site profiles
*/ */
public static function allowed_in_view(View $view) { public static function allowed_in_view(View $view) {
return $view->get('owner') != null; return true;
} }
/** /**
......
...@@ -23,3 +23,4 @@ $string['optiontexticon'] = 'buttons with icons and text'; ...@@ -23,3 +23,4 @@ $string['optiontexticon'] = 'buttons with icons and text';
$string['optiontextonly'] = 'buttons with text only'; $string['optiontextonly'] = 'buttons with text only';
$string['displaydefaultemail'] = 'Display default email link as button?'; $string['displaydefaultemail'] = 'Display default email link as button?';
$string['displaymsgservices'] = 'Display messaging services as buttons?'; $string['displaymsgservices'] = 'Display messaging services as buttons?';
$string['noitemsselectone'] = 'No social media selected';
...@@ -32,35 +32,46 @@ class PluginBlocktypeSocialprofile extends MaharaCoreBlocktype { ...@@ -32,35 +32,46 @@ class PluginBlocktypeSocialprofile extends MaharaCoreBlocktype {
$type = (isset($configdata['displaytype']) ? $configdata['displaytype'] : 'texticon'); $type = (isset($configdata['displaytype']) ? $configdata['displaytype'] : 'texticon');
$showicon = ($type == 'icononly' || $type == 'texticon' ? true : false); $showicon = ($type == 'icononly' || $type == 'texticon' ? true : false);
$showtext = ($type == 'textonly' || $type == 'texticon' ? true : false); $showtext = ($type == 'textonly' || $type == 'texticon' ? true : false);
$owner = $instance->get('view_obj')->get('owner'); $owner = $instance->get_view()->get('owner');
// Whether to include email button // Whether to include email button
if (isset($configdata['displayemail']) && $configdata['displayemail']) { if (isset($configdata['displayemail']) && $configdata['displayemail'] && $owner) {
$email = get_field('artefact_internal_profile_email', 'email', 'principal', 1, 'owner', $owner); $email = get_field('artefact_internal_profile_email', 'email', 'principal', 1, 'owner', $owner);
} }
else if (isset($configdata['displayemail']) && $configdata['displayemail']) {
$email = true;
}
else { else {
$email = false; $email = false;
} }
if (!isset($configdata['artefactids']) || empty($configdata['artefactids'])) { $data = array();
// When we first come into this block, it will have $smarty = smarty_core();
// no social profiles configured yet. if (isset($configdata['artefactids']) && !empty($configdata['artefactids'])) {
$configdata['artefactids'] = array(0); // Include selected social profiles
$sql = 'SELECT title, description, note FROM {artefact}
WHERE id IN (' . join(',', $configdata['artefactids']) . ')
AND owner = ? AND artefacttype = ?
ORDER BY description ASC';
$artefactdata = get_records_sql_array($sql, array($owner, 'socialprofile'));
$data = !empty($artefactdata) ? $artefactdata : $data;
} }
else if ($editing && !empty($configdata['templateids'])) {
// Include selected social profiles foreach ($configdata['templateids'] as $socialtype) {
$sql = 'SELECT title, description, note FROM {artefact} $stype = new stdClass();
WHERE id IN (' . join(',', $configdata['artefactids']) . ') $stype->title = '';
AND owner = ? AND artefacttype = ? $stype->description = get_string($socialtype, 'artefact.internal');
ORDER BY description ASC'; $stype->note = $socialtype;
$data[] = $stype;
if (!$data = get_records_sql_array($sql, array($owner, 'socialprofile'))) { }
$data = array(); }
else if ($editing && !$email) {
$smarty->assign('editing', $editing);
$smarty->assign('noitems', get_string('noitemsselectone', 'blocktype.internal/socialprofile'));
} }
safe_require('artefact', 'internal'); safe_require('artefact', 'internal');
$data = ArtefactTypeSocialprofile::get_profile_icons($data); $data = ArtefactTypeSocialprofile::get_profile_icons($data);
$smarty = smarty_core();
$smarty->assign('showicon', $showicon); $smarty->assign('showicon', $showicon);
$smarty->assign('showtext', $showtext); $smarty->assign('showtext', $showtext);
$smarty->assign('profiles', $data); $smarty->assign('profiles', $data);
...@@ -75,11 +86,30 @@ class PluginBlocktypeSocialprofile extends MaharaCoreBlocktype { ...@@ -75,11 +86,30 @@ class PluginBlocktypeSocialprofile extends MaharaCoreBlocktype {
public static function instance_config_form(BlockInstance $instance) { public static function instance_config_form(BlockInstance $instance) {
$configdata = $instance->get('configdata'); $configdata = $instance->get('configdata');
$owner = $instance->get_view()->get('owner');
$form = array(); $form = array();
if (!$owner) {
$configdata['artefactids'] = array();
if (isset($configdata['templateids']) && !empty($configdata['templateids'])) {
$element = self::artefactchooser_element(null, $owner);
foreach ($element['artefacttypes'] as $key => $type) {
if (array_search($type, $configdata['templateids']) !== false) {
$configdata['artefactids'][] = $key;
}
}
$configdata['templateids'] = array();
}
$form['blocktemplatehtml'] = array(
'type' => 'html',
'value' => get_string('blockinstanceconfigownerchange', 'mahara'),
);
$form['blocktemplate'] = array(
'type' => 'hidden',
'value' => 1,
);
}
// Which social profiles does the user want // Which social profiles does the user want
$form[] = self::artefactchooser_element((isset($configdata['artefactids'])) ? $configdata['artefactids'] : null); $form[] = self::artefactchooser_element((isset($configdata['artefactids'])) ? $configdata['artefactids'] : null, $owner);
$form['settings'] = array( $form['settings'] = array(
'type' => 'fieldset', 'type' => 'fieldset',
...@@ -109,22 +139,68 @@ class PluginBlocktypeSocialprofile extends MaharaCoreBlocktype { ...@@ -109,22 +139,68 @@ class PluginBlocktypeSocialprofile extends MaharaCoreBlocktype {
return $form; return $form;
} }
public static function artefactchooser_element($default=null) { public static function instance_config_save($values, $instance) {
if (isset($values['blocktemplate']) && !empty($values['blocktemplate'])) {
// Need to adjust info to be a template
$owner = $instance->get_view()->get('owner');
$values['templateids'] = array();
$element = self::artefactchooser_element(null, $owner);
foreach ($element['artefacttypes'] as $key => $type) {
if (array_search($key, $values['artefactids']) !== false) {
$values['templateids'][] = $type;
}
}
$values['artefactids'] = array();
}
return $values;
}
public static function artefactchooser_element($default=null, $owner=true) {
safe_require('artefact', 'internal'); safe_require('artefact', 'internal');
if (!$owner) {
$artefacttypes = ArtefactTypeSocialprofile::$socialnetworks;
}
else {
$artefacttypes = array('socialprofile');
}
return array( return array(
'name' => 'artefactids', 'name' => 'artefactids',
'type' => 'artefactchooser',