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:
 | 
			
		||||
 | 
			
		||||
Students view:
 | 
			
		||||
 | 
			
		||||

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

 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -73,7 +73,7 @@ class block_timetable extends block_base {
 | 
			
		|||
		$class = $this->page->course->shortname;
 | 
			
		||||
            	$this->content->text .= "Stundenplan der Klasse $class<br>";
 | 
			
		||||
		$ttable = new timetable('class',$class);
 | 
			
		||||
	} elseif ($USER->department == "Lehrer" || $USER->department == "Lehrer_fvs") {
 | 
			
		||||
	} elseif ($USER->department == "Lehrer") {
 | 
			
		||||
		$teacher = $USER->username;
 | 
			
		||||
		$teacher = str_replace("l_", "", $teacher);
 | 
			
		||||
		$teacher = str_replace("-fvs", "", $teacher);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -87,9 +87,15 @@ class timetable {
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
	$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++) {
 | 
			
		||||
		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)) {
 | 
			
		||||
			foreach ($result as $substitution) {
 | 
			
		||||
				$this->data[$i+1][$substitution->period]['substitution'][] = $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