original_string: public function html() {
          global $OUTPUT;
  
          $html = '';
  
          $types = gradereport_singleview::valid_screens();
  
          foreach ($types as $type) {
              $classname = "gradereport_singleview\\local\\screen\\${type}";
  
              $screen = new $classname($this->courseid, null, $this->groupid);
  
              if (!$screen instanceof selectable_items) {
                  continue;
              }
  
              $options = $screen->options();
  
              if (empty($options)) {
                  continue;
              }
  
              $params = array(
                  'id' => $this->courseid,
                  'item' => $screen->item_type(),
                  'group' => $this->groupid
              );
  
              $url = new moodle_url('/grade/report/singleview/index.php', $params);
  
              $select = new \single_select($url, 'itemid', $options, '', array('' => $screen->select_label()));
              $select->set_label($screen->select_label(), array('class'=>'accesshide'));
              $html .= $OUTPUT->render($select);
          }
          $html = $OUTPUT->container($html, 'selectitems');
  
          if (empty($html)) {
              $OUTPUT->notification(get_string('noscreens', 'gradereport_singleview'));
          }
  
          return $html;
      }
code: public function html() {
          global $OUTPUT;
  
          $html = '';
  
          $types = gradereport_singleview::valid_screens();
  
          foreach ($types as $type) {
              $classname = "gradereport_singleview\\local\\screen\\${type}";
  
              $screen = new $classname($this->courseid, null, $this->groupid);
  
              if (!$screen instanceof selectable_items) {
                  continue;
              }
  
              $options = $screen->options();
  
              if (empty($options)) {
                  continue;
              }
  
              $params = array(
                  'id' => $this->courseid,
                  'item' => $screen->item_type(),
                  'group' => $this->groupid
              );
  
              $url = new moodle_url('/grade/report/singleview/index.php', $params);
  
              $select = new \single_select($url, 'itemid', $options, '', array('' => $screen->select_label()));
              $select->set_label($screen->select_label(), array('class'=>'accesshide'));
              $html .= $OUTPUT->render($select);
          }
          $html = $OUTPUT->container($html, 'selectitems');
  
          if (empty($html)) {
              $OUTPUT->notification(get_string('noscreens', 'gradereport_singleview'));
          }
  
          return $html;
      }
code_tokens: public function html ( ) { global $ OUTPUT ; $ html = '' ; $ types = gradereport_singleview :: valid_screens ( ) ; foreach ( $ types as $ type ) { $ classname = "gradereport_singleview\\local\\screen\\${type}" ; $ screen = new $ classname ( $ this -> courseid , null , $ this -> groupid ) ; if ( ! $ screen instanceof selectable_items ) { continue ; } $ options = $ screen -> options ( ) ; if ( empty ( $ options ) ) { continue ; } $ params = array ( 'id' => $ this -> courseid , 'item' => $ screen -> item_type ( ) , 'group' => $ this -> groupid ) ; $ url = new moodle_url ( '/grade/report/singleview/index.php' , $ params ) ; $ select = new \ single_select ( $ url , 'itemid' , $ options , '' , array ( '' => $ screen -> select_label ( ) ) ) ; $ select -> set_label ( $ screen -> select_label ( ) , array ( 'class' => 'accesshide' ) ) ; $ html .= $ OUTPUT -> render ( $ select ) ; } $ html = $ OUTPUT -> container ( $ html , 'selectitems' ) ; if ( empty ( $ html ) ) { $ OUTPUT -> notification ( get_string ( 'noscreens' , 'gradereport_singleview' ) ) ; } return $ html ; }
docstring: Return the HTML for the page.
  
  @return string
docstring_tokens: Return the HTML for the page .