original_string: protected function structural_change($change) {
          $cm = $change['module'];
          switch ($change['action']) {
              case 'delete mod':
                  $text = get_string('deletedactivity', 'moodle', $cm->modfullname);
                  break;
              case 'add mod':
                  $text = get_string('added', 'moodle', $cm->modfullname). '<br />'.
                      html_writer::link($cm->url, format_string($cm->name, true));
                  break;
              case 'update mod':
                  $text = get_string('updated', 'moodle', $cm->modfullname). '<br />'.
                      html_writer::link($cm->url, format_string($cm->name, true));
                  break;
              default:
                  return '';
          }
          return html_writer::tag('p', $text, array('class' => 'activity'));
      }
code: protected function structural_change($change) {
          $cm = $change['module'];
          switch ($change['action']) {
              case 'delete mod':
                  $text = get_string('deletedactivity', 'moodle', $cm->modfullname);
                  break;
              case 'add mod':
                  $text = get_string('added', 'moodle', $cm->modfullname). '<br />'.
                      html_writer::link($cm->url, format_string($cm->name, true));
                  break;
              case 'update mod':
                  $text = get_string('updated', 'moodle', $cm->modfullname). '<br />'.
                      html_writer::link($cm->url, format_string($cm->name, true));
                  break;
              default:
                  return '';
          }
          return html_writer::tag('p', $text, array('class' => 'activity'));
      }
code_tokens: protected function structural_change ( $ change ) { $ cm = $ change [ 'module' ] ; switch ( $ change [ 'action' ] ) { case 'delete mod' : $ text = get_string ( 'deletedactivity' , 'moodle' , $ cm -> modfullname ) ; break ; case 'add mod' : $ text = get_string ( 'added' , 'moodle' , $ cm -> modfullname ) . '<br />' . html_writer :: link ( $ cm -> url , format_string ( $ cm -> name , true ) ) ; break ; case 'update mod' : $ text = get_string ( 'updated' , 'moodle' , $ cm -> modfullname ) . '<br />' . html_writer :: link ( $ cm -> url , format_string ( $ cm -> name , true ) ) ; break ; default : return '' ; } return html_writer :: tag ( 'p' , $ text , array ( 'class' => 'activity' ) ) ; }
docstring: Renders HTML for one change in course structure
  
  @see block_recent_activity::get_structural_changes()
  @param array $change array containing attributes
  'action' - one of: 'add mod', 'update mod', 'delete mod'
  'module' - instance of cm_info (for 'delete mod' it is an object with attributes modname and modfullname)
  @return string
docstring_tokens: Renders HTML for one change in course structure