Merge branch 'MDL-41507-master' of git://github.com/rezaies/moodle

This commit is contained in:
Jun Pataleta 2018-12-12 11:18:02 +08:00
commit ca6824e284
3 changed files with 3 additions and 3 deletions

View File

@ -2003,7 +2003,7 @@ function course_get_cm_edit_actions(cm_info $mod, $indent = -1, $sr = null) {
// Groupmode.
if ($hasmanageactivities && !$mod->coursegroupmodeforce) {
if (plugin_supports('mod', $mod->modname, FEATURE_GROUPS, 0)) {
if (plugin_supports('mod', $mod->modname, FEATURE_GROUPS, false)) {
if ($mod->effectivegroupmode == SEPARATEGROUPS) {
$nextgroupmode = VISIBLEGROUPS;
$grouptitle = $str->groupsseparate;

View File

@ -170,7 +170,7 @@ abstract class moodleform_mod extends moodleform {
global $CFG;
$this->_features = new stdClass();
$this->_features->groups = plugin_supports('mod', $this->_modname, FEATURE_GROUPS, true);
$this->_features->groups = plugin_supports('mod', $this->_modname, FEATURE_GROUPS, false);
$this->_features->groupings = plugin_supports('mod', $this->_modname, FEATURE_GROUPINGS, 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);

View File

@ -1575,7 +1575,7 @@ class cm_info implements IteratorAggregate {
$groupmode = $this->groupmode;
if ($this->modinfo->get_course()->groupmodeforce) {
$groupmode = $this->modinfo->get_course()->groupmode;
if ($groupmode != NOGROUPS && !plugin_supports('mod', $this->modname, FEATURE_GROUPS, 0)) {
if ($groupmode != NOGROUPS && !plugin_supports('mod', $this->modname, FEATURE_GROUPS, false)) {
$groupmode = NOGROUPS;
}
}