Skip to content
Browse files

MDL-26778 Completion unit tests broken by earlier change

  • Loading branch information...
1 parent 156816d commit 1cec45f1c07733058a7eb16e5ca7e6534289e978 @sammarshallou sammarshallou committed May 5, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/completionlib.php
View
4 lib/completionlib.php
@@ -603,8 +603,8 @@ function internal_get_state($cm, $userid, $current) {
* @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);
}

0 comments on commit 1cec45f

Please sign in to comment.
Something went wrong with that request. Please try again.