original_string: public function has_activities() {
          $modinfo = get_fast_modinfo($this->course);
          foreach ($modinfo->get_cms() as $cm) {
              if ($cm->completion != COMPLETION_TRACKING_NONE) {
                  return true;
              }
          }
          return false;
      }
code: public function has_activities() {
          $modinfo = get_fast_modinfo($this->course);
          foreach ($modinfo->get_cms() as $cm) {
              if ($cm->completion != COMPLETION_TRACKING_NONE) {
                  return true;
              }
          }
          return false;
      }
code_tokens: public function has_activities ( ) { $ modinfo = get_fast_modinfo ( $ this -> course ) ; foreach ( $ modinfo -> get_cms ( ) as $ cm ) { if ( $ cm -> completion != COMPLETION_TRACKING_NONE ) { return true ; } } return false ; }
docstring: Return whether or not the course has activities with completion enabled.
  
  @return boolean true when there is at least one activity with completion enabled.
docstring_tokens: Return whether or not the course has activities with completion enabled .