PROBLEMAS CON $COURSE->id, $USER->id

Re: PROBLEMAS CON $COURSE->id, $USER->id

de jimena muñoz -
Número de respuestas: 0
envió el codigo que estoy utilizando,este codigo lo estoy incluyendo en un recurso dentro del curso, pero como te cuento no toma las variables globales

<?php
global $COURSE;
global $USER;
//$COURSE->id
//echo $USER->id;
//print_r($USER);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="22%" height="100">&nbsp;</td>
<td width="46%"><a href="<?php echo $CFG->wwwroot.'/moodle/moodle/mod/chat/index.php?id='.$COURSE->id?>" target="_parent">
<img src="images/chat.jpg" border="0" /></a></td>
<td width="32%">&nbsp;</td>
</tr>
<tr>
<td height="100">&nbsp;</td>
<td><a href="<?php echo $CFG->wwwroot.'/moodle/moodle/mod/forum/index.php?id='.$COURSE->id?>" target="_parent"><img src="images/foro.jpg" border="0" /></a></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="100">&nbsp;</td>
<td><a href="<?php echo $CFG->wwwroot.'/moodle/moodle/blog/index.php?userid=7&courseid='.$COURSE->id?>" target="_parent"><img src="images/blog.jpg" border="0" /></a></td>
<td>&nbsp;</td>
</tr>
</table>