/**
  * Constructs an appropriate order by clause for the main query
  *
  * @return  string  The appropriate order by clause
  */
 function get_order_by_clause()
 {
     $result = parent::get_order_by_clause();
     //make sure the result is actually valid
     if ($result != '') {
         //always sort by course in addition to everything else
         $result .= ', coursename, courseid';
     }
     return $result;
 }