no plan
This commit is contained in:
parent
a75f0af2f6
commit
0b67abeab9
1 changed files with 1 additions and 7 deletions
|
@ -87,15 +87,9 @@ class timetable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$day = new \DateTime($this->monday->format('Y-m-d\TH:i:sP'));
|
$day = new \DateTime($this->monday->format('Y-m-d\TH:i:sP'));
|
||||||
// TODO CHANGE DATABASE: table substitution: classesa -> classa, classesb -> classb !!!
|
|
||||||
for ($i=0; $i<$this->numdayweek; $i++) {
|
for ($i=0; $i<$this->numdayweek; $i++) {
|
||||||
if ($this->type == 'class') {
|
|
||||||
$sql = "date = '".$day->format('Ymd')."' AND ({$this->type}esa LIKE '%{$this->name}%' OR {$this->type}esb LIKE '%{$this->name}%')";
|
|
||||||
} else {
|
|
||||||
$sql = "date = '".$day->format('Ymd')."' AND ({$this->type}a LIKE '%{$this->name}%' OR {$this->type}b LIKE '%{$this->name}%')";
|
$sql = "date = '".$day->format('Ymd')."' AND ({$this->type}a LIKE '%{$this->name}%' OR {$this->type}b LIKE '%{$this->name}%')";
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($result = $DB->get_records_select('timetable_substitution',$sql)) {
|
if ($result = $DB->get_records_select('timetable_substitution',$sql)) {
|
||||||
foreach ($result as $substitution) {
|
foreach ($result as $substitution) {
|
||||||
$this->data[$i+1][$substitution->period]['substitution'][] = $substitution;
|
$this->data[$i+1][$substitution->period]['substitution'][] = $substitution;
|
||||||
|
|
Loading…
Add table
Reference in a new issue