From 955d91c6984a886093d0631b4b64886841b84e22 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Wed, 14 Aug 2013 14:55:36 +1000 Subject: [PATCH] MDL-41181 No need to reset modinfo cache after moveto_module() it is already reset inside the function --- course/tests/courselib_test.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/course/tests/courselib_test.php b/course/tests/courselib_test.php index 01c4bfc697c..5a543dace0c 100644 --- a/course/tests/courselib_test.php +++ b/course/tests/courselib_test.php @@ -856,8 +856,6 @@ class core_course_courselib_testcase extends advanced_testcase { // Perform the move moveto_module($cm, $newsection); - // reset of get_fast_modinfo is usually called the code calling moveto_module so call it here - get_fast_modinfo(0, 0, true); $cms = get_fast_modinfo($course)->get_cms(); $cm = reset($cms); @@ -886,8 +884,6 @@ class core_course_courselib_testcase extends advanced_testcase { $result = moveto_module($cm, $newsection); $this->assertTrue($result); - // reset of get_fast_modinfo is usually called the code calling moveto_module so call it here - get_fast_modinfo(0, 0, true); $cms = get_fast_modinfo($course)->get_cms(); $cm = reset($cms); @@ -1201,9 +1197,6 @@ class core_course_courselib_testcase extends advanced_testcase { moveto_module($forumcm, $hiddensection); moveto_module($pagecm, $hiddensection); - // Reset modinfo cache. - get_fast_modinfo(0, 0, true); - $modinfo = get_fast_modinfo($course); // Verify that forum and page have been moved to the hidden section and quiz has not. @@ -1232,8 +1225,6 @@ class core_course_courselib_testcase extends advanced_testcase { moveto_module($forumcm, $visiblesection); moveto_module($pagecm, $visiblesection); - // Reset modinfo cache. - get_fast_modinfo(0, 0, true); $modinfo = get_fast_modinfo($course); // Verify that forum has been made visible. @@ -1247,9 +1238,6 @@ class core_course_courselib_testcase extends advanced_testcase { // Move the page in the same section (this is what mod duplicate does_ moveto_module($pagecm, $visiblesection, $forumcm); - // Reset modinfo cache. - get_fast_modinfo(0, 0, true); - // Verify that the the page is still hidden $modinfo = get_fast_modinfo($course); $pagecm = $modinfo->cms[$page->cmid]; @@ -1291,9 +1279,6 @@ class core_course_courselib_testcase extends advanced_testcase { // Move the forum and the page to a hidden section. moveto_module($pagecm, $section, $forumcm); - // Reset modinfo cache. - get_fast_modinfo(0, 0, true); - // Verify that the the page is still hidden $modinfo = get_fast_modinfo($course); $pagecm = $modinfo->cms[$page->cmid]; -- 2.43.0