title: How to get the current courseid for the current page in moodle
body: <p>i have an addres moodle/course/modedit.php?add=page&amp;type=&amp;course=4&amp;section=1&amp;return=0&amp;sr=0  in moodle. How can i get the courseid that is 4? I tried $COURSE->id but it doesnot worked.
  Please help me with the solution.</p>