mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-15402: add repository_cache_expire common option
This commit is contained in:
parent
8f95b06aab
commit
5a8ca18789
3 changed files with 12 additions and 6 deletions
|
@ -183,7 +183,10 @@ if ($hassiteconfig) {
|
||||||
$url = $CFG->wwwroot.'/'.$CFG->admin.'/repository.php';
|
$url = $CFG->wwwroot.'/'.$CFG->admin.'/repository.php';
|
||||||
$ADMIN->add('modules', new admin_category('repositorysettings', $catname));
|
$ADMIN->add('modules', new admin_category('repositorysettings', $catname));
|
||||||
$temp = new admin_settingpage('managerepositories', $managerepo);
|
$temp = new admin_settingpage('managerepositories', $managerepo);
|
||||||
|
$temp->add(new admin_setting_heading('managerepositories', get_string('activerepository', 'repository'), ''));
|
||||||
$temp->add(new admin_setting_managerepository());
|
$temp->add(new admin_setting_managerepository());
|
||||||
|
$temp->add(new admin_setting_heading('managerepositoriescommonheading', get_string('commonsettings', 'admin'), ''));
|
||||||
|
$temp->add(new admin_setting_configtext('repository_cache_expire', get_string('cacheexpire', 'repository'), get_string('configcacheexpire', 'repository'), 0));
|
||||||
$ADMIN->add('repositorysettings', $temp);
|
$ADMIN->add('repositorysettings', $temp);
|
||||||
$ADMIN->add('repositorysettings', new admin_externalpage('repositorynew',
|
$ADMIN->add('repositorysettings', new admin_externalpage('repositorynew',
|
||||||
get_string('createrepository', 'repository'), $url, 'moodle/site:config', true),
|
get_string('createrepository', 'repository'), $url, 'moodle/site:config', true),
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
<?php //$Id$
|
<?php //$Id$
|
||||||
|
$string['activerepository'] = 'Active repository plugins';
|
||||||
$string['add'] = 'Add';
|
$string['add'] = 'Add';
|
||||||
$string['addplugin'] = 'Add a repository plugin';
|
$string['addplugin'] = 'Add a repository plugin';
|
||||||
$string['activaterep'] = 'Active repositories';
|
$string['activaterep'] = 'Active repositories';
|
||||||
$string['attachment'] = 'Attachment';
|
$string['attachment'] = 'Attachment';
|
||||||
$string['back'] = '< Back';
|
$string['back'] = '< Back';
|
||||||
|
$string['cacheexpire'] = 'Cache expire';
|
||||||
$string['close'] = 'Close';
|
$string['close'] = 'Close';
|
||||||
$string['copying'] = 'Copying';
|
$string['copying'] = 'Copying';
|
||||||
|
$string['configcacheexpire'] = 'Configurate the cache expired time.';
|
||||||
$string['configsaved'] = 'Configuration saved!';
|
$string['configsaved'] = 'Configuration saved!';
|
||||||
$string['confirmdelete'] = 'Are you sure you want to delete this repository - $a?';
|
$string['confirmdelete'] = 'Are you sure you want to delete this repository - $a?';
|
||||||
$string['confirmremove'] = 'Are you sure you want to remove this repository plugin - $a?';
|
$string['confirmremove'] = 'Are you sure you want to remove this repository plugin - $a?';
|
||||||
|
|
|
@ -5578,7 +5578,7 @@ class admin_setting_managerepository extends admin_setting {
|
||||||
|
|
||||||
function output_html($data, $query='') {
|
function output_html($data, $query='') {
|
||||||
global $CFG, $USER;
|
global $CFG, $USER;
|
||||||
$output = print_box_start('','',true);
|
$output = print_box_start('generalbox','',true);
|
||||||
$namestr = get_string('name');
|
$namestr = get_string('name');
|
||||||
$stropt = get_string('operation', 'repository');
|
$stropt = get_string('operation', 'repository');
|
||||||
$updown = get_string('updown', 'repository');
|
$updown = get_string('updown', 'repository');
|
||||||
|
@ -5601,10 +5601,10 @@ class admin_setting_managerepository extends admin_setting {
|
||||||
}
|
}
|
||||||
$row .= '<a href="' . $this->baseurl . '&delete=' . $i->get_typename() . '"><img src="' . $CFG->pixpath . '/t/delete.gif" alt="' . get_string('delete') . '" /></a>' . "\n";
|
$row .= '<a href="' . $this->baseurl . '&delete=' . $i->get_typename() . '"><img src="' . $CFG->pixpath . '/t/delete.gif" alt="' . get_string('delete') . '" /></a>' . "\n";
|
||||||
$row .= ' <a href="' . $this->baseurl . '&hide=' . $i->get_typename() . '"><img src="' . $CFG->pixpath . '/t/' . ($i->get_visible() ? 'hide' : 'show') . '.gif" alt="' . get_string($i->get_visible() ? 'hide' : 'show') . '" /></a>' . "\n";
|
$row .= ' <a href="' . $this->baseurl . '&hide=' . $i->get_typename() . '"><img src="' . $CFG->pixpath . '/t/' . ($i->get_visible() ? 'hide' : 'show') . '.gif" alt="' . get_string($i->get_visible() ? 'hide' : 'show') . '" /></a>' . "\n";
|
||||||
|
|
||||||
// display up/down link
|
// display up/down link
|
||||||
$updown = '';
|
$updown = '';
|
||||||
|
|
||||||
if ($updowncount > 1) {
|
if ($updowncount > 1) {
|
||||||
$updown .= "<a href=\"$this->baseurl&move=up&type=".$i->get_typename()."\">";
|
$updown .= "<a href=\"$this->baseurl&move=up&type=".$i->get_typename()."\">";
|
||||||
$updown .= "<img src=\"{$CFG->pixpath}/t/up.gif\" alt=\"up\" /></a> ";
|
$updown .= "<img src=\"{$CFG->pixpath}/t/up.gif\" alt=\"up\" /></a> ";
|
||||||
|
@ -5619,9 +5619,9 @@ class admin_setting_managerepository extends admin_setting {
|
||||||
else {
|
else {
|
||||||
$updown .= "<img src=\"{$CFG->pixpath}/spacer.gif\" class=\"icon\" alt=\"\" />";
|
$updown .= "<img src=\"{$CFG->pixpath}/spacer.gif\" class=\"icon\" alt=\"\" />";
|
||||||
}
|
}
|
||||||
|
|
||||||
$updowncount++;
|
$updowncount++;
|
||||||
|
|
||||||
$table->data[] = array($i->get_readablename(), $updown,$row);
|
$table->data[] = array($i->get_readablename(), $updown,$row);
|
||||||
if (!in_array($i->get_typename(), $alreadyplugins)) {
|
if (!in_array($i->get_typename(), $alreadyplugins)) {
|
||||||
$alreadyplugins[] = $i->get_typename();
|
$alreadyplugins[] = $i->get_typename();
|
||||||
|
@ -5644,7 +5644,7 @@ class admin_setting_managerepository extends admin_setting {
|
||||||
}
|
}
|
||||||
$instancehtml .= '</ul>';
|
$instancehtml .= '</ul>';
|
||||||
$instancehtml .= '</div>';
|
$instancehtml .= '</div>';
|
||||||
if ($addable) {
|
if ($addable) {
|
||||||
$output .= $instancehtml;
|
$output .= $instancehtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue