original_string: protected function calculate_sample($sampleid, \core_analytics\analysable $analysable, $starttime = false, $endtime = false) {
  
          $activitiesdueindicator = $this->retrieve('\core_course\analytics\indicator\activities_due', $sampleid);
          if ($activitiesdueindicator == \core_course\analytics\indicator\activities_due::get_max_value()) {
              return 1;
          }
          return 0;
      }
code: protected function calculate_sample($sampleid, \core_analytics\analysable $analysable, $starttime = false, $endtime = false) {
  
          $activitiesdueindicator = $this->retrieve('\core_course\analytics\indicator\activities_due', $sampleid);
          if ($activitiesdueindicator == \core_course\analytics\indicator\activities_due::get_max_value()) {
              return 1;
          }
          return 0;
      }
code_tokens: protected function calculate_sample ( $ sampleid , \ core_analytics \ analysable $ analysable , $ starttime = false , $ endtime = false ) { $ activitiesdueindicator = $ this -> retrieve ( '\core_course\analytics\indicator\activities_due' , $ sampleid ) ; if ( $ activitiesdueindicator == \ core_course \ analytics \ indicator \ activities_due :: get_max_value ( ) ) { return 1 ; } return 0 ; }
docstring: Calculation based on activities due indicator.
  
  @param int $sampleid
  @param \core_analytics\analysable $analysable
  @param int $starttime
  @param int $endtime
  @return float
docstring_tokens: Calculation based on activities due indicator .