| 
						
					 | 
					 | 
					@ -7,6 +7,7 @@
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					<script setup>
 | 
					 | 
					 | 
					 | 
					<script setup>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import { ref, reactive } from 'vue'
 | 
					 | 
					 | 
					 | 
					import { ref, reactive } from 'vue'
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					import i18n from '@/i18n.js'
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import { getCourses } from '@/rest/courses.js'
 | 
					 | 
					 | 
					 | 
					import { getCourses } from '@/rest/courses.js'
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import { ForumsOfCurrentCourse, getForumsOfCourse, createForum } from '@/rest/forum.js'
 | 
					 | 
					 | 
					 | 
					import { ForumsOfCurrentCourse, getForumsOfCourse, createForum } from '@/rest/forum.js'
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import { PostsOfCurrentForum, getPostsOfForum, createPost } from '@/rest/forum.js'
 | 
					 | 
					 | 
					 | 
					import { PostsOfCurrentForum, getPostsOfForum, createPost } from '@/rest/forum.js'
 | 
				
			
			
		
	
	
		
		
			
				
					
					| 
						
					 | 
					 | 
					@ -34,7 +35,7 @@ const addPostContent = ref("");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								<select id="forum" value="" v-model="selectedForum"  @change="getPostsOfForum(selectedForum !== 'create' ? selectedForum : null)" v-if="ForumsOfCurrentCourse != null">
 | 
					 | 
					 | 
					 | 
								<select id="forum" value="" v-model="selectedForum"  @change="getPostsOfForum(selectedForum !== 'create' ? selectedForum : null)" v-if="ForumsOfCurrentCourse != null">
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									<option v-for="forum in ForumsOfCurrentCourse" :value=forum.id>{{forum.name}}</option>
 | 
					 | 
					 | 
					 | 
									<option v-for="forum in ForumsOfCurrentCourse" :value=forum.id>{{forum.name}}</option>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									<option v-if="(Role === 'Admin' || Role === 'Teacher') && ForumsOfCurrentCourse != null" value="create">Create Forum</option>
 | 
					 | 
					 | 
					 | 
									<option v-if="(Role === 'Admin' || Role === 'Teacher') && ForumsOfCurrentCourse != null" value="create">{{ i18n("forum.create") }}</option>
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								</select>
 | 
					 | 
					 | 
					 | 
								</select>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							</div>
 | 
					 | 
					 | 
					 | 
							</div>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							<div id="PostSelector" v-if="PostsOfCurrentForum != null">
 | 
					 | 
					 | 
					 | 
							<div id="PostSelector" v-if="PostsOfCurrentForum != null">
 | 
				
			
			
		
	
	
		
		
			
				
					
					| 
						
					 | 
					 | 
					@ -56,13 +57,13 @@ const addPostContent = ref("");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							<!-- Popup to add forum -->
 | 
					 | 
					 | 
					 | 
							<!-- Popup to add forum -->
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							<div id="addForumForm" v-if="selectedForum === 'create'" @keyup.enter="createForum(selectedCourse, addForumName); selectedForum = '';">
 | 
					 | 
					 | 
					 | 
							<div id="addForumForm" v-if="selectedForum === 'create'" @keyup.enter="createForum(selectedCourse, addForumName); selectedForum = '';">
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								<label>New Forum:</label>
 | 
					 | 
					 | 
					 | 
								<label>{{ i18n("forum.create.name") }}</label>
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								<input type="text" placeholder="Name" v-model=addForumName  />
 | 
					 | 
					 | 
					 | 
								<input type="text" placeholder="Name" v-model=addForumName  />
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							</div>
 | 
					 | 
					 | 
					 | 
							</div>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							<!-- Popup to add Post -->
 | 
					 | 
					 | 
					 | 
							<!-- Popup to add Post -->
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							<div id="addPostForm" v-if=addPost>
 | 
					 | 
					 | 
					 | 
							<div id="addPostForm" v-if=addPost>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								<label>New Post:</label>
 | 
					 | 
					 | 
					 | 
								<label>i18n("forum.post.create.name")</label>
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								<input type="text" placeholder="subject" v-model=addPostSubject @keyup.enter="createPost(selectedForum, addPostSubject, addPostContent); addPost = false;"/>
 | 
					 | 
					 | 
					 | 
								<input type="text" placeholder="subject" v-model=addPostSubject @keyup.enter="createPost(selectedForum, addPostSubject, addPostContent); addPost = false;"/>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								<textarea v-model="addPostContent" placeholder=content></textarea>
 | 
					 | 
					 | 
					 | 
								<textarea v-model="addPostContent" placeholder=content></textarea>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								<input type="submit" value="send" @click="createPost(selectedForum, addPostSubject, addPostContent); addPost = false;">
 | 
					 | 
					 | 
					 | 
								<input type="submit" value="send" @click="createPost(selectedForum, addPostSubject, addPostContent); addPost = false;">
 | 
				
			
			
		
	
	
		
		
			
				
					
					| 
						
					 | 
					 | 
					
 
 |