diff --git a/course/view.php b/course/view.php
index <HASH>..<HASH> 100644
--- a/course/view.php
+++ b/course/view.php
@@ -10,6 +10,7 @@
     $name        = optional_param('name');
     $edit        = optional_param('edit');
     $idnumber    = optional_param('idnumber');
+    $topic       = optional_param('topic',0,PARAM_INT);
 
     if (empty($id) && empty($name)) {
         error("Must specify course id or short name");
Added an optional_param() for 'topic' as it was coming from 'register_globals'
land.