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

This commit is contained in:
Eloy Lafuente (stronk7) 2011-05-09 00:58:55 +02:00
commit 3c1ee10423

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);
}