$url = $CFG->wwwroot.'/'.$CFG->admin.'/repository.php';
$ADMIN->add('modules', new admin_category('repositorysettings', $catname));
$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_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', new admin_externalpage('repositorynew',
get_string('createrepository', 'repository'), $url, 'moodle/site:config', true),
<?php //$Id$
+$string['activerepository'] = 'Active repository plugins';
$string['add'] = 'Add';
$string['addplugin'] = 'Add a repository plugin';
$string['activaterep'] = 'Active repositories';
$string['attachment'] = 'Attachment';
$string['back'] = '< Back';
+$string['cacheexpire'] = 'Cache expire';
$string['close'] = 'Close';
$string['copying'] = 'Copying';
+$string['configcacheexpire'] = 'Configurate the cache expired time.';
$string['configsaved'] = 'Configuration saved!';
$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?';
function output_html($data, $query='') {
global $CFG, $USER;
- $output = print_box_start('','',true);
+ $output = print_box_start('generalbox','',true);
$namestr = get_string('name');
$stropt = get_string('operation', 'repository');
$updown = get_string('updown', 'repository');
}
$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";
-
+
// display up/down link
$updown = '';
-
+
if ($updowncount > 1) {
$updown .= "<a href=\"$this->baseurl&move=up&type=".$i->get_typename()."\">";
$updown .= "<img src=\"{$CFG->pixpath}/t/up.gif\" alt=\"up\" /></a> ";
else {
$updown .= "<img src=\"{$CFG->pixpath}/spacer.gif\" class=\"icon\" alt=\"\" />";
}
-
+
$updowncount++;
-
+
$table->data[] = array($i->get_readablename(), $updown,$row);
if (!in_array($i->get_typename(), $alreadyplugins)) {
$alreadyplugins[] = $i->get_typename();
}
$instancehtml .= '</ul>';
$instancehtml .= '</div>';
- if ($addable) {
+ if ($addable) {
$output .= $instancehtml;
}