Compare commits

...

10 commits

Author SHA1 Message Date
L_DA
0b67abeab9 no plan 2020-09-23 22:02:26 +02:00
L_DA
a75f0af2f6 no plan 2020-09-18 13:31:42 +00:00
L_DA
72d7bef508 Merge branch 'master' of gitlab.steinbeisschule-reutlingen.de:L_DA/timetable 2020-08-02 14:35:39 +00:00
L_DA
be14ca1755 no plan (rd) 2020-08-02 14:35:02 +00:00
L_DA
b2e263c9bf new Screenshot 2020-07-31 20:16:46 +02:00
L_DA
b70d35c6a7 Delete timetable_screenshot1.png 2020-07-31 20:16:22 +02:00
L_DA
055ee15454 Delete timetable_screenshot1.png 2020-07-31 20:16:14 +02:00
L_DA
161670f407 w/o scrollbar 2020-07-31 20:14:52 +02:00
L_DA
9da2b55bf7 Update README.md 2020-07-31 20:10:15 +02:00
L_DA
cd7ba7c5d0 Upload New screenshot 2020-07-31 20:09:09 +02:00
8 changed files with 7 additions and 8 deletions

View file

@ -5,5 +5,10 @@ This Module provides a timetable block for moodle based on untis export-files: l
## Screenshot: ## Screenshot:
Students view:
![image](doc/timetable_screenshot1.png) ![image](doc/timetable_screenshot1.png)
Teachers view:
![image](doc/timetable_screenshot2.png)

View file

@ -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") { } elseif ($USER->department == "Lehrer" || $USER->department == "Lehrer_fvs") {
$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);

View file

@ -87,14 +87,8 @@ 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}a LIKE '%{$this->name}%' OR {$this->type}b LIKE '%{$this->name}%')";
$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 Normal file → Executable file
View file

BIN
doc/timetable_screenshot1.png Normal file → Executable file

Binary file not shown.

Before

(image error) Size: 19 KiB

After

(image error) Size: 30 KiB

BIN
doc/timetable_screenshot2.png Executable file

Binary file not shown.

After

(image error) Size: 30 KiB

0
module.js Normal file → Executable file
View file

0
styles.css Normal file → Executable file
View file