Permalink
Browse files

MDL-26778 Completion unit tests broken by earlier change

  • Loading branch information...
1 parent 8351ce1 commit a09897b4b1b0a9564213b2ddff214162dd92d2d3 @sammarshallou sammarshallou committed May 5, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 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 a09897b

Please sign in to comment.