From b7efc66cba573e4a1924c54c424341c7f31ab903 Mon Sep 17 00:00:00 2001 From: L_DA Date: Fri, 6 Nov 2020 09:23:08 +0000 Subject: [PATCH] pattern matching improved --- LICENSE.md | 0 README.md | 0 amd/build/search.min.js | 0 amd/src/search.js | 0 classes/output/renderer.php | 0 classes/output/searchform.php | 0 classes/output/timetable.php | 0 classes/timetable.php | 10 ++++++---- db/access.php | 0 db/install.php | 0 db/install.xml | 0 db/services.php | 0 db/uninstall.php | 0 db/upgrade.php | 0 externallib.php | 0 index.php | 0 lang/en/timetable.php | 0 lib.php | 0 mod_form.php | 0 pix/icon.png | Bin pix/icon.svg | 0 settings.php | 0 styles.css | 0 templates/searchform.mustache | 0 templates/searchresult.mustache | 0 templates/timetable.mustache | 0 version.php | 0 view.php | 0 28 files changed, 6 insertions(+), 4 deletions(-) mode change 100644 => 100755 LICENSE.md mode change 100644 => 100755 README.md mode change 100644 => 100755 amd/build/search.min.js mode change 100644 => 100755 amd/src/search.js mode change 100644 => 100755 classes/output/renderer.php mode change 100644 => 100755 classes/output/searchform.php mode change 100644 => 100755 classes/output/timetable.php mode change 100644 => 100755 db/access.php mode change 100644 => 100755 db/install.php mode change 100644 => 100755 db/install.xml mode change 100644 => 100755 db/services.php mode change 100644 => 100755 db/uninstall.php mode change 100644 => 100755 db/upgrade.php mode change 100644 => 100755 externallib.php mode change 100644 => 100755 index.php mode change 100644 => 100755 lang/en/timetable.php mode change 100644 => 100755 lib.php mode change 100644 => 100755 mod_form.php mode change 100644 => 100755 pix/icon.png mode change 100644 => 100755 pix/icon.svg mode change 100644 => 100755 settings.php mode change 100644 => 100755 styles.css mode change 100644 => 100755 templates/searchform.mustache mode change 100644 => 100755 templates/searchresult.mustache mode change 100644 => 100755 templates/timetable.mustache mode change 100644 => 100755 version.php mode change 100644 => 100755 view.php diff --git a/LICENSE.md b/LICENSE.md old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/amd/build/search.min.js b/amd/build/search.min.js old mode 100644 new mode 100755 diff --git a/amd/src/search.js b/amd/src/search.js old mode 100644 new mode 100755 diff --git a/classes/output/renderer.php b/classes/output/renderer.php old mode 100644 new mode 100755 diff --git a/classes/output/searchform.php b/classes/output/searchform.php old mode 100644 new mode 100755 diff --git a/classes/output/timetable.php b/classes/output/timetable.php old mode 100644 new mode 100755 diff --git a/classes/timetable.php b/classes/timetable.php index f14a447..5a225ca 100755 --- a/classes/timetable.php +++ b/classes/timetable.php @@ -360,8 +360,9 @@ class timetable { $mylesson['subject'] = $substitution->subjectb; if ($substitution->subjectb && - (($this->type == 'teacher' && $this->name == $substitution->teacherb) || - ($this->type == 'class' && $this->name == $substitution->classb) || + (($this->type == 'teacher' && $this->name == $substitution->teacherb) || +// ($this->type == 'class' && $this->name == $substitution->classb) || + ($this->type == 'class' && strpos($substitution->classb, $this->name)) || ($this->type == 'room' && $this->name == $substitution->roomb)) ) { @@ -376,8 +377,9 @@ class timetable { } } //if ($lesson->week[$this->week-1] != '0') $days[$day]['lessons'][] = $mylesson; - } elseif (($this->type == 'teacher' && $this->name == $substitution->teachera) || - ($this->type == 'class' && $this->name == $substitution->classa) || + } elseif (($this->type == 'teacher' && $this->name == $substitution->teachera) || +// ($this->type == 'class' && $this->name == $substitution->classa) || + ($this->type == 'class' && strpos($substitution->classa, $this->name)) || ($this->type == 'room' && $this->name == $substitution->rooma)) { $mylesson['class'] = $substitution->classa; $mylesson['teacher'] = $substitution->teachera; diff --git a/db/access.php b/db/access.php old mode 100644 new mode 100755 diff --git a/db/install.php b/db/install.php old mode 100644 new mode 100755 diff --git a/db/install.xml b/db/install.xml old mode 100644 new mode 100755 diff --git a/db/services.php b/db/services.php old mode 100644 new mode 100755 diff --git a/db/uninstall.php b/db/uninstall.php old mode 100644 new mode 100755 diff --git a/db/upgrade.php b/db/upgrade.php old mode 100644 new mode 100755 diff --git a/externallib.php b/externallib.php old mode 100644 new mode 100755 diff --git a/index.php b/index.php old mode 100644 new mode 100755 diff --git a/lang/en/timetable.php b/lang/en/timetable.php old mode 100644 new mode 100755 diff --git a/lib.php b/lib.php old mode 100644 new mode 100755 diff --git a/mod_form.php b/mod_form.php old mode 100644 new mode 100755 diff --git a/pix/icon.png b/pix/icon.png old mode 100644 new mode 100755 diff --git a/pix/icon.svg b/pix/icon.svg old mode 100644 new mode 100755 diff --git a/settings.php b/settings.php old mode 100644 new mode 100755 diff --git a/styles.css b/styles.css old mode 100644 new mode 100755 diff --git a/templates/searchform.mustache b/templates/searchform.mustache old mode 100644 new mode 100755 diff --git a/templates/searchresult.mustache b/templates/searchresult.mustache old mode 100644 new mode 100755 diff --git a/templates/timetable.mustache b/templates/timetable.mustache old mode 100644 new mode 100755 diff --git a/version.php b/version.php old mode 100644 new mode 100755 diff --git a/view.php b/view.php old mode 100644 new mode 100755