public function track($grade_grade) {

        if (empty($grade_grade->exported) or empty($grade_grade->timemodified)) {
            if (is_null($grade_grade->finalgrade)) {
                // grade does not exist yet
                $status = 'unknown';
            } else {
                $status = 'new';
                $this->update_list[] = $grade_grade->id;
            }

        } else if ($grade_grade->exported < $grade_grade->timemodified) {
            $status = 'regrade';
            $this->update_list[] = $grade_grade->id;

        } else if ($grade_grade->exported >= $grade_grade->timemodified) {
            $status = 'nochange';

        } else {
            // something is wrong?
            $status = 'unknown';
        }

        $this->flush(100);

        return $status;
    }
public function track($grade_grade) {

        if (empty($grade_grade->exported) or empty($grade_grade->timemodified)) {
            if (is_null($grade_grade->finalgrade)) {
                // grade does not exist yet
                $status = 'unknown';
            } else {
                $status = 'new';
                $this->update_list[] = $grade_grade->id;
            }

        } else if ($grade_grade->exported < $grade_grade->timemodified) {
            $status = 'regrade';
            $this->update_list[] = $grade_grade->id;

        } else if ($grade_grade->exported >= $grade_grade->timemodified) {
            $status = 'nochange';

        } else {
            // something is wrong?
            $status = 'unknown';
        }

        $this->flush(100);

        return $status;
    }
public function track ( $ grade_grade ) { if ( empty ( $ grade_grade -> exported ) or empty ( $ grade_grade -> timemodified ) ) { if ( is_null ( $ grade_grade -> finalgrade ) ) { // grade does not exist yet $ status = 'unknown' ; } else { $ status = 'new' ; $ this -> update_list [ ] = $ grade_grade -> id ; } } else if ( $ grade_grade -> exported < $ grade_grade -> timemodified ) { $ status = 'regrade' ; $ this -> update_list [ ] = $ grade_grade -> id ; } else if ( $ grade_grade -> exported >= $ grade_grade -> timemodified ) { $ status = 'nochange' ; } else { // something is wrong? $ status = 'unknown' ; } $ this -> flush ( 100 ) ; return $ status ; }
Track grade export status
@param object $grade_grade
@return string $status (unknow, new, regrade, nochange)
Track grade export status