Skip to content
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

Changed KContentRenderer to ContentRenderer. #11289

Merged
merged 3 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kolibri/core/assets/src/core-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Vuex from 'vuex';
import VueCompositionApi from '@vue/composition-api';
import KThemePlugin from 'kolibri-design-system/lib/KThemePlugin';
import heartbeat from 'kolibri.heartbeat';
import KContentRenderer from '../views/ContentRenderer/KContentRenderer';
import ContentRenderer from '../views/ContentRenderer';
import initializeTheme from '../styles/initializeTheme';
import { i18nSetup } from '../utils/i18n';
import setupPluginMediator from './pluginMediator';
Expand Down Expand Up @@ -64,7 +64,7 @@ Vue.use(VueCompositionApi);
// - Register KDS components
Vue.use(KThemePlugin);

Vue.component('KContentRenderer', KContentRenderer);
Vue.component('ContentRenderer', ContentRenderer);

// Start the heartbeat polling here, as any URL needs should be set by now
heartbeat.startPolling();
Expand Down
4 changes: 2 additions & 2 deletions kolibri/core/assets/src/views/ExamReport/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
@select="navigateToQuestionAttempt"
/>
</div>
<KContentRenderer
<ContentRenderer
:itemId="renderableItemId"
:allowHints="false"
:kind="exercise.kind"
Expand Down Expand Up @@ -357,7 +357,7 @@
: this.attemptLogs[this.questionNumber].item;
},
renderableItemId() {
// This item value is used to pass into KContentRenderer to set the correct question,
// This item value is used to pass into ContentRenderer to set the correct question,
// so reclaim the actual item id value here by splitting on ':'.
// This is only needed in cases where the item id has been artificially generated for coach
// assigned quizzes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
:selectedInteractionIndex="interactionIndex"
@select="navigateToNewInteraction($event)"
/>
<KContentRenderer
<ContentRenderer
v-if="currentInteraction"
:itemId="currentLearner.item"
:assessment="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<h3 v-if="content && content.available" class="question-title">
{{ currentQuestion.title }}
</h3>
<KContentRenderer
<ContentRenderer
v-if="content && content.available && questionId"
ref="contentRenderer"
:kind="content.kind"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h2 v-if="isExercise" class="header">
{{ header }}
</h2>
<KContentRenderer
<ContentRenderer
v-if="content.available"
:class="{ hof: isExercise }"
:showCorrectAnswer="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ oriented data synchronization.
/>
</UiAlert>
<div class="content-wrapper" :style="{ backgroundColor: this.$themePalette.grey.v_100 }">
<KContentRenderer
<ContentRenderer
ref="contentRenderer"
:kind="kind"
:lang="lang"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div>
<template v-if="sessionReady">
<KContentRenderer
<ContentRenderer
v-if="!assessment"
class="content-renderer"
v-bind="contentProps"
Expand Down
2 changes: 1 addition & 1 deletion kolibri/plugins/learn/assets/src/views/ContentPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div>

<template v-if="sessionReady">
<KContentRenderer
<ContentRenderer
v-if="!content.assessmentmetadata"
class="content-renderer"
:kind="content.kind"
Expand Down
2 changes: 1 addition & 1 deletion kolibri/plugins/learn/assets/src/views/ExamPage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<h1>
{{ $tr('question', { num: questionNumber + 1, total: exam.question_count }) }}
</h1>
<KContentRenderer
<ContentRenderer
v-if="content && itemId"
ref="contentRenderer"
:kind="content.kind"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<h1>
{{ $tr('question', { num: questionNumber + 1, total: questionsTotal }) }}
</h1>
<KContentRenderer
<ContentRenderer
v-if="itemId"
ref="contentRenderer"
:kind="content.kind"
Expand Down
4 changes: 2 additions & 2 deletions packages/kolibri-tools/jest.conf/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ Vue.use(VueMeta);
Vue.use(KThemePlugin);
Vue.use(VueCompositionApi);

Vue.component('KContentRenderer', {
Vue.component('ContentRenderer', {
render(h) {
return h('p', 'KContentRenderer');
return h('p', 'ContentRenderer');
},
});

Expand Down