-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release_5-1' of https://github.com/ILIAS-eLearning/ILIAS …
…into release_5-1
- Loading branch information
Showing
25 changed files
with
318 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */ | ||
|
||
|
||
/** | ||
* @author Björn Heyser <[email protected]> | ||
* @version $Id$ | ||
* | ||
* @package Modules/Test | ||
*/ | ||
class ilTestEvaluation | ||
{ | ||
/** | ||
* @var ilDBInterface | ||
*/ | ||
protected $db; | ||
|
||
/** | ||
* @var integer | ||
*/ | ||
protected $testId; | ||
|
||
/** | ||
* @param ilDBInterface $db | ||
*/ | ||
public function __construct(ilDBInterface $db, $testId) | ||
{ | ||
$this->db = $db; | ||
$this->testId = $testId; | ||
} | ||
|
||
/** | ||
* @param $testId | ||
* @return array | ||
*/ | ||
public function getAllActivesPasses() | ||
{ | ||
$query = " | ||
SELECT active_fi, pass | ||
FROM tst_active actives | ||
INNER JOIN tst_pass_result passes | ||
ON active_fi = active_id | ||
WHERE test_fi = %s | ||
"; | ||
|
||
$res = $this->db->queryF($query, array('integer'), array($this->testId)); | ||
|
||
$passes = array(); | ||
|
||
while($row = $this->db->fetchAssoc($res)) | ||
{ | ||
if( !isset($passes[$row['active_fi']]) ) | ||
{ | ||
$passes[$row['active_fi']] = array(); | ||
} | ||
|
||
$passes[$row['active_fi']][] = $row['pass']; | ||
} | ||
|
||
return $passes; | ||
} | ||
} |
Oops, something went wrong.