Compare commits
	
		
			10 commits
		
	
	
		
			8404eeb6fb
			...
			0b67abeab9
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
							 | 
						0b67abeab9 | ||
| 
							 | 
						a75f0af2f6 | ||
| 
							 | 
						72d7bef508 | ||
| 
							 | 
						be14ca1755 | ||
| 
							 | 
						b2e263c9bf | ||
| 
							 | 
						b70d35c6a7 | ||
| 
							 | 
						055ee15454 | ||
| 
							 | 
						161670f407 | ||
| 
							 | 
						9da2b55bf7 | ||
| 
							 | 
						cd7ba7c5d0 | 
					 8 changed files with 7 additions and 8 deletions
				
			
		| 
						 | 
					@ -5,5 +5,10 @@ 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") {
 | 
						} 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);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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
									
								
							
							
						
						
									
										0
									
								
								doc/.gitkeep
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										
											BIN
										
									
								
								doc/timetable_screenshot1.png
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								doc/timetable_screenshot1.png
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 30 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								doc/timetable_screenshot2.png
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								doc/timetable_screenshot2.png
									
										
									
									
									
										Executable file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 30 KiB  | 
							
								
								
									
										0
									
								
								module.js
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								module.js
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										0
									
								
								styles.css
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								styles.css
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
		Loading…
	
	Add table
		
		Reference in a new issue