original_string: protected function get_modules_recent_activity() {
          $context = context_course::instance($this->page->course->id);
          $viewfullnames = has_capability('moodle/site:viewfullnames', $context);
          $hascontent = false;
  
          $modinfo = get_fast_modinfo($this->page->course);
          $usedmodules = $modinfo->get_used_module_names();
          $recentactivity = array();
          foreach ($usedmodules as $modname => $modfullname) {
              // Each module gets it's own logs and prints them
              ob_start();
              $hascontent = component_callback('mod_'. $modname, 'print_recent_activity',
                      array($this->page->course, $viewfullnames, $this->get_timestart()), false);
              if ($hascontent) {
                  $recentactivity[$modname] = ob_get_contents();
              }
              ob_end_clean();
          }
          return $recentactivity;
      }
code: protected function get_modules_recent_activity() {
          $context = context_course::instance($this->page->course->id);
          $viewfullnames = has_capability('moodle/site:viewfullnames', $context);
          $hascontent = false;
  
          $modinfo = get_fast_modinfo($this->page->course);
          $usedmodules = $modinfo->get_used_module_names();
          $recentactivity = array();
          foreach ($usedmodules as $modname => $modfullname) {
              // Each module gets it's own logs and prints them
              ob_start();
              $hascontent = component_callback('mod_'. $modname, 'print_recent_activity',
                      array($this->page->course, $viewfullnames, $this->get_timestart()), false);
              if ($hascontent) {
                  $recentactivity[$modname] = ob_get_contents();
              }
              ob_end_clean();
          }
          return $recentactivity;
      }
code_tokens: protected function get_modules_recent_activity ( ) { $ context = context_course :: instance ( $ this -> page -> course -> id ) ; $ viewfullnames = has_capability ( 'moodle/site:viewfullnames' , $ context ) ; $ hascontent = false ; $ modinfo = get_fast_modinfo ( $ this -> page -> course ) ; $ usedmodules = $ modinfo -> get_used_module_names ( ) ; $ recentactivity = array ( ) ; foreach ( $ usedmodules as $ modname => $ modfullname ) { // Each module gets it's own logs and prints them ob_start ( ) ; $ hascontent = component_callback ( 'mod_' . $ modname , 'print_recent_activity' , array ( $ this -> page -> course , $ viewfullnames , $ this -> get_timestart ( ) ) , false ) ; if ( $ hascontent ) { $ recentactivity [ $ modname ] = ob_get_contents ( ) ; } ob_end_clean ( ) ; } return $ recentactivity ; }
docstring: Returns list of recent activity within modules
  
  For each used module type executes callback MODULE_print_recent_activity()
  
  @return array array of pairs moduletype => content
docstring_tokens: Returns list of recent activity within modules