MDL-26778 Completion unit tests broken by earlier change

This commit is contained in:
sam marshall
2011-05-05 12:10:27 +01:00
parent 156816d0b5
commit 1cec45f1c0
+2 -2
View File
@@ -603,8 +603,8 @@ class completion_info {
* @return void
*/
public function set_module_viewed($cm, $userid=0) {
global $PAGE;
if ($PAGE->headerprinted) {
global $PAGE, $UNITTEST;
if ($PAGE->headerprinted && empty($UNITTEST->running)) {
debugging('set_module_viewed must be called before header is printed',
DEBUG_DEVELOPER);
}