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;
    }
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;
    }
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 ; }
Calculation based on activities due indicator.

@param int $sampleid
@param \core_analytics\analysable $analysable
@param int $starttime
@param int $endtime
@return float
Calculation based on activities due indicator .