Skip to content

Commit

Permalink
MDL-18238 Reverting
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Feb 17, 2009
1 parent 82b9048 commit 5af4028
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions grade/edit/settings/form.php
Expand Up @@ -32,13 +32,11 @@
class course_settings_form extends moodleform {

function definition() {
global $USER, $CFG, $COURSE;
global $USER, $CFG;

$mform =& $this->_form;

$systemcontext = get_context_instance(CONTEXT_SYSTEM);
$context = get_context_instance(CONTEXT_COURSE, $COURSE->id);

$can_view_admin_links = false;
if (has_capability('moodle/grade:manage', $systemcontext)) {
$can_view_admin_links = true;
Expand Down Expand Up @@ -104,7 +102,7 @@ function definition() {
foreach($types as $type) {
foreach (get_list_of_plugins('grade/'.$type) as $plugin) {
// Include all the settings commands for this plugin if there are any
if (file_exists($CFG->dirroot.'/grade/'.$type.'/'.$plugin.'/lib.php') && has_capability('gradereport/'.$plugin.':view', $context)) {
if (file_exists($CFG->dirroot.'/grade/'.$type.'/'.$plugin.'/lib.php')) {
require_once($CFG->dirroot.'/grade/'.$type.'/'.$plugin.'/lib.php');
$functionname = 'grade_'.$type.'_'.$plugin.'_settings_definition';
if (function_exists($functionname)) {
Expand Down

0 comments on commit 5af4028

Please sign in to comment.