Compare commits
No commits in common. "0b67abeab9e835cb569748f327893bfca5a52d9a" and "8404eeb6fb259b7b0cbfa3e21f98d337c345404d" have entirely different histories.
0b67abeab9
...
8404eeb6fb
8 changed files with 8 additions and 7 deletions
|
@ -5,10 +5,5 @@ This Module provides a timetable block for moodle based on untis export-files: l
|
||||||
|
|
||||||
## Screenshot:
|
## Screenshot:
|
||||||
|
|
||||||
Students view:
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Teachers view:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
|
@ -73,7 +73,7 @@ class block_timetable extends block_base {
|
||||||
$class = $this->page->course->shortname;
|
$class = $this->page->course->shortname;
|
||||||
$this->content->text .= "Stundenplan der Klasse $class<br>";
|
$this->content->text .= "Stundenplan der Klasse $class<br>";
|
||||||
$ttable = new timetable('class',$class);
|
$ttable = new timetable('class',$class);
|
||||||
} elseif ($USER->department == "Lehrer" || $USER->department == "Lehrer_fvs") {
|
} elseif ($USER->department == "Lehrer") {
|
||||||
$teacher = $USER->username;
|
$teacher = $USER->username;
|
||||||
$teacher = str_replace("l_", "", $teacher);
|
$teacher = str_replace("l_", "", $teacher);
|
||||||
$teacher = str_replace("-fvs", "", $teacher);
|
$teacher = str_replace("-fvs", "", $teacher);
|
||||||
|
|
|
@ -87,8 +87,14 @@ 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++) {
|
||||||
$sql = "date = '".$day->format('Ymd')."' AND ({$this->type}a LIKE '%{$this->name}%' OR {$this->type}b LIKE '%{$this->name}%')";
|
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}%')";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
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) {
|
||||||
|
|
0
doc/.gitkeep
Executable file → Normal file
0
doc/.gitkeep
Executable file → Normal file
BIN
doc/timetable_screenshot1.png
Executable file → Normal file
BIN
doc/timetable_screenshot1.png
Executable file → Normal file
Binary file not shown.
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 19 KiB |
Binary file not shown.
Before Width: | Height: | Size: 30 KiB |
0
module.js
Executable file → Normal file
0
module.js
Executable file → Normal file
0
styles.css
Executable file → Normal file
0
styles.css
Executable file → Normal file
Loading…
Add table
Reference in a new issue