164            str_replace(
' ', 
'', $this->
getTestTitle() . 
'_' . $this->question->getTitle())
 
  171                        SELECT tst_solutions.solution_id, tst_solutions.pass, tst_solutions.active_fi, tst_solutions.question_fi,  
  172                                tst_solutions.value1, tst_solutions.value2, tst_solutions.tstamp  
  173                        FROM tst_solutions, tst_active, qpl_questions  
  174                        WHERE tst_solutions.active_fi = tst_active.active_id  
  175                        AND tst_solutions.question_fi = qpl_questions.question_id  
  176                        AND tst_solutions.question_fi = %s  
  177                        AND tst_active.test_fi = %s  
  178                        ORDER BY tst_solutions.active_fi, tst_solutions.tstamp 
  181        $res = $this->db->queryF(
 
  183            array(
"integer", 
"integer"),
 
  184            array($this->question->getId(), $this->getTestId())
 
  187        $solutionData = array();
 
  189        while (
$row = $this->db->fetchAssoc(
$res)) {
 
  190            if (!isset($solutionData[
$row[
'active_fi']])) {
 
  191                $solutionData[ 
$row[
'active_fi'] ] = array();
 
  194            if (!isset($solutionData[ 
$row[
'active_fi'] ][ 
$row[
'pass'] ])) {
 
  195                $solutionData[ 
$row[
'active_fi'] ][ 
$row[
'pass'] ] = array();
 
  198            $solutionData[ 
$row[
'active_fi'] ][ 
$row[
'pass'] ][] = 
$row;
 
  201        return $solutionData;
 
  206        $activeIds = array();
 
  208        foreach ($solutionData as $activeId => $passes) {
 
  209            $activeIds[] = $activeId;
 
  212        require_once 
'Modules/Test/classes/class.ilTestParticipantData.php';
 
  214        $participantData->setActiveIdsFilter($activeIds);
 
  215        $participantData->setParticipantAccessFilter(
 
  218        $participantData->load($this->
getTestId());
 
  220        return $participantData;
 
  225        foreach ($solutionData as $activeId => $passes) {
 
  226            if (!in_array($activeId, $participantData->
getActiveIds())) {
 
  231                foreach (
$files as $file) {
 
  232                    $uploadedFileDir = $this->question->getFileUploadPath(
 
  235                        $this->question->getId()
 
  239                    if (!is_file($uploadedFileDir . $file[
'value1'])) {
 
  243                    $destinationDir = $this->tempDirPath . 
'/' . $this->mainFolderName . 
'/';
 
  249                    copy($uploadedFileDir . $file[
'value1'], $destinationDir . $file[
'value2']);
 
  257        return $this->lng->txt(
'pass') . 
'_' . (
$pass + 1);
 
  262        ilUtil::zip($this->tempDirPath . 
'/' . $this->mainFolderName, $this->tempZipFilePath);
 
  264        $pathinfo = pathinfo($this->tempZipFilePath);
 
  265        $this->finalZipFilePath = dirname($pathinfo[
'dirname']) . 
'/' . $pathinfo[
'basename'];
 
  268            require_once 
'Services/Utilities/classes/class.ilFileUtils.php';
 
  288            $this->mainFolderName . self::ZIP_FILE_EXTENSION
 
An exception for terminatinating execution or to throw for unit testing.
__construct(ilDBInterface $db, ilLanguage $lng)
getParticipantData($solutionData)
getFileUploadSolutionData()
collectUploadedFiles($solutionData, ilTestParticipantData $participantData)
removeFileUploadCollection()
createFileUploadCollectionZipFile()
Class to report exception.
static rename($a_source, $a_target)
Rename a file.
static getRootLogger()
The unique root logger has a fixed error level.
static getAccessStatisticsUserFilter($refId)
getFileSystemCompliantFullnameByActiveId($activeId)
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
static ilTempnam($a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
static makeDirParents($a_dir)
Create a new directory and all parent directories.
foreach($_POST as $key=> $value) $res