Changeset 18797 for trunk/FACT++/www


Ignore:
Timestamp:
03/31/17 15:34:21 (8 years ago)
Author:
tbretz
Message:
Implemented that exclusive tasks are rejected if not scheduled exclusively.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/www/schedule/save.php

    r18520 r18797  
    181181        $save = $t;
    182182        $id = 0;
     183        $exclusive = 0;
    183184    }
    184185
     
    189190
    190191    if ($d==FALSE)
    191         die("Could not parse time '".$t."' with date_parse");
     192        die("Could not parse time '".$t."' with date_parse.");
    192193
    193194    // Check all but the last task in a measurement whether
     
    196197    {
    197198        if ($measurements[$m]['fIsUnlimited']==true)
    198             die("Unlimited task '".$measurements[$m]['fMeasurementTypeName']."' detected before end of observation\n[".$last."|".($id-1)."]");
     199            die("Unlimited task '".$measurements[$m]['fMeasurementTypeName']."' detected before end of observation.\n[".$last."|".($id-1)."]");
    199200    }
    200201
    201202    if ($last>$t)
    202         die("Times not sequential\n[".$last."|".$t."]");
     203        die("Times not sequential.\n[".$last."|".$t."]");
    203204
    204205    $last = $t;
     
    207208    $s = $row[2]; // source
    208209    $v = $row[3]; // value
     210
     211    // Check if measurement is exclusive
     212    if ($measurements[$m]['fIsExclusive']==true || $exclusive>0)
     213    {
     214        if ($id>0)
     215            die("Task '".$measurements[$m]['fMeasurementTypeName']."' must be scheduled exclusively.\n[".$t."|".$id."]");
     216
     217        $exclusive = $m+1;
     218    }
    209219
    210220    // Check if task need source or must not have a source
Note: See TracChangeset for help on using the changeset viewer.