Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
Vips
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Vips
Commits
2c66f24b
Commit
2c66f24b
authored
2 years ago
by
Elmar Ludwig
Browse files
Options
Downloads
Patches
Plain Diff
clean up CSS for courseware block, re #118
parent
69819006
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
controllers/api.php
+2
-0
2 additions, 0 deletions
controllers/api.php
css/vips.css
+5
-27
5 additions, 27 deletions
css/vips.css
js/test-block.js
+12
-11
12 additions, 11 deletions
js/test-block.js
with
19 additions
and
38 deletions
controllers/api.php
+
2
−
0
View file @
2c66f24b
...
@@ -86,6 +86,7 @@ class ApiController extends StudipController
...
@@ -86,6 +86,7 @@ class ApiController extends StudipController
'type'
=>
$exercise
->
type
,
'type'
=>
$exercise
->
type
,
'title'
=>
$exercise
->
title
,
'title'
=>
$exercise
->
title
,
'template'
=>
$template
->
render
(),
'template'
=>
$template
->
render
(),
'item_count'
=>
$exercise
->
itemCount
(),
'show_solution'
=>
$template
->
show_solution
'show_solution'
=>
$template
->
show_solution
];
];
}
}
...
@@ -127,6 +128,7 @@ class ApiController extends StudipController
...
@@ -127,6 +128,7 @@ class ApiController extends StudipController
'type'
=>
$exercise
->
type
,
'type'
=>
$exercise
->
type
,
'title'
=>
$exercise
->
title
,
'title'
=>
$exercise
->
title
,
'template'
=>
$template
->
render
(),
'template'
=>
$template
->
render
(),
'item_count'
=>
$exercise
->
itemCount
(),
'show_solution'
=>
$template
->
show_solution
'show_solution'
=>
$template
->
show_solution
];
];
...
...
This diff is collapsed.
Click to expand it.
css/vips.css
+
5
−
27
View file @
2c66f24b
...
@@ -104,7 +104,6 @@ button.vips_file_upload:hover {
...
@@ -104,7 +104,6 @@ button.vips_file_upload:hover {
}
}
.ui-tabs.ui-widget-content
{
.ui-tabs.ui-widget-content
{
border
:
1px
solid
#c5c7ca
;
border
:
1px
solid
var
(
--light-gray-color-40
,
#c5c7ca
);
border
:
1px
solid
var
(
--light-gray-color-40
,
#c5c7ca
);
margin-top
:
1.5ex
;
margin-top
:
1.5ex
;
padding
:
0
;
padding
:
0
;
...
@@ -113,7 +112,6 @@ button.vips_file_upload:hover {
...
@@ -113,7 +112,6 @@ button.vips_file_upload:hover {
.ui-tabs
.ui-tabs-nav
{
.ui-tabs
.ui-tabs-nav
{
background
:
none
;
background
:
none
;
border
:
none
;
border
:
none
;
border-bottom
:
1px
solid
#c5c7ca
;
border-bottom
:
1px
solid
var
(
--light-gray-color-40
,
#c5c7ca
);
border-bottom
:
1px
solid
var
(
--light-gray-color-40
,
#c5c7ca
);
}
}
...
@@ -123,19 +121,16 @@ button.vips_file_upload:hover {
...
@@ -123,19 +121,16 @@ button.vips_file_upload:hover {
}
}
.ui-tabs
.ui-tabs-tab
:hover
{
.ui-tabs
.ui-tabs-tab
:hover
{
border-bottom
:
3px
solid
#b1b4b8
;
border-bottom
:
3px
solid
var
(
--dark-gray-color-40
,
#b1b4b8
);
border-bottom
:
3px
solid
var
(
--dark-gray-color-40
,
#b1b4b8
);
}
}
.ui-tabs
.ui-tabs-nav
li
.ui-tabs-active
{
.ui-tabs
.ui-tabs-nav
li
.ui-tabs-active
{
margin-bottom
:
0
;
margin-bottom
:
0
;
padding-bottom
:
0
;
padding-bottom
:
0
;
border-bottom
:
3px
solid
#636971
;
border-bottom
:
3px
solid
var
(
--light-gray-color-80
,
#636971
);
border-bottom
:
3px
solid
var
(
--light-gray-color-80
,
#636971
);
}
}
.ui-tabs
.ui-tabs-tab
.ui-tabs-anchor
{
.ui-tabs
.ui-tabs-tab
.ui-tabs-anchor
{
color
:
#28497c
;
color
:
var
(
--base-color
,
#28497c
);
color
:
var
(
--base-color
,
#28497c
);
padding
:
5px
15px
;
padding
:
5px
15px
;
}
}
...
@@ -179,7 +174,6 @@ button.vips_file_upload:hover {
...
@@ -179,7 +174,6 @@ button.vips_file_upload:hover {
}
}
.vips_output
{
.vips_output
{
background-color
:
#f5f6f6
;
background-color
:
var
(
--dark-gray-color-5
,
#f5f6f6
);
background-color
:
var
(
--dark-gray-color-5
,
#f5f6f6
);
max-height
:
30em
;
max-height
:
30em
;
min-height
:
1em
;
min-height
:
1em
;
...
@@ -490,9 +484,7 @@ button.vips_file_upload:hover {
...
@@ -490,9 +484,7 @@ button.vips_file_upload:hover {
}
}
#options-toggle
+
.caption
{
#options-toggle
+
.caption
{
background-color
:
#e7ebf1
;
background-color
:
var
(
--fieldset-header
,
#e7ebf1
);
background-color
:
var
(
--fieldset-header
,
#e7ebf1
);
color
:
#28497c
;
color
:
var
(
--brand-color-dark
,
#28497c
);
color
:
var
(
--brand-color-dark
,
#28497c
);
cursor
:
pointer
;
cursor
:
pointer
;
font-weight
:
bold
;
font-weight
:
bold
;
...
@@ -525,7 +517,7 @@ button.vips_file_upload:hover {
...
@@ -525,7 +517,7 @@ button.vips_file_upload:hover {
}
}
#character_picker
.block
{
#character_picker
.block
{
background-color
:
#e6e6e6
;
background-color
:
var
(
--fieldset-header
,
#e7ebf1
)
;
border-radius
:
0.25em
;
border-radius
:
0.25em
;
display
:
inline-block
;
display
:
inline-block
;
margin
:
0.25em
0.25em
;
margin
:
0.25em
0.25em
;
...
@@ -533,7 +525,7 @@ button.vips_file_upload:hover {
...
@@ -533,7 +525,7 @@ button.vips_file_upload:hover {
}
}
#character_picker
.block
.block_title
{
#character_picker
.block
.block_title
{
background-color
:
#cfcfcf
;
background-color
:
var
(
--fieldset-border
,
#d0d7e3
)
;
border-radius
:
0.25em
0
0
0.25em
;
border-radius
:
0.25em
0
0
0.25em
;
display
:
inline-block
;
display
:
inline-block
;
font-weight
:
bold
;
font-weight
:
bold
;
...
@@ -541,15 +533,13 @@ button.vips_file_upload:hover {
...
@@ -541,15 +533,13 @@ button.vips_file_upload:hover {
}
}
#character_picker
.block
button
{
#character_picker
.block
button
{
cursor
:
pointer
;
background-color
:
#e6e6e6
;
border
:
0
;
border
:
0
;
border-radius
:
0.25em
;
border-radius
:
0.25em
;
cursor
:
pointer
;
padding
:
0
0.25em
;
padding
:
0
0.25em
;
}
}
#character_picker
.block
button
:hover
{
#character_picker
.block
button
:hover
{
background-color
:
#f5f6f6
;
background-color
:
var
(
--dark-gray-color-5
,
#f5f6f6
);
background-color
:
var
(
--dark-gray-color-5
,
#f5f6f6
);
}
}
...
@@ -572,16 +562,7 @@ button.vips_file_upload:hover {
...
@@ -572,16 +562,7 @@ button.vips_file_upload:hover {
}
}
.cw-exercise-header
{
.cw-exercise-header
{
background-color
:
#e7ebf1
;
background-color
:
var
(
--fieldset-header
,
#e7ebf1
);
border
:
1px
solid
#d0d7e3
;
border
:
1px
solid
var
(
--fieldset-border
,
#d0d7e3
);
border-bottom
:
none
;
color
:
#28497c
;
color
:
var
(
--brand-color-dark
,
#28497c
);
display
:
flex
;
display
:
flex
;
font-weight
:
bold
;
padding
:
6px
0
;
}
}
.cw-exercise-header
button
{
.cw-exercise-header
button
{
...
@@ -594,16 +575,13 @@ button.vips_file_upload:hover {
...
@@ -594,16 +575,13 @@ button.vips_file_upload:hover {
.cw-exercise-header
span
{
.cw-exercise-header
span
{
flex-grow
:
1
;
flex-grow
:
1
;
text-align
:
center
;
}
}
.cw-exercise-fieldset
header
{
.cw-exercise-fieldset
header
{
background-color
:
#e7ebf1
;
background-color
:
var
(
--fieldset-header
,
#e7ebf1
);
background-color
:
var
(
--fieldset-header
,
#e7ebf1
);
color
:
#28497c
;
color
:
var
(
--brand-color-dark
,
#28497c
);
color
:
var
(
--brand-color-dark
,
#28497c
);
font-weight
:
600
;
font-weight
:
600
;
margin
:
14px
0
8px
-10px
;
margin
:
14px
0
8px
-10px
;
padding
:
8
px
;
padding
:
6px
10
px
;
width
:
calc
(
100%
+
4px
)
;
width
:
100%
;
}
}
This diff is collapsed.
Click to expand it.
js/test-block.js
+
12
−
11
View file @
2c66f24b
...
@@ -12,7 +12,7 @@ const CoursewareTestBlock = {
...
@@ -12,7 +12,7 @@ const CoursewareTestBlock = {
@closeEdit="initCurrentData"
@closeEdit="initCurrentData"
>
>
<template #content>
<template #content>
<div class="cw-exercise-header" v-if="assignment">
<div class="
cw-block-title
cw-exercise-header" v-if="assignment">
<template v-if="exercises.length > 1">
<template v-if="exercises.length > 1">
<button @click="prevExercise" :title="$gettext('Zurück')">
<button @click="prevExercise" :title="$gettext('Zurück')">
<studip-icon shape="arr_1left" size="20"/>
<studip-icon shape="arr_1left" size="20"/>
...
@@ -33,7 +33,7 @@ const CoursewareTestBlock = {
...
@@ -33,7 +33,7 @@ const CoursewareTestBlock = {
<form class="default" autocomplete="off" :exercise="exercise.id">
<form class="default" autocomplete="off" :exercise="exercise.id">
<fieldset class="cw-exercise-fieldset" v-html="exercise.template" ref="content">
<fieldset class="cw-exercise-fieldset" v-html="exercise.template" ref="content">
</fieldset>
</fieldset>
<footer v-show="assignment.reset_allowed || !exercise.show_solution">
<footer v-show="
exercise.item_count && (
assignment.reset_allowed || !exercise.show_solution
)
">
<button
<button
v-show="!exercise.show_solution"
v-show="!exercise.show_solution"
class="button accept"
class="button accept"
...
@@ -54,9 +54,8 @@ const CoursewareTestBlock = {
...
@@ -54,9 +54,8 @@ const CoursewareTestBlock = {
</template>
</template>
<component
<component
:is="coursewarePluginComponents.CoursewareCompanionBox"
:is="coursewarePluginComponents.CoursewareCompanionBox"
:msgCompanion="errorMessage || $gettext('Es wurde noch kein Aufgabenblatt ausgewählt.')"
:msgCompanion="errorMessage" mood="sad"
mood="sad"
v-if="errorMessage !== null"
v-if="assignment === null"
/>
/>
</template>
</template>
<template v-if="canEdit" #edit>
<template v-if="canEdit" #edit>
...
@@ -90,7 +89,9 @@ const CoursewareTestBlock = {
...
@@ -90,7 +89,9 @@ const CoursewareTestBlock = {
</label>
</label>
</form>
</form>
</template>
</template>
<template #info><translate>Informationen zum Testblock</translate></template>
<template #info>
<translate>Informationen zum Testblock</translate>
</template>
</component>
</component>
<studip-dialog
<studip-dialog
v-if="showResetDialog"
v-if="showResetDialog"
...
@@ -127,6 +128,7 @@ const CoursewareTestBlock = {
...
@@ -127,6 +128,7 @@ const CoursewareTestBlock = {
parent
:
this
.
block
,
parent
:
this
.
block
,
relationship
:
'
container
'
,
relationship
:
'
container
'
,
});
});
return
this
.
$store
.
dispatch
(
'
updateBlockInContainer
'
,
{
return
this
.
$store
.
dispatch
(
'
updateBlockInContainer
'
,
{
attributes
,
attributes
,
blockId
:
this
.
block
.
id
,
blockId
:
this
.
block
.
id
,
...
@@ -160,8 +162,10 @@ const CoursewareTestBlock = {
...
@@ -160,8 +162,10 @@ const CoursewareTestBlock = {
},
},
loadSelectedAssignment
()
{
loadSelectedAssignment
()
{
if
(
this
.
assignment_id
===
''
)
{
if
(
this
.
assignment_id
===
''
)
{
return
false
;
this
.
errorMessage
=
this
.
$gettext
(
'
Es wurde noch kein Aufgabenblatt ausgewählt.
'
);
return
;
}
}
this
.
assignment
=
null
;
this
.
assignment
=
null
;
this
.
errorMessage
=
null
;
this
.
errorMessage
=
null
;
this
.
exercises
=
[];
this
.
exercises
=
[];
...
@@ -181,9 +185,7 @@ const CoursewareTestBlock = {
...
@@ -181,9 +185,7 @@ const CoursewareTestBlock = {
reloadExercise
(
exercise_id
)
{
reloadExercise
(
exercise_id
)
{
$
.
get
(
vips_url
(
'
api/exercise/
'
+
this
.
assignment
.
id
+
'
/
'
+
exercise_id
))
$
.
get
(
vips_url
(
'
api/exercise/
'
+
this
.
assignment
.
id
+
'
/
'
+
exercise_id
))
.
done
(
response
=>
{
.
done
(
response
=>
{
this
.
exercises
=
this
.
exercises
.
map
((
exercise
)
=>
{
this
.
$set
(
this
.
exercises
,
this
.
exercise_pos
,
response
);
return
exercise
.
id
===
exercise_id
?
response
:
exercise
;
});
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
loadMathjax
();
this
.
loadMathjax
();
vips_post_render
(
this
.
$refs
.
content
);
vips_post_render
(
this
.
$refs
.
content
);
...
@@ -214,7 +216,6 @@ const CoursewareTestBlock = {
...
@@ -214,7 +216,6 @@ const CoursewareTestBlock = {
if
(
xhr
.
status
===
422
)
{
if
(
xhr
.
status
===
422
)
{
info
=
this
.
$gettext
(
'
Ihre Lösung ist leer und wurde nicht gespeichert.
'
);
info
=
this
.
$gettext
(
'
Ihre Lösung ist leer und wurde nicht gespeichert.
'
);
}
}
this
.
$store
.
dispatch
(
'
companionError
'
,
{
info
:
info
});
this
.
$store
.
dispatch
(
'
companionError
'
,
{
info
:
info
});
})
})
.
done
(()
=>
{
.
done
(()
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment