Webservice update data created
This commit is contained in:
parent
da14cf4623
commit
ae94d42fdf
9 changed files with 990 additions and 624 deletions
|
|
@ -37,6 +37,7 @@ class lesson {
|
|||
$this->room = $lesson->room;
|
||||
$this->period = $lesson->period;
|
||||
$this->day = $lesson->day;
|
||||
$this->type = $lesson->type;
|
||||
$this->text = "";
|
||||
$this->substitution = "";
|
||||
$this->teachera = "";
|
||||
|
|
@ -51,8 +52,8 @@ class lesson {
|
|||
$this->subjectchanged = false;
|
||||
$this->classchanged = false;
|
||||
$this->roomchanged = false;
|
||||
$this->reason = "";
|
||||
$this->type = 0;
|
||||
$this->reason = "";
|
||||
$this->subtype = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -70,12 +71,12 @@ class lesson {
|
|||
$this->subjecta = $substitution->subjecta;
|
||||
$this->classa = $substitution->classa;
|
||||
$this->rooma = $substitution->rooma;
|
||||
$this->teacherchanged = ($this->teacher != $this->teachera) ? true : false;
|
||||
$this->subjectchanged = ($this->subject != $this->subjecta) ? true : false;
|
||||
$this->classchanged = (!preg_match("/(^|~)".preg_quote($this->class,"/")."($|~)/" , $this->classa )) ? true : false;
|
||||
$this->roomchanged = (!preg_match("/(^|~)".preg_quote($this->room,"/")."($|~)/" , $this->rooma )) ? true : false;
|
||||
$this->teacherchanged = ($this->teacher != $this->teachera && $this->teachera) ? true : false;
|
||||
$this->subjectchanged = ($this->subject != $this->subjecta && $this->subjecta) ? true : false;
|
||||
$this->classchanged = (!preg_match("/(^|~)".preg_quote($this->class,"/")."($|~)/" , $this->classa ) && $this->classa) ? true : false;
|
||||
$this->roomchanged = (!preg_match("/(^|~)".preg_quote($this->room,"/")."($|~)/" , $this->rooma ) && $this->rooma) ? true : false;
|
||||
if ($substitution->text) $this->text .= $substitution->text;
|
||||
$this->type = $substitution->type;
|
||||
$this->subtype = $substitution->type;
|
||||
$this->substitution = "1";
|
||||
return 1;
|
||||
} elseif (//$this->lessonid == $substitution->lesson &&
|
||||
|
|
@ -94,7 +95,7 @@ class lesson {
|
|||
$this->roomchanged = (!preg_match("/(^|~)".preg_quote($this->room,"/")."($|~)/" , $this->roomb )) ? true : false;
|
||||
if ($substitution->text) $this->text .= $substitution->text;
|
||||
// TODO Entfall, falls teacherb!=teacher bzw. class not in classb bzw. roomb!=room TODO
|
||||
$this->type = $substitution->type;
|
||||
$this->subtype = $substitution->type;
|
||||
$this->substitution = "1";
|
||||
return 1;
|
||||
} else {
|
||||
|
|
@ -128,6 +129,9 @@ class lesson {
|
|||
//$this->teacher == $lesson->teacher &&
|
||||
$this->subject == $lesson->subject &&
|
||||
$this->room == $lesson->room &&
|
||||
$this->type == $lesson->type &&
|
||||
$this->subtype == $lesson->subtype &&
|
||||
//$this->teacherchanged == $lesson->teacherchanged &&
|
||||
$this->text == $lesson->text) {
|
||||
if ($this->class != $lesson->class) {
|
||||
$class1parts = explode("/", $this->class);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue