MDL-54007 mod_assign: Limit unit tests to core plugins
Without this change, the unit tests make assumptions for the output of mod_assign functions/webservices that do not hold true when 3rd party submission and feedback plugins are installed.
This commit is contained in:
committed by
Andrew Nicols
parent
c12a862c95
commit
2efd5adc61
@@ -2382,8 +2382,12 @@ Anchor link 2:<a title=\"bananas\" href=\"../logo-240x60.gif\">Link text</a>
|
||||
|
||||
// Test that all the submission and feedback plugins are returning the expected file aras.
|
||||
$usingfilearea = 0;
|
||||
$coreplugins = core_plugin_manager::standard_plugins_list('assignsubmission');
|
||||
foreach ($assign->get_submission_plugins() as $plugin) {
|
||||
$type = $plugin->get_type();
|
||||
if (!in_array($type, $coreplugins)) {
|
||||
continue;
|
||||
}
|
||||
$fileareas = $plugin->get_file_areas();
|
||||
|
||||
if ($type == 'onlinetext') {
|
||||
@@ -2399,8 +2403,12 @@ Anchor link 2:<a title=\"bananas\" href=\"../logo-240x60.gif\">Link text</a>
|
||||
$this->assertEquals(2, $usingfilearea);
|
||||
|
||||
$usingfilearea = 0;
|
||||
$coreplugins = core_plugin_manager::standard_plugins_list('assignfeedback');
|
||||
foreach ($assign->get_feedback_plugins() as $plugin) {
|
||||
$type = $plugin->get_type();
|
||||
if (!in_array($type, $coreplugins)) {
|
||||
continue;
|
||||
}
|
||||
$fileareas = $plugin->get_file_areas();
|
||||
|
||||
if ($type == 'editpdf') {
|
||||
|
||||
Reference in New Issue
Block a user