public function get_sha1_file() {
        if (empty($this->singlefile) && empty($this->multifiles)) {
            throw new portfolio_caller_exception('invalidsha1file', 'portfolio', $this->get_return_url());
        }
        if ($this->singlefile) {
            return $this->singlefile->get_contenthash();
        }
        $sha1s = array();
        foreach ($this->multifiles as $file) {
            $sha1s[] = $file->get_contenthash();
        }
        asort($sha1s);
        return sha1(implode('', $sha1s));
    }