Permalink
Browse files

Merge branch 'MDL-27391-m20' of git://github.com/sammarshallou/moodle…

… into MOODLE_20_STABLE
  • Loading branch information...
stronk7 committed May 8, 2011
2 parents 06ede85 + a09897b commit d015c2352ffcdb8439b93e2cb4d2fd2b46c4df21
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/completionlib.php
View
@@ -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 d015c23

Please sign in to comment.