diff --git a/app/Http/Controllers/QuestionBankController.php b/app/Http/Controllers/QuestionBankController.php
index ed324eae0..891b23776 100644
--- a/app/Http/Controllers/QuestionBankController.php
+++ b/app/Http/Controllers/QuestionBankController.php
@@ -406,9 +406,10 @@ function getAll(Request $request,
->toArray();
$questions_info = DB::table('questions')
+ ->join('formatted_question_types','questions.id','=','formatted_question_types.question_id')
->select(
- 'id AS question_id',
- 'id',
+ 'questions.id AS question_id',
+ 'questions.id',
DB::raw('CONCAT(library, "-", page_id) AS library_page_id'),
'library',
'page_id',
@@ -416,13 +417,13 @@ function getAll(Request $request,
'description',
'author',
'technology',
- 'question_type',
+ 'formatted_question_types.formatted_question_type AS question_type',
'qti_json',
'qti_json_type',
'h5p_type',
'technology_id',
'non_technology')
- ->whereIn('id', $question_ids)
+ ->whereIn('questions.id', $question_ids)
->get();
diff --git a/resources/js/components/questions/QuestionsGet.vue b/resources/js/components/questions/QuestionsGet.vue
index 23692d7a6..e3589b095 100644
--- a/resources/js/components/questions/QuestionsGet.vue
+++ b/resources/js/components/questions/QuestionsGet.vue
@@ -46,7 +46,7 @@
aria-label="Copy question ID"
@click.prevent="doCopy('questionID', 'The question ID has been copied to your clipboard.')"
>
-
+
@@ -60,14 +60,14 @@
aria-label="Copy Libretexts ID"
@click.prevent="doCopy('libretextsID')"
>
-
+
Technology URL:
+ />
- Please confirm that you would like to remove the question {{ questionToRemoveFromFavoritesFolder.title }} from
- the My Favorites folder {{ questionToRemoveFromFavoritesFolder.my_favorites_folder_name }}.
+ Please confirm that you would like to remove the question {{ questionToRemoveFromFavoritesFolder.title }} from
+ the My Favorites folder {{ questionToRemoveFromFavoritesFolder.my_favorites_folder_name }}.
-
+
@@ -230,7 +232,7 @@
size="sm"
@click="openShareModal()"
>
-
+
Share
-
+
-
+
Uploading file...
@@ -419,7 +421,7 @@
background="#FFFFFF"
/>
-
+
All questions
+ v-show="assignments.filter(assignment => assignment.topics.length).length"
+ >
{{ topic.name }}
+ >{{ topic.name }}
Filter
-
+
-
-
-
+
+
+
+
+
- {{ assignmentQuestion.question_id }}
+ v-if="!questionChosenFromAssignment() || questionSource === 'my_courses'"
+ :icon="barsIcon"
+ />
+ {{ assignmentQuestion.question_id }}
-
+
|
@@ -855,7 +858,7 @@
-
+
Loading
@@ -943,7 +946,7 @@
style="width:175px"
:options="allQuestionsTechnologyOptions"
size="sm"
- @change="webworkContentType = 'either'"
+ @change="changeTechnology"
/>
Nursing
-
+
{{
- formattedQuestionType ? formattedQuestionType : 'None Chosen'
- }}
+ formattedQuestionType ? formattedQuestionType : 'None Chosen'
+ }}
Choose Type
@@ -1062,7 +1065,7 @@
>
ADAPT ID
-
+
Title
-
+
Tag(s)
-
+
{{
- Number(allQuestionsTotalRows).toLocaleString()
- }} questions
+ Number(allQuestionsTotalRows).toLocaleString()
+ }} questions
-
+
+ >
Show Descriptions
@@ -1217,30 +1220,17 @@
aria-label="Copy Question ID"
@click.prevent="doCopy(`question_id-${data.item.question_id}`,'The question ID has been copied to your clipboard.')"
>
-
+
{{ allQuestionsTechnologyOptions.find(item => item.value === data.item.technology).text }}
-
+
-
- {{ formatType(data.item.qti_json_type) }}
-
-
- {{ formatType(data.item.h5p_type) }}
-
-
- {{
- ['exposition', 'report'].includes(data.item.question_class) ? data.item.question_class : 'open-ended'
- }}
-
-
- unknown
-
+ {{ data.item.question_type ? data.item.question_type : 'Unknown' }}
-
+
Import Questions
@@ -1727,11 +1717,87 @@ export default {
},
methods: {
initCentrifuge,
+ badH5PFormattedTypes () {
+ return [
+ 'Accordion',
+ 'Advent Calendar (beta)',
+ 'AR Scavenger (beta)',
+ 'Branching Scenario',
+ 'Cornell Notes',
+ 'Image Juxtaposition',
+ 'Image Zoom',
+ 'KewAr Code',
+ 'None Provided',
+ 'Questionnaire',
+ 'Speak the Words',
+ 'Advent Calendar (beta) Test',
+ 'Arithmetic Quiz',
+ 'Chart',
+ 'Course Presentation',
+ 'Documentation Tool',
+ 'Flashcards',
+ 'Iframe Embedder',
+ 'Information Wall',
+ 'Structure Strip',
+ 'Twitter User Feed',
+ 'Agamotto',
+ 'Audio',
+ 'Collage',
+ 'Memory Game',
+ 'Personality Quiz',
+ 'Virtual Tour (360)',
+ 'Appear.in for Chat and Talk',
+ 'Audio Recorder',
+ 'Dialog Cards',
+ 'Guess the Answer',
+ 'Image Hotspots',
+ 'Image Slider',
+ 'Timeline'
+ ]
+ },
+ nursingFormattedQuestionTypes () {
+ return ['Bow Tie',
+ 'Multiple Choice',
+ 'Matrix Multiple Choice',
+ 'Multiple Response Select N',
+ 'Multiple Response Select All That Apply',
+ 'Highlight Table',
+ 'Highlight Text',
+ 'Multiple Response Grouping',
+ 'Drop-Down Table',
+ 'Drop-Down Dyad',
+ 'Drop-Down Triad',
+ 'Drop-Down Cloze',
+ 'Matrix Multiple Response',
+ 'Drag and Drop Cloze'
+ ]
+ },
+ changeTechnology () {
+ this.webworkContentType = 'either'
+ if (this.allQuestionsTechnology === 'text') {
+ this.formattedQuestionType = null
+ }
+ },
initChooseType () {
- this.formattedQuestionTypesOptionsByTechnology = this.formattedQuestionTypesOptions
- console.log(this.allQuestionsTechnology)
+ if (this.allQuestionsTechnology === 'text') {
+ this.$noty.info('Since you have chosen open-ended as your technology, you will only receive open-ended questions.')
+ return false
+ }
+ const goodFormattedOptions = []
+ const badH5PFormattedTypes = this.badH5PFormattedTypes()
+ console.log(badH5PFormattedTypes)
+ console.log(this.formattedQuestionTypesOptions)
+ for (let i = 0; i < this.formattedQuestionTypesOptions.length; i++) {
+ const currentType = this.formattedQuestionTypesOptions[i].formatted_question_type
+ console.log(currentType)
+ if (!badH5PFormattedTypes.includes(currentType)) {
+ goodFormattedOptions.push(this.formattedQuestionTypesOptions[i])
+ }
+ }
+
+ this.formattedQuestionTypesOptionsByTechnology = goodFormattedOptions
if (this.allQuestionsTechnology !== 'any') {
- this.formattedQuestionTypesOptionsByTechnology = this.formattedQuestionTypesOptions.filter(item => item.technology === this.allQuestionsTechnology)
+ this.formattedQuestionTypesOptionsByTechnology = this.formattedQuestionTypesOptionsByTechnology.filter(item => item.technology === this.allQuestionsTechnology)
if (['basic', 'nursing'].includes(this.qtiContentType)) {
let options
switch (this.qtiContentType) {
@@ -1740,21 +1806,7 @@ export default {
'Multiple Choice', 'True/False', 'Numerical', 'Multiple Answers', 'Fill-in-the-blank', 'Select Choice', 'Matching']
break
case ('nursing'):
- options = ['Bow Tie',
- 'Multiple Choice',
- 'Matrix Multiple Choice',
- 'Multiple Response Select N',
- 'Multiple Response Select All That Apply',
- 'Highlight Table',
- 'Highlight Text',
- 'Multiple Response Grouping',
- 'Drop-Down Table',
- 'Drop-Down Dyad',
- 'Drop-Down Triad',
- 'Drop-Down Cloze',
- 'Matrix Multiple Response',
- 'Drag and Drop Cloze'
- ]
+ options = this.nursingFormattedQuestionTypes()
break
}
this.formattedQuestionTypesOptionsByTechnology = this.formattedQuestionTypesOptionsByTechnology.filter(item => options.includes(item.formatted_question_type))