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:
 | 
			
		||||
 | 
			
		||||
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") {
 | 
			
		||||
	} elseif ($USER->department == "Lehrer" || $USER->department == "Lehrer_fvs") {
 | 
			
		||||
		$teacher = $USER->username;
 | 
			
		||||
		$teacher = str_replace("l_", "", $teacher);
 | 
			
		||||
		$teacher = str_replace("-fvs", "", $teacher);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -87,15 +87,9 @@ 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
									
										
									
									
									
										
										
										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