original_string: public function get_activities() {
          $modinfo = get_fast_modinfo($this->course);
          $result = array();
          foreach ($modinfo->get_cms() as $cm) {
              if ($cm->completion != COMPLETION_TRACKING_NONE && !$cm->deletioninprogress) {
                  $result[$cm->id] = $cm;
              }
          }
          return $result;
      }
code: public function get_activities() {
          $modinfo = get_fast_modinfo($this->course);
          $result = array();
          foreach ($modinfo->get_cms() as $cm) {
              if ($cm->completion != COMPLETION_TRACKING_NONE && !$cm->deletioninprogress) {
                  $result[$cm->id] = $cm;
              }
          }
          return $result;
      }
code_tokens: public function get_activities ( ) { $ modinfo = get_fast_modinfo ( $ this -> course ) ; $ result = array ( ) ; foreach ( $ modinfo -> get_cms ( ) as $ cm ) { if ( $ cm -> completion != COMPLETION_TRACKING_NONE && ! $ cm -> deletioninprogress ) { $ result [ $ cm -> id ] = $ cm ; } } return $ result ; }
docstring: Obtains a list of activities for which completion is enabled on the
  course. The list is ordered by the section order of those activities.
  
  @return cm_info[] Array from $cmid => $cm of all activities with completion enabled,
  empty array if none
docstring_tokens: Obtains a list of activities for which completion is enabled on the course . The list is ordered by the section order of those activities .