-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question sources #11658
Question sources #11658
Changes from 2 commits
61a7981
4c27e88
161fc19
00da242
43609a1
ba44fed
c92f831
8604198
fac89d6
af90191
8c2f050
912ff82
dbbbd5b
cfc9148
b2c54e8
6bb5b9c
b164ff3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*out | ||
*logs | ||
*actions | ||
*notifications | ||
*tools | ||
plugins | ||
user_trunk.yaml | ||
user.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Following source doesn't work in most setups | ||
ignored: | ||
- SC1090 | ||
- SC1091 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[settings] | ||
profile=black |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Autoformatter friendly markdownlint config (all formatting rules disabled) | ||
default: true | ||
blank_lines: false | ||
bullet: false | ||
html: false | ||
indentation: false | ||
line_length: false | ||
spaces: false | ||
url: false | ||
whitespace: false |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
enable=all | ||
source-path=SCRIPTDIR | ||
disable=SC2154 | ||
|
||
# If you're having issues with shellcheck following source, disable the errors via: | ||
# disable=SC1090 | ||
# disable=SC1091 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
rules: | ||
quoted-strings: | ||
required: only-when-needed | ||
extra-allowed: ["{|}"] | ||
empty-values: | ||
forbid-in-block-mappings: true | ||
forbid-in-flow-mappings: true | ||
key-duplicates: {} | ||
octal-values: | ||
forbid-implicit-octal: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Generic, formatter-friendly config. | ||
select = ["B", "D3", "E", "F"] | ||
|
||
# Never enforce `E501` (line length violations). This should be handled by formatters. | ||
ignore = ["E501"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
plugins: [ | ||
{ | ||
name: "preset-default", | ||
params: { | ||
overrides: { | ||
removeViewBox: false, // https://github.com/svg/svgo/issues/1128 | ||
sortAttrs: true, | ||
removeOffCanvasPaths: true, | ||
}, | ||
}, | ||
}, | ||
], | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# This file controls the behavior of Trunk: https://docs.trunk.io/cli | ||
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml | ||
version: 0.1 | ||
cli: | ||
version: 1.18.0 | ||
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins) | ||
plugins: | ||
sources: | ||
- id: trunk | ||
ref: v1.4.0 | ||
uri: https://github.com/trunk-io/plugins | ||
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes) | ||
runtimes: | ||
enabled: | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) | ||
lint: | ||
enabled: | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- git-diff-check | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
actions: | ||
disabled: | ||
- git-lfs | ||
- trunk-announce | ||
- trunk-check-pre-push | ||
- trunk-fmt-pre-commit | ||
enabled: | ||
- trunk-upgrade-available |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
:appBarTitle="exam.title || ''" | ||
> | ||
<KCircularLoader v-if="loading" /> | ||
<div v-else > | ||
<div v-else> | ||
<KGrid :gridStyle="gridStyle"> | ||
<!-- this.$refs.questionListWrapper is referenced inside AnswerHistory for scrolling --> | ||
<KGridItem | ||
|
@@ -68,7 +68,7 @@ | |
<ResourceSyncingUiAlert v-else :multiple="false" /> | ||
</KPageContainer> | ||
|
||
|
||
|
||
<!-- below prev/next buttons in tab and DOM order, in page --> | ||
<!-- <KPageContainer v-if="!windowIsLarge"> | ||
|
@@ -94,7 +94,7 @@ | |
</main> | ||
</KGridItem> | ||
</KGrid> | ||
<BottomAppBar > | ||
<BottomAppBar> | ||
<KGrid> | ||
<KGridItem | ||
:layout12="{ span: 4 }" | ||
|
@@ -119,69 +119,68 @@ | |
</template> | ||
<span v-if="displayNavigationButtonLabel">{{ $tr('previousQuestion') }}</span> | ||
</KButton> | ||
</KGridItem> | ||
|
||
<KGridItem | ||
:layout12="{ span: 4 }" | ||
:layout8="{ span: 2 }" | ||
:layout4="{ span: 1 }" | ||
> | ||
<div class="" style="text-align:center"> | ||
<span>{{ $tr("numberOfAnsweredQuestion") }}</span> | ||
</div> | ||
</KGridItem> | ||
</KGridItem> | ||
|
||
<KGridItem | ||
:layout12="{ span: 4 }" | ||
:layout8="{ span: 4 }" | ||
:layout4="{ span: 2 }" | ||
:layout8="{ span: 2 }" | ||
:layout4="{ span: 1 }" | ||
> | ||
<div class="" style="float:right"> | ||
<KButton | ||
:disabled="questionNumber === exam.question_count - 1" | ||
:primary="true" | ||
:dir="layoutDirReset" | ||
:aria-label="$tr('nextQuestion')" | ||
:appearanceOverrides="navigationButtonStyle" | ||
@click="goToQuestion(questionNumber + 1)" | ||
|
||
> | ||
<span v-if="displayNavigationButtonLabel">{{ $tr('nextQuestion') }}</span> | ||
<template #iconAfter> | ||
<KIcon | ||
icon="forward" | ||
:color="$themeTokens.textInverted" | ||
:style="navigationIconStyleNext" | ||
/> | ||
</template> | ||
</KButton> | ||
</div> | ||
|
||
<!-- below prev/next buttons in tab and DOM order, in footer --> | ||
<!-- <div | ||
v-if="windowIsLarge" | ||
:dir="layoutDirReset" | ||
class="left-align" | ||
> | ||
<div class="" style="text-align:center"> | ||
<div v-if="!missingResources" class="answered"> | ||
{{ answeredText }} | ||
<div v-if="missingResources" class="nosubmit"> | ||
{{ $tr('unableToSubmit') }} | ||
</div> | ||
</div> | ||
<KButton | ||
v-if="!missingResources" | ||
:text="$tr('submitExam')" | ||
:primary="false" | ||
appearance="flat-button" | ||
@click="toggleModal" | ||
/> | ||
<div v-if="missingResources" class="nosubmit"> | ||
{{ $tr('unableToSubmit') }} | ||
</div> | ||
</div> --> | ||
</div> | ||
</KGridItem> | ||
|
||
|
||
<KGridItem | ||
:layout12="{ span: 4 }" | ||
:layout8="{ span: 4 }" | ||
:layout4="{ span: 2 }" | ||
> | ||
<div class="" style="float:right"> | ||
<div class="" style="float:right"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm wondering why the two floats are needed here. In this case I think that we could leverage some other CSS properties for a cleaner and more consistent alignment & layout. By using the In this case, I'd suggest trying the following structure -- which may not be exactly right but should hopefully demonstrate the idea:
This way it can be reasoned about kinda like: The |
||
<template v-if="questionNumber !== exam.question_count - 1"> | ||
<KButton | ||
:disabled="questionNumber === exam.question_count - 1" | ||
:primary="true" | ||
:dir="layoutDirReset" | ||
:aria-label="$tr('nextQuestion')" | ||
:appearanceOverrides="navigationButtonStyle" | ||
@click="goToQuestion(questionNumber + 1)" | ||
> | ||
<span v-if="displayNavigationButtonLabel">{{ $tr('nextQuestion') }}</span> | ||
<template #iconAfter> | ||
<KIcon | ||
icon="forward" | ||
:color="$themeTokens.textInverted" | ||
:style="navigationIconStyleNext" | ||
/> | ||
</template> | ||
</KButton> | ||
</template> | ||
|
||
<template v-else> | ||
<KButton | ||
v-if="!missingResources" | ||
:text="$tr('submitExam')" | ||
:primary="true" | ||
appearance="raised-button" | ||
@click="toggleModal" | ||
/> | ||
</template> | ||
</div> | ||
</div> | ||
</kgriditem> | ||
</KGrid> | ||
</BottomAppBar> | ||
</div> | ||
|
||
|
||
|
||
<KModal | ||
|
@@ -231,8 +230,8 @@ | |
}, | ||
components: { | ||
AnswerHistory, | ||
UiAlert, | ||
UiIconButton, | ||
BottomAppBar, | ||
TimeDuration, | ||
SuggestedTime, | ||
|
@@ -356,7 +355,7 @@ | |
// https://github.com/vuejs/vue/issues/2870#issuecomment-219096773 | ||
return debounce(this.setAndSaveCurrentExamAttemptLog, 500); | ||
}, | ||
bottomBarLayoutDirection() { | ||
// Allows contents to be displayed visually in reverse-order, | ||
// but semantically in correct order. | ||
return this.isRtl ? 'ltr' : 'rtl'; | ||
|
@@ -497,7 +496,7 @@ | |
}, | ||
$trs: { | ||
submitExam: { | ||
message: 'Submit quiz', | ||
message: 'Submit', | ||
context: | ||
'Action that learner takes to submit their quiz answers so that the coach can review them.', | ||
}, | ||
|
@@ -536,10 +535,6 @@ | |
context: | ||
'Indicates that a learner cannot submit the quiz because they are not able to see all the questions.', | ||
}, | ||
numberOfAnsweredQuestion:{ | ||
message:'1 of 6 answered', | ||
context:"Displays the number of the answered quiz questions" | ||
} | ||
}, | ||
}; | ||
|
||
|
@@ -550,7 +545,7 @@ | |
|
||
.answered { | ||
display: inline-block; | ||
margin-right: 8px; | ||
margin-right: 700px; | ||
margin-left: 8px; | ||
white-space: nowrap; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what
.trunk
is but you can add it to the .gitignore file in the Kolibri project root.Once you do that you'll need to run
git rm -r --cached .trunk
to remove it from the git index. It will keep the files on your local machine, however. Relevant StackOverflow