Skip to content

Commit

Permalink
Selective options - Only type 3 results can choose evaluation plots w…
Browse files Browse the repository at this point in the history
…ith aggregation functions
  • Loading branch information
PatrikBuetler committed Sep 2, 2024
1 parent 6949f99 commit 8e38b75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 1 addition & 5 deletions core/system.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,7 @@ public function getParameterElements(&$elements) {
public function getResultPlots($plots) {
$systemPlots = Util::scanForPlots($this->path . "results");
foreach ($systemPlots as $plot) {
# Only show plots that are for Job and Overall Results
if(strpos(gettype($plot), 'For Evaluations') === false) {
echo gettype($plot);
}
#echo gettype($plot);
echo gettype($plot);
$plots[] = $plot;
}
}
Expand Down
11 changes: 9 additions & 2 deletions core/util.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public static function mergeJobs($jobs, $parameter) {
* @return Plot[]
* @throws Exception
*/
public static function scanForPlots($path) {
public static function scanForPlots($path, $type = "") {
if (!is_dir($path)) {
return [];
}
Expand All @@ -201,7 +201,14 @@ public static function scanForPlots($path) {
// TODO: check if override happens
$plot = new Plot($path . $entry);
if ($plot->isValid()) {
$plots[] = $plot;
# Return only evaluation plots
if($type == 'eval' && strpos(gettype($plot), 'For Evaluations') != false) {
$plots[] = $plot;
}
# Return non-evaluation plots
if(strpos(gettype($plot), 'For Evaluations') === false) {
$plots[] = $plot;
}
}
}
return $plots;
Expand Down

0 comments on commit 8e38b75

Please sign in to comment.