original_string: protected function get_users_table(array $users, array $statusoptions) {
          $table = new html_table();
          $table->head = array(
              get_string('name'),
              get_string('participationstatus', 'enrol'),
              get_string('enroltimestart', 'enrol'),
              get_string('enroltimeend', 'enrol'),
          );
          $table->data = array();
          foreach ($users as $user) {
              foreach ($user->enrolments as $enrolment) {
                  $input = html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'bulkuser[]', 'value' => $user->id));
                  $table->data[] = array(
                      fullname($user).$input,
                      $statusoptions[$enrolment->status],
                      (!empty($enrolment->timestart))?userdate($enrolment->timestart):'',
                      (!empty($enrolment->timeend))?userdate($enrolment->timeend):'',
                  );
              }
          }
          return html_writer::table($table);
      }
code: protected function get_users_table(array $users, array $statusoptions) {
          $table = new html_table();
          $table->head = array(
              get_string('name'),
              get_string('participationstatus', 'enrol'),
              get_string('enroltimestart', 'enrol'),
              get_string('enroltimeend', 'enrol'),
          );
          $table->data = array();
          foreach ($users as $user) {
              foreach ($user->enrolments as $enrolment) {
                  $input = html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'bulkuser[]', 'value' => $user->id));
                  $table->data[] = array(
                      fullname($user).$input,
                      $statusoptions[$enrolment->status],
                      (!empty($enrolment->timestart))?userdate($enrolment->timestart):'',
                      (!empty($enrolment->timeend))?userdate($enrolment->timeend):'',
                  );
              }
          }
          return html_writer::table($table);
      }
code_tokens: protected function get_users_table ( array $ users , array $ statusoptions ) { $ table = new html_table ( ) ; $ table -> head = array ( get_string ( 'name' ) , get_string ( 'participationstatus' , 'enrol' ) , get_string ( 'enroltimestart' , 'enrol' ) , get_string ( 'enroltimeend' , 'enrol' ) , ) ; $ table -> data = array ( ) ; foreach ( $ users as $ user ) { foreach ( $ user -> enrolments as $ enrolment ) { $ input = html_writer :: empty_tag ( 'input' , array ( 'type' => 'hidden' , 'name' => 'bulkuser[]' , 'value' => $ user -> id ) ) ; $ table -> data [ ] = array ( fullname ( $ user ) . $ input , $ statusoptions [ $ enrolment -> status ] , ( ! empty ( $ enrolment -> timestart ) ) ? userdate ( $ enrolment -> timestart ) : '' , ( ! empty ( $ enrolment -> timeend ) ) ? userdate ( $ enrolment -> timeend ) : '' , ) ; } } return html_writer :: table ( $ table ) ; }
docstring: Generates an HTML table to display the users being affected by the bulk change.
  
  @param array $users
  @param array $statusoptions
  @return string
docstring_tokens: Generates an HTML table to display the users being affected by the bulk change .