original_string: public function get_total_logs() {
          global $DB;
  
          // No logs if no students.
          if (empty($this->get_students())) {
              return 0;
          }
  
          if ($this->ntotallogs === null) {
              list($filterselect, $filterparams) = $this->course_students_query_filter();
              if (!$logstore = \core_analytics\manager::get_analytics_logstore()) {
                  $this->ntotallogs = 0;
              } else {
                  $this->ntotallogs = $logstore->get_events_select_count($filterselect, $filterparams);
              }
          }
  
          return $this->ntotallogs;
      }
code: public function get_total_logs() {
          global $DB;
  
          // No logs if no students.
          if (empty($this->get_students())) {
              return 0;
          }
  
          if ($this->ntotallogs === null) {
              list($filterselect, $filterparams) = $this->course_students_query_filter();
              if (!$logstore = \core_analytics\manager::get_analytics_logstore()) {
                  $this->ntotallogs = 0;
              } else {
                  $this->ntotallogs = $logstore->get_events_select_count($filterselect, $filterparams);
              }
          }
  
          return $this->ntotallogs;
      }
code_tokens: public function get_total_logs ( ) { global $ DB ; // No logs if no students. if ( empty ( $ this -> get_students ( ) ) ) { return 0 ; } if ( $ this -> ntotallogs === null ) { list ( $ filterselect , $ filterparams ) = $ this -> course_students_query_filter ( ) ; if ( ! $ logstore = \ core_analytics \ manager :: get_analytics_logstore ( ) ) { $ this -> ntotallogs = 0 ; } else { $ this -> ntotallogs = $ logstore -> get_events_select_count ( $ filterselect , $ filterparams ) ; } } return $ this -> ntotallogs ; }
docstring: Returns the total number of student logs in the course
  
  @return int
docstring_tokens: Returns the total number of student logs in the course