mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
"MDL-13766, repository settings page"
- Loading branch information
dongsheng
committed
Jul 28, 2008
1 parent
3efe78d
commit 19add4c
Showing
9 changed files
with
120 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php //$Id$ | ||
$string['repository'] = 'Repository'; | ||
$string['repositories'] = 'Repositories'; | ||
$string['manageuserrepository'] = 'Manage individual repository'; | ||
$string['plugin'] = 'Repository Plug-ins'; | ||
$string['settings'] = 'Settings'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
<?php | ||
$string['repositoryname'] = 'Box.net'; | ||
$string['repositorydesc'] = 'Repository for box.net'; | ||
$string['configplugin'] = 'Box.net configuration'; | ||
$string['username'] = 'Username for Box.net'; | ||
$string['password'] = 'Password'; | ||
$string['saved'] = 'Box.net data saved.'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php //$Id$ | ||
|
||
require_once(dirname(dirname(__FILE__)) . '/config.php'); | ||
require_once($CFG->dirroot . '/repository/lib.php'); | ||
|
||
$config = optional_param('config', 0, PARAM_INT); | ||
|
||
$course = optional_param('course', SITEID, PARAM_INT); | ||
|
||
if (! $course = $DB->get_record("course", array("id"=>$course))) { | ||
print_error('invalidcourseid'); | ||
} | ||
|
||
$user = $USER; | ||
$baseurl = $CFG->wwwroot . '/user/repository.php'; | ||
$namestr = get_string('name'); | ||
$fullname = fullname($user); | ||
$strrepos = get_string('repositories', 'repository'); | ||
$configstr = get_string('manageuserrepository', 'repository'); | ||
$pluginstr = get_string('plugin', 'repository'); | ||
|
||
require_login($course, false); | ||
|
||
$navlinks[] = array('name' => $fullname, 'link' => $CFG->wwwroot . '/user/view.php?id=' . $user->id, 'type' => 'misc'); | ||
$navlinks[] = array('name' => $strrepos, 'link' => null, 'type' => 'misc'); | ||
|
||
$navigation = build_navigation($navlinks); | ||
|
||
print_header("$course->fullname: $fullname: $strrepos", $course->fullname, | ||
$navigation, "", "", true, " ", navmenu($course)); | ||
|
||
$currenttab = 'repositories'; | ||
include('tabs.php'); | ||
|
||
print_heading($configstr); | ||
print_simple_box_start(); | ||
|
||
if (!$instances = repository_instances(true, false)) { | ||
print_error('noinstances', 'repository', $CFG->wwwroot . '/user/view.php'); | ||
} | ||
|
||
$table = new StdClass; | ||
$table->head = array($namestr, $pluginstr, ''); | ||
$table->data = array(); | ||
|
||
foreach ($instances as $i) { | ||
$path = '/repository/'.$i->repositorytype.'/settings.php'; | ||
$settings = file_exists($CFG->dirroot.$path); | ||
$table->data[] = array($i->repositoryname, $i->repositorytype, | ||
$settings ? '<a href="'.$CFG->wwwroot.$path.'">' | ||
.get_string('settings', 'repository').'</a>' : ''); | ||
} | ||
|
||
print_table($table); | ||
print_footer(); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters