public function __construct($params = array()) { parent::__construct($params); $comment = sprintf("#%s\n\n# Tests that the visibility of students/teachers enrolled in a course adheres to the FERPA controls and the\n# Student usage controls available at the block and admin level.\n\n# A set of %d scenarios.\n# These scenarios cover a minimal set of\n# the possible configurations for quickmail. Given 2 administrative settings with 3 options each, and 2 block-level\n# settings with 2 and 3 options each, there are a total of 3*3*3*2=54 configuration combinations.\n# Because settings at the administrative level override those at the block level, 29 of those can be removed,\n# leaving the 25 given in the test.\n\n# NB: Because of the additional complexity, the %s test does not account for the groups filter.", $this->file, count(QMConfig::allConfigs()), $this->file); $this->appendComment($comment); $this->addTag('ferpa'); $this->addTag('javascript'); }
if ($roles->selection[0] === 'No filter') { return true; } return in_array(Role::name($user->role), $roles->selection); }; $filtered = array_filter($allUsers, $filter); return array_diff_assoc($filtered, array($user->username => $user)); } } class groupsFilterFeature extends QMFeature { public function __construct($params = array()) { parent::__construct($params); $comment = sprintf("#%s", $this->file); $this->appendComment($comment); } } $featureParams = array('file' => "tests/behat/groupsFilter.feature", 'title' => "Ensure that the groups filter control behaves as intended."); $f = new QMFeature($featureParams); $f->addTag('ui'); $f->addTag('javascript'); $f->background = new QMBackground($f); $configs = QMConfig::getConfigs(); foreach ($configs as $c) { $s = new groupsFilterScenario(); $s->config = $c; $f->addScenario($s); } echo $f->string(); $f->toFile();