Skip to content

Commit

Permalink
MDL-24101 hide groupmembersonly options when feature disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Sep 6, 2010
1 parent 66556e7 commit 36f3228
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions course/moodleform_mod.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected function init_features() {
$this->_features = new object();
$this->_features->groups = plugin_supports('mod', $this->_modname, FEATURE_GROUPS, true);
$this->_features->groupings = plugin_supports('mod', $this->_modname, FEATURE_GROUPINGS, false);
$this->_features->groupmembersonly = plugin_supports('mod', $this->_modname, FEATURE_GROUPMEMBERSONLY, false);
$this->_features->groupmembersonly = (!empty($CFG->enablegroupmembersonly) and plugin_supports('mod', $this->_modname, FEATURE_GROUPMEMBERSONLY, false));
$this->_features->outcomes = (!empty($CFG->enableoutcomes) and plugin_supports('mod', $this->_modname, FEATURE_GRADE_OUTCOMES, true));
$this->_features->hasgrades = plugin_supports('mod', $this->_modname, FEATURE_GRADE_HAS_GRADE, false);
$this->_features->idnumber = plugin_supports('mod', $this->_modname, FEATURE_IDNUMBER, true);
Expand Down Expand Up @@ -346,7 +346,7 @@ function standard_coursemodule_elements(){
}
}


if ($this->_features->rating) {
require_once($CFG->dirroot.'/rating/lib.php');
$rm = new rating_manager();
Expand Down

0 comments on commit 36f3228

Please sign in to comment.