Commit 68ceb67f authored by Richard Mansfield's avatar Richard Mansfield
Browse files
parents b0f75c70 1e1e5262
......@@ -47,6 +47,8 @@ $form = array(
'title' => get_string('adminusers', 'admin'),
'defaultvalue' => $adminusers,
'filter' => false,
'lefttitle' => get_string('potentialadmins', 'admin'),
'righttitle' => get_string('currentadmins', 'admin'),
'rules' => array(
'required' => true
)
......
......@@ -45,7 +45,9 @@ $form = array(
'type' => 'userlist',
'title' => get_string('staffusers', 'admin'),
'defaultvalue' => $staffusers,
'filter' => false
'filter' => false,
'lefttitle' => get_string('potentialstaff', 'admin'),
'righttitle' => get_string('currentstaff', 'admin')
),
'submit' => array(
'type' => 'submit',
......
......@@ -256,7 +256,7 @@ class ArtefactTypeBlog extends ArtefactType {
return $smarty->fetch('artefact:blog:render/blog_renderfull.tpl');
}
protected function get_metadata() {
protected function get_metadata($options = array()) {
$data = parent::get_metadata();
$data['description'] = array('name' => get_string('description'),
'value' => $this->get('description'));
......@@ -264,12 +264,17 @@ class ArtefactTypeBlog extends ArtefactType {
$data['size'] = array('name' => get_string('size'),
'value' => $this->count_children() . ' '
. get_string('posts', 'artefact.blog'));
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;
}
protected function render_metadata($options) {
$smarty = smarty();
$smarty->assign('PROPERTIES', $this->get_metadata());
$smarty->assign('PROPERTIES', $this->get_metadata($options));
return $smarty->fetch('artefact:blog:render/blog_rendermetadata.tpl');
}
......
......@@ -294,6 +294,7 @@ $smarty = smarty(array('tablerenderer'));
$smarty->assign('INLINEJAVASCRIPT', $javascript);
$smarty->assign('member', $membership);
$smarty->assign('tutor', $tutor);
$smarty->assign('controlled', $controlled);
$smarty->assign('canjoin', $canjoin);
$smarty->assign('canrequestjoin', $canrequestjoin);
$smarty->assign('canleave', $canleave);
......
......@@ -301,6 +301,13 @@ MochiKit.Base.update(MochiKit.DOM, {
if (typeof(node) == 'undefined' || node === null) {
return null;
}
// this is a safari childNodes object, avoiding crashes w/ attr
// lookup
if (typeof(node) == "function" &&
typeof(node.length) == "number" &&
!(node instanceof Function)) {
node = im.list(node);
}
if (typeof(node.nodeType) != 'undefined' && node.nodeType > 0) {
return node;
}
......
......@@ -415,11 +415,19 @@ MochiKit.Base.update(MochiKit.Iter, {
/** @id MochiKit.Iter.list */
list: function (iterable) {
// Fast-path for Array and Array-like
var m = MochiKit.Base;
if (typeof(iterable.slice) == 'function') {
var rval;
if (iterable instanceof Array) {
return iterable.slice();
} else if (m.isArrayLike(iterable)) {
return m.concat(iterable);
}
// this is necessary to avoid a Safari crash
if (typeof(iterable) == "function" &&
!(iterable instanceof Function) &&
typeof(iterable.length) == 'number') {
rval = [];
for (var i = 0; i < iterable.length; i++) {
rval.push(iterable[i]);
}
return rval;
}
var self = MochiKit.Iter;
......
......@@ -244,3 +244,15 @@ MochiKit.Base.update(MochiKit.Position, {
return new MochiKit.Style.Coordinates(valueL, valueT);
}
});
MochiKit.Position.__new__ = function (win) {
var m = MochiKit.Base;
this.EXPORT_TAGS = {
':common': this.EXPORT,
':all': m.concat(this.EXPORT, this.EXPORT_OK)
};
m.nameFunctions(this);
};
MochiKit.Position.__new__(this);
\ No newline at end of file
......@@ -33,7 +33,7 @@ $string['typewatchlist'] = 'Watchlist';
$string['typenewview'] = 'New view';
$string['typecontactus'] = 'Contact us';
$string['typeobjectionable'] = 'Objectionable content';
$string['typevirusrepeat'] = 'Virus flat repeat';
$string['typevirusrepeat'] = 'Repeat virus upload';
$string['typevirusrelease'] = 'Virus flag release';
$string['typeadminmessages'] = 'Administration messages';
......
......@@ -77,6 +77,8 @@ $string['adminnotifications'] = 'Admin Notifications';
$string['adminnotificationsdescription'] = 'Configure how administrators receive system notifications';
$string['uploadcsv'] = 'Add Users by CSV';
$string['uploadcsvdescription'] = 'Upload a CSV file containing new users';
$string['usersearch'] = 'User Search';
$string['usersearchdescription'] = 'Search all users and perform administrative actions on them';
$string['pluginadmin'] = 'Plugin Administration';
$string['pluginadmindescription'] = 'Install and configure plugins';
......@@ -165,13 +167,14 @@ $string['uploadcsvusersaddedsuccessfully'] = 'The users in the file have been ad
// Admin Users
$string['adminuserspagedescription'] = '<p>Here you can choose which users are administrators for the site. The current administrators are listed on the right, and potential administrators are on the left.</p><p>The system must have at least one administrator.</p>';
$string['potentialadmins'] = 'Potential Admins';
$string['currentadmins'] = 'Current Admins';
$string['adminusersupdated'] = 'Admin users updated';
$string['usersearch'] = 'User Search';
$string['usersearchdescription'] = 'Search all users and perform administrative actions on them';
// Staff Users
$string['staffuserspagedescription'] = 'Here you can choose which users are staff for the site. The current staff are on the right, and potential staff are on the left.';
$string['potentialstaff'] = 'Potential Staff';
$string['currentstaff'] = 'Current Staff';
$string['staffusersupdated'] = 'Staff users updated';
// Admin Notifications
......@@ -193,6 +196,7 @@ $string['usersunsuspendedsuccessfully'] = 'Users unsuspended successfully';
$string['suspendingadmin'] = 'Suspending Admin';
// Institutions
$string['admininstitutions'] = 'Admininster Institutions';
$string['addinstitution'] = 'Add Institution';
$string['authplugin'] = 'Authentication plugin';
$string['defaultaccountinactiveexpire'] = 'Default account inactivity time';
......
......@@ -124,7 +124,7 @@ $string['login'] = 'Login';
$string['loginfailed'] = 'You have not provided the correct credentials to log in. Please check your username and password are correct.';
$string['loginto'] = 'Log in to %s';
$string['newpassword'] = 'New Password';
$string['oldpassword'] = 'Old Password';
$string['oldpassword'] = 'Current Password';
$string['password'] = 'Password';
$string['passworddescription'] = ' ';
$string['passwordhelp'] = 'The password you use to access the system';
......@@ -143,7 +143,7 @@ $string['yournewpassword'] = 'Your new password';
$string['yournewpasswordagain'] = 'Your new password again';
$string['invalidsesskey'] = 'Invalid session key';
$string['cantremovedefaultemail'] = 'You cannot remove your primary email address';
$string['mustspecifyoldpassword'] = 'You must specify your old password';
$string['mustspecifyoldpassword'] = 'You must specify your current password';
$string['captchatitle'] = 'CAPTCHA Image';
$string['captchadescription'] = 'Enter the characters you see in the picture to the right. Letters are not case sensitive';
$string['captchaincorrect'] = 'Enter the letters as they are shown in the image';
......@@ -163,7 +163,7 @@ $string['registeringdisallowed'] = 'Sorry, you cannot register for this system a
// Forgot password
$string['cantchangepassword'] = 'Sorry, you are unable to change your password through this interface - please use your institution\'s interface instead';
$string['forgotpassword'] = 'Forgotten your password?';
$string['forgotpasswordtext'] = 'Forgot your password? Enter your e-mail address here and we will send you a key you can use to give yourself a new password.';
$string['forgotpasswordtext'] = 'If you have forgotten your password, enter below the primary email address you have listed in your Profile and we will send you a key you can use to give yourself a new password';
$string['passwordreminder'] = 'Password Reminder';
$string['pwchangerequestsent'] = 'You should receive an e-mail shortly with a link you can use to change the password for your account';
$string['forgotpassemailsubject'] = 'Change password request for %s';
......
......@@ -424,4 +424,12 @@ function activity_set_defaults($user_id) {
}
function activity_process_queue() {
// stub for cronjob.
}
?>
......@@ -831,12 +831,14 @@
<SENTENCE TEXT="(callfunction, minute, hour, day, month, dayofweek)
VALUES ('rebuild_artefact_parent_cache_dirty', '*', '*', '*', '*', '*')" />
<SENTENCE TEXT="(callfunction, minute, hour, day, month, dayofweek)
VALUES ('rebuild_artefact_parent_cache_complete', '*', '4', '*', '*', '*')" />
VALUES ('rebuild_artefact_parent_cache_complete', '0', '4', '*', '*', '*')" />
<SENTENCE TEXT="(callfunction, minute, hour, day, month, dayofweek)
VALUES ('auth_clean_partial_registrations', '5', '0', '*', '*', '*')"/>
<SENTENCE TEXT="(callfunction, minute, hour, day, month, dayofweek)
VALUES ('auth_handle_account_expiries', '5', '10', '*', '*', '*')"/>
</SENTENCES>
<SENTENCE TEXT="(callfunction, minute, hour, day, month, dayofweek)
VALUES ('activity_process_queue', '*/5', '*', '*', '*', '*')"/>
</SENTENCES>
</STATEMENT>
<STATEMENT NAME="insert template categories" TYPE="insert" TABLE="template_category">
<SENTENCES>
......
......@@ -172,6 +172,15 @@ function xmldb_core_upgrade($oldversion=0) {
execute_sql('UPDATE ' . get_config('dbprefix') . 'usr SET quota=10485760');
}
if ($oldversion < 2007012300) {
// fix up a broken cron entry...
set_field('cron', 'minute', '0', 'callfunction', 'rebuild_artefact_parent_cache_complete');
$c = new StdClass;
$c->callfunction = 'activity_process_queue';
$c->minute = '*/5';
insert_record('cron', $c);
}
return $status;
}
......
......@@ -62,6 +62,13 @@ function pieform_element_userlist(Pieform $form, $element) {
$smarty->assign('filter', true);
}
if (!empty($element['lefttitle'])) {
$smarty->assign('lefttitle', $element['lefttitle']);
}
if (!empty($element['righttitle'])) {
$smarty->assign('righttitle', $element['righttitle']);
}
return $smarty->fetch('form/userlist.tpl');
}
......
......@@ -27,7 +27,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2007011600;
$config->version = 2007012300;
$config->release = '0.4.0';
$config->minupgradefrom = 2006121501;
$config->minupgraderelease = '0.1 (build tag BUILD_20061215)';
......
......@@ -3,7 +3,7 @@
{include file="columnfullstart.tpl"}
<h2>{str tag="adminusers" section="admin"}</h2>
<p>{str tag="adminusersdescription" section="admin"}</p>
<p>{str tag="adminuserspagedescription" section="admin"}</p>
{$adminusersform}
......
......@@ -2,7 +2,7 @@
{include file="columnfullstart.tpl"}
<h2>AdminInstitutions</h2>
<h2>{str tag="admininstitutions" section="admin"}</h2>
{if $delete_form}
<h3>{str tag="deleteinstitution" section="admin"}</h3>
......
......@@ -3,7 +3,7 @@
{include file="columnfullstart.tpl"}
<h2>{str tag="staffusers" section="admin"}</h2>
<p>{str tag="staffusersdescription" section="admin"}</p>
<p>{str tag="staffuserspagedescription" section="admin"}</p>
{$staffusersform}
......
......@@ -20,7 +20,7 @@
{if $member}
<div class="communityviews">
<h5>{str tag='views'}</h5>
{if $tutor}
{if $tutor && $controlled}
<form>
<select name="submitted" onChange="viewlist.submitted=this.options[this.selectedIndex].value;viewlist.doupdate();">
<option value="0">{str tag='allviews'}</option>
......
......@@ -86,10 +86,14 @@
swapDOM(
div,
LABEL(null,
INPUT({'type': 'radio', 'name': '{{$name}}_selected', 'value': email}),
INPUT({'type': 'hidden', 'name': '{{$name}}_valid[]' , 'value': email}),
' ' + email,
DIV(
{'class': 'validated'},
LABEL(null,
INPUT({'type': 'radio', 'name': '{{$name}}_selected', 'value': email}),
INPUT({'type': 'hidden', 'name': '{{$name}}_valid[]' , 'value': email}),
' ' + email
),
' ',
A({'href': '', 'onclick': '{{$name}}_remove(this); return false'}, '[x]')
)
);
......
Supports Markdown
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