Commit 4e8c70fc authored by Donal McMullan's avatar Donal McMullan
Browse files
parents 3a313918 a3fad41c
......@@ -35,6 +35,10 @@ require_once('pieforms/pieform.php');
$plugintype = param_alpha('plugintype');
$pluginname = param_alpha('pluginname');
define('SECTION_PLUGINTYPE', $plugintype);
define('SECTION_PLUGINNAME', $pluginname);
define('SECTION_PAGE', 'pluginconfig');
safe_require($plugintype, $pluginname);
if ($plugintype == 'artefact') {
$type = param_alpha('type');
......
......@@ -30,6 +30,9 @@ define('MENUITEM', 'configextensions');
define('SUBMENUITEM', 'pluginadmin');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('pluginadmin', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'plugins');
require('upgrade.php');
$plugins = array();
......
......@@ -31,6 +31,9 @@ define('MENUITEM', 'configextensions');
define('SUBMENUITEM', 'templatesadmin');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('templatesadmin', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'templates');
require_once(get_config('libroot') . 'template.php');
......
......@@ -28,6 +28,9 @@ define('INTERNAL', 1);
define('ADMIN', 1);
define('MENUITEM', 'configsite');
define('SUBMENUITEM', 'adminfiles');
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'adminfiles');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
safe_require('artefact', 'file');
......
......@@ -28,6 +28,11 @@ define('INTERNAL', 1);
define('ADMIN', 1);
define('MENUITEM', 'configsite');
define('SUBMENUITEM', 'sitemenu');
define('SUBMENUITEM', 'sitepages');
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'sitemenu');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('sitemenu', 'admin'));
......@@ -43,6 +48,7 @@ foreach ($adminstrings as $string) {
$getstring[$string] = "'" . get_string($string,'admin') . "'";
}
// TODO: this should be using json_encode
$thead = array(get_string('type','admin'),get_string('name','admin'),get_string('linkedto','admin'),'');
$ijs = "var thead = TR(null,map(partial(TH,null),['" . implode($thead,"','") . "']));\n";
$ijs .= "var externallink = '" . get_string('externallink','admin') . "';\n";
......@@ -87,7 +93,15 @@ function formatrow (item) {
del.onclick = function () { delitem(item.id); };
var edit = INPUT({'type':'button','class':'button','value':{$getstring['edit']}});
edit.onclick = function () { edititem(item); };
var cells = map(partial(TD,null),[type,item.name,linkedto,[del,edit]]);
var cells = map(
partial(TD,null),
[
type,
item.name,
linkedto,
[del,edit,contextualHelpIcon(null, null, 'core', 'admin', null, 'adminmenuedit')]
]
);
return TR({'id':'menuitem_'+item.id},cells);
}
......@@ -168,8 +182,8 @@ function editform(item) {
'value':item.linkedto});
setNodeAttribute(elink,'checked',true);
}
var radios = [DIV(null, LABEL(null,elink,{$getstring['externallink']})),
DIV(null, LABEL(null,afile,{$getstring['adminfile']}))];
var radios = [DIV(null, LABEL(null,elink,{$getstring['externallink']}), contextualHelpIcon(null, null, 'core', 'admin', null, 'adminexternallink')),
DIV(null, LABEL(null,afile,{$getstring['adminfile']}), contextualHelpIcon(null, null, 'core', 'admin', null, 'adminadminfile'))];
var row = TR({'id':'row'+item.id, 'class':rowtype},
map(partial(TD,null),[radios,name,linkedto,savecancel]));
return row;
......
......@@ -42,15 +42,18 @@ $yesno = array(true => get_string('yes'),
$searchpluginoptions = get_search_plugins();
$siteoptionform = pieform(array(
'name' => 'siteoptions',
'jsform' => true,
'renderer' => 'table',
'elements' => array(
'name' => 'siteoptions',
'jsform' => true,
'renderer' => 'table',
'plugintype' => 'core',
'pluginname' => 'admin',
'elements' => array(
'sitename' => array(
'type' => 'text',
'title' => get_string('sitename','admin'),
'description' => get_string('sitenamedescription','admin'),
'defaultvalue' => get_config('sitename'),
'help' => true,
),
'language' => array(
'type' => 'select',
......@@ -59,6 +62,7 @@ $siteoptionform = pieform(array(
'defaultvalue' => get_config('language'),
'collapseifoneoption' => true,
'options' => $langoptions,
'help' => true,
),
'theme' => array(
'type' => 'select',
......@@ -67,6 +71,7 @@ $siteoptionform = pieform(array(
'defaultvalue' => get_config('theme'),
'collapseifoneoption' => true,
'options' => $themeoptions,
'help' => true,
),
'searchplugin' => array(
'type' => 'select',
......@@ -75,24 +80,28 @@ $siteoptionform = pieform(array(
'defaultvalue' => get_config('searchplugin'),
'collapseifoneoption' => true,
'options' => $searchpluginoptions,
'help' => true,
),
'pathtofile' => array(
'type' => 'text',
'title' => get_string('pathtofile','admin'),
'description' => get_string('pathtofiledescription','admin'),
'defaultvalue' => get_config('pathtofile'),
'help' => true,
),
'viruschecking' => array(
'type' => 'checkbox',
'title' => get_string('viruschecking','admin'),
'description' => get_string('viruscheckingdescription','admin'),
'defaultvalue' => get_config('viruschecking'),
'help' => true,
),
'pathtoclam' => array(
'type' => 'text',
'title' => get_string('pathtoclam','admin'),
'description' => get_string('pathtoclamdescription','admin'),
'defaultvalue' => get_config('pathtoclam'),
'help' => true,
),
'sessionlifetime' => array(
'type' => 'text',
......@@ -100,6 +109,7 @@ $siteoptionform = pieform(array(
'title' => get_string('sessionlifetime','admin'),
'description' => get_string('sessionlifetimedescription','admin'),
'defaultvalue' => get_config('session_timeout') / 60,
'help' => true,
),
'allowpublicviews' => array(
'type' => 'select',
......@@ -107,12 +117,14 @@ $siteoptionform = pieform(array(
'description' => get_string('allowpublicviewsdescription','admin'),
'defaultvalue' => get_config('allowpublicviews'),
'options' => $yesno,
'help' => true,
),
'artefactviewinactivitytime' => array(
'type' => 'expiry',
'title' => get_string('artefactviewinactivitytime','admin'),
'description' => get_string('artefactviewinactivitytimedescription','admin'),
'defaultvalue' => get_config('artefactviewinactivitytime'),
'help' => true,
),
'submit' => array(
'type' => 'submit',
......
......@@ -28,6 +28,10 @@ define('INTERNAL', 1);
define('ADMIN', 1);
define('MENUITEM', 'configsite');
define('SUBMENUITEM', 'sitepages');
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'sitepages');
require(dirname(dirname(dirname(__FILE__))).'/init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('sitepages', 'admin'));
......
......@@ -32,6 +32,9 @@ define('MENUITEM', 'configusers');
define('SUBMENUITEM', 'adminusers');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('adminusers', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'adminusers');
require_once('pieforms/pieform.php');
$smarty = smarty();
......
......@@ -30,6 +30,9 @@ define('MENUITEM', 'configusers');
define('SUBMENUITEM', 'institutions');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('institutions', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'institutions');
require_once('pieforms/pieform.php');
$smarty = smarty();
......@@ -109,7 +112,8 @@ if ($institution || $add) {
'maxlength' => 255,
'regex' => '/^[a-zA-Z]+$/'
),
'ignore' => !$add
'ignore' => !$add,
'help' => true,
),
'add' => array(
'type' => 'hidden',
......@@ -128,39 +132,47 @@ if ($institution || $add) {
'rules' => array(
'required' => true,
'maxlength' => 255
)
),
'help' => true,
),
'authplugin' => array(
'type' => 'select',
'title' => get_string('authplugin', 'admin'),
'options' => get_records_menu('auth_installed', '', '', 'name', 'name, name')
'options' => get_records_menu('auth_installed', '', '', 'name', 'name, name'),
'help' => true,
),
'registerallowed' => array(
'type' => 'checkbox',
'title' => get_string('registrationallowed', 'admin'),
'description' => get_string('registrationalloweddescription', 'admin'),
'defaultvalue' => $data->registerallowed,
'help' => true,
),
'defaultaccountlifetime' => array(
'type' => 'expiry',
'title' => get_string('defaultaccountlifetime', 'admin'),
'description' => get_string('defaultaccountlifetimedescription', 'admin'),
'defaultvalue' => $data->defaultaccountlifetime
'defaultvalue' => $data->defaultaccountlifetime,
'help' => true,
),
'defaultaccountinactiveexpire' => array(
'type' => 'expiry',
'title' => get_string('defaultaccountinactiveexpire', 'admin'),
'description' => get_string('defaultaccountinactiveexpiredescription', 'admin'),
'defaultvalue' => $data->defaultaccountinactiveexpire
'defaultvalue' => $data->defaultaccountinactiveexpire,
'help' => true,
),
'defaultaccountinactivewarn' => array(
'type' => 'expiry',
'title' => get_string('defaultaccountinactivewarn', 'admin'),
'description' => get_string('defaultaccountinactivewarndescription', 'admin'),
'defaultvalue' => $data->defaultaccountinactivewarn
'defaultvalue' => $data->defaultaccountinactivewarn,
'help' => true,
),
'lockedfields' => array(
'value' => '<tr><th colspan="2">Locked fields</th></tr>'
'value' => '<tr><th colspan="2">Locked fields '
. get_help_icon('core', 'admin', 'institution', 'lockedfields')
. '</th></tr>'
)
);
......@@ -179,6 +191,8 @@ if ($institution || $add) {
$smarty->assign('institution_form', pieform(array(
'name' => 'institution',
'renderer' => 'table',
'plugintype' => 'core',
'pluginname' => 'admin',
'elements' => $elements
)));
......
......@@ -30,6 +30,9 @@ define('MENUITEM', 'configusers');
define('SUBMENUITEM', 'adminnotifications');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('adminnotifications', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'notifications');
require_once('pieforms/pieform.php');
......
......@@ -30,6 +30,9 @@ define('MENUITEM', 'configusers');
define('SUBMENUITEM', 'usersearch');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('usersearch', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'usersearch');
$query = param_variable('query',null);
......
......@@ -32,6 +32,9 @@ define('MENUITEM', 'configusers');
define('SUBMENUITEM', 'staffusers');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('staffusers', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'staffusers');
require_once('pieforms/pieform.php');
$smarty = smarty();
......
......@@ -30,6 +30,9 @@ define('MENUITEM', 'configusers');
define('SUBMENUITEM', 'suspendedusers');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('suspendedusers', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'suspendedusers');
require_once('pieforms/pieform.php');
$smarty = smarty(array('tablerenderer'));
......
<h3>Tags</h3>
<p>You can add Tags to Artefacts and Views you create within Mahara. Tags allow you add descriptive labels to Artefacts and Views and create an index of Tag classifications.</p>
<p>To associate multiple Tags to an Artefact or View, separate each Tag entry with a comma. For example – ‘Assessment, Semester 2, Management’.</p>
<p>Clicking on <b>Show my tags</b> will generate a list of those Tags you have previously used within your portfolio and the number of times they have been entered. Clicking on an existing Tag will add it to the Tag list for the Artefact or View you are currently creating or editing.</p>
<p>Using <b>Search My Portfolio</b> you can find all of the Artefacts and Views you have associated with a particular Tag, thereby creating a filing system or index for your portfolio.</p>
<h3>Tags</h3>
<p>You can add Tags to Artefacts and Views you create within Mahara. Tags allow you add descriptive labels to Artefacts and Views and create an index of Tag classifications.</p>
<p>To associate multiple Tags to an Artefact or View, separate each Tag entry with a comma. For example – ‘Assessment, Semester 2, Management’.</p>
<p>Clicking on <b>Show my tags</b> will generate a list of those Tags you have previously used within your portfolio and the number of times they have been entered. Clicking on an existing Tag will add it to the Tag list for the Artefact or View you are currently creating or editing.</p>
<p>Using <b>Search My Portfolio</b> you can find all of the Artefacts and Views you have associated with a particular Tag, thereby creating a filing system or index for your portfolio.</p>
<h3>Tags</h3>
<p>You can add Tags to Artefacts and Views you create within Mahara. Tags allow you add descriptive labels to Artefacts and Views and create an index of Tag classifications.</p>
<p>To associate multiple Tags to an Artefact or View, separate each Tag entry with a comma. For example – ‘Assessment, Semester 2, Management’.</p>
<p>Clicking on <b>Show my tags</b> will generate a list of those Tags you have previously used within your portfolio and the number of times they have been entered. Clicking on an existing Tag will add it to the Tag list for the Artefact or View you are currently creating or editing.</p>
<p>Using <b>Search My Portfolio</b> you can find all of the Artefacts and Views you have associated with a particular Tag, thereby creating a filing system or index for your portfolio.</p>
......@@ -564,6 +564,9 @@ class ArtefactTypeBlogPost extends ArtefactType {
$data['attachments'] = array('name' => get_string('attachments', 'artefact.blog'),
'value' => $this->count_attachments() . ' '
. get_string('files', 'artefact.file'));
if (isset($options['viewid']) && artefact_in_view($id = $this->get('id'), $options['viewid'])) {
$data['title']['value'] = '<a href="' . get_config('wwwroot') . 'view/view.php?view=' . $options['viewid'] . '&artefact=' . $id . '">' . $data['title']['value'] . '</a>';
}
return $data;
}
......
......@@ -62,6 +62,7 @@ $form = pieform(array(
'type' => 'tags',
'title' => get_string('tags'),
'description' => get_string('tagsdesc'),
'help' => true,
),
'commentsallowed' => array(
'type' => 'radio',
......
......@@ -125,6 +125,7 @@ $textinputform = pieform(array(
'type' => 'tags',
'title' => get_string('tags'),
'description' => get_string('tagsdesc'),
'help' => true,
),
)
));
......
......@@ -70,6 +70,7 @@ $form = pieform(array(
'type' => 'tags',
'title' => get_string('tags'),
'description' => get_string('tagsdesc'),
'help' => true,
),
'commentsallowed' => array(
'type' => 'radio',
......
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