protected function update_submission(stdClass $submission, $userid, $updatetime, $teamsubmission) {
        global $DB;

        if ($teamsubmission) {
            return $this->update_team_submission($submission, $userid, $updatetime);
        }

        if ($updatetime) {
            $submission->timemodified = time();
        }
        $result= $DB->update_record('assign_submission', $submission);
        if ($result) {
            $this->gradebook_item_update($submission);
        }
        return $result;
    }
protected function update_submission(stdClass $submission, $userid, $updatetime, $teamsubmission) {
        global $DB;

        if ($teamsubmission) {
            return $this->update_team_submission($submission, $userid, $updatetime);
        }

        if ($updatetime) {
            $submission->timemodified = time();
        }
        $result= $DB->update_record('assign_submission', $submission);
        if ($result) {
            $this->gradebook_item_update($submission);
        }
        return $result;
    }
protected function update_submission ( stdClass $ submission , $ userid , $ updatetime , $ teamsubmission ) { global $ DB ; if ( $ teamsubmission ) { return $ this -> update_team_submission ( $ submission , $ userid , $ updatetime ) ; } if ( $ updatetime ) { $ submission -> timemodified = time ( ) ; } $ result = $ DB -> update_record ( 'assign_submission' , $ submission ) ; if ( $ result ) { $ this -> gradebook_item_update ( $ submission ) ; } return $ result ; }
Update grades in the gradebook based on submission time.

@param stdClass $submission
@param int $userid
@param bool $updatetime
@param bool $teamsubmission
@return bool
Update grades in the gradebook based on submission time .