original_string: private function _pop() {
          global $DB;
          if (empty($this->gradestack)) {
              if (empty($this->grades_rs) || !$this->grades_rs->valid()) {
                  return null; // no grades present
              }
  
              $current = $this->grades_rs->current();
  
              $this->grades_rs->next();
  
              return $current;
          } else {
              return array_pop($this->gradestack);
          }
      }
code: private function _pop() {
          global $DB;
          if (empty($this->gradestack)) {
              if (empty($this->grades_rs) || !$this->grades_rs->valid()) {
                  return null; // no grades present
              }
  
              $current = $this->grades_rs->current();
  
              $this->grades_rs->next();
  
              return $current;
          } else {
              return array_pop($this->gradestack);
          }
      }
code_tokens: private function _pop ( ) { global $ DB ; if ( empty ( $ this -> gradestack ) ) { if ( empty ( $ this -> grades_rs ) || ! $ this -> grades_rs -> valid ( ) ) { return null ; // no grades present } $ current = $ this -> grades_rs -> current ( ) ; $ this -> grades_rs -> next ( ) ; return $ current ; } else { return array_pop ( $ this -> gradestack ) ; } }
docstring: Remove a grade_grade instance from the grade stack
  
  @return grade_grade current grade object
docstring_tokens: Remove a grade_grade instance from the grade stack