Course home: Add course tool settings

pull/3984/head
Julio 4 years ago
parent 573c631f35
commit 663be81fdd
  1. 12
      assets/vue/components/course/CourseToolList.vue
  2. 22
      assets/vue/views/course/Home.vue

@ -37,6 +37,14 @@
size="lg"
/>
</button>
<a
v-if="isCurrentTeacher"
:href="goToSettingCourseTool(course, tool)"
> <v-icon
icon="mdi-cog" size="lg"
/>
</a>
</div>
</div>
</div>
@ -59,6 +67,10 @@ export default {
type: Function,
required: false
},
goToSettingCourseTool: {
type: Function,
required: false
},
},
computed: {
...mapGetters({

@ -9,7 +9,7 @@
<div class="flex flex-row" v-if="isCurrentTeacher && course">
<a class="btn btn-info mr-2 text-xs">
<v-icon icon="mdi-eye" class="pr-2" />
See as student
{{ $t('See as student') }}
</a>
<div class="relative">
@ -41,7 +41,7 @@
class=""
v-for="tool in tools.admin"
>
<q-item-section> {{ tool.ctool.nameToTranslate }}</q-item-section>
<q-item-section>{{ tool.ctool.nameToTranslate }}</q-item-section>
</q-item>
</q-list>
</div>
@ -63,22 +63,21 @@
</div>
<div class="mt-2 font-bold">
You don't have course content
{{ $t('You don\'t have course content') }}
</div>
<div>
Add a course introduction to display to your students.
{{ $t('Add a course introduction to display to your students.') }}
</div>
<a class="mt-2 btn btn-info">
<v-icon>mdi-plus</v-icon>
Course introduction
{{ $t('Course introduction') }}
</a>
</div>
</div>
<div v-if="isCurrentTeacher && course" class="flex justify-between border-b-2 border-gray-200">
<div class="text-h6 font-bold">
Tools
{{ $t('Tools') }}
</div>
<!-- <div>-->
<!-- <v-icon>-->
@ -97,6 +96,7 @@
:tool="tool"
:go-to-course-tool="goToCourseTool"
:change-visibility="changeVisibility"
:go-to-setting-course-tool="goToSettingCourseTool"
/>
<CourseToolList
@ -105,6 +105,7 @@
:tool="tool"
:go-to-course-tool="goToCourseTool"
:change-visibility="changeVisibility"
:go-to-setting-course-tool="goToSettingCourseTool"
/>
<ShortCutList
@ -146,6 +147,7 @@ export default {
dropdownOpen: false,
goToCourseTool,
changeVisibility,
goToSettingCourseTool,
goToShortCut
});
const route = useRoute()
@ -160,6 +162,12 @@ export default {
console.log(error);
});
function goToSettingCourseTool(course, tool) {
let url = '/course/' + courseId + '/settings/' + tool.tool.name + '?sid=' + sessionId;
return url;
}
function goToCourseTool(course, tool) {
let url = '/course/' + courseId + '/tool/' + tool.tool.name + '?sid=' + sessionId;

Loading…
Cancel
Save