Skip to content

Commit

Permalink
Merge pull request #27 from Aar-if/main
Browse files Browse the repository at this point in the history
Publish added
  • Loading branch information
itsvick authored Oct 10, 2024
2 parents b3cff32 + 27acd1b commit e820763
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/CourseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ interface ContentCardProps {
status: string;
identifier?: string;
mimeType?: string;
mode?:string;
onDelete?: () => void;
}

Expand All @@ -34,6 +35,7 @@ const CourseCard: React.FC<ContentCardProps> = ({
status,
identifier,
mimeType,
mode,
onDelete,
}) => {
const theme = useTheme<any>();
Expand All @@ -42,7 +44,7 @@ const CourseCard: React.FC<ContentCardProps> = ({
if (mimeType === "application/vnd.sunbird.questionset") {
router.push({
pathname: `/editor`,
query: { identifier },
query: { identifier, mode },
});
}
};
Expand Down
3 changes: 2 additions & 1 deletion src/components/QuestionSetEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useRouter } from "next/router";
const QuestionSetEditor: React.FC = () => {
const router = useRouter();
const { identifier } = router.query;
const { mode } = router.query;
const questionSetEditorConfig = {
context: {
programId: "",
Expand Down Expand Up @@ -67,7 +68,7 @@ const QuestionSetEditor: React.FC = () => {
},
},
config: {
mode: "edit",
mode: mode || "edit",
enableQuestionCreation: true,
enableAddFromLibrary: true,
editableFields: {
Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/content/submitted/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const SubmittedForReviewPage = () => {
status={content.status}
identifier={content?.identifier}
mimeType={content?.mimeType}
mode={'review'}
onDelete={() => handleDelete(index)}
/>
</Box>
Expand Down

0 comments on commit e820763

Please sign in to comment.