mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: remove testing leftovers
This commit is contained in:
parent
b564c8db64
commit
c7061a26fa
16 changed files with 30 additions and 71 deletions
|
|
@ -61,7 +61,7 @@ function AccountCreation() {
|
|||
},
|
||||
validate,
|
||||
onSubmit: values => {
|
||||
console.log(install.data[1].slug)
|
||||
|
||||
let finalvalues = { ...values, org_slug: install.data[1].slug }
|
||||
let finalvalueswithoutpasswords = { ...values, password: '', confirmPassword: '', org_slug: install.data[1].slug }
|
||||
let install_data = { ...install.data, 3: finalvalues }
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ function DefaultElements() {
|
|||
setIsSubmitted(true)
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ const Finish = () => {
|
|||
const router = useRouter()
|
||||
|
||||
async function finishInstall() {
|
||||
console.log('install_data')
|
||||
|
||||
let install_data = { ...install.data, 5: { status: 'OK' } }
|
||||
|
||||
let data = await updateInstall(install_data, 6)
|
||||
|
|
@ -19,7 +19,7 @@ const Finish = () => {
|
|||
router.push('/install?step=6')
|
||||
}
|
||||
else {
|
||||
console.log('Error')
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ function OrgCreation() {
|
|||
setIsSubmitted(true)
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ function SampleData() {
|
|||
try {
|
||||
let username = install.data[3].username
|
||||
let slug = install.data[1].slug
|
||||
console.log(install.data)
|
||||
|
||||
createSampleDataInstall(username, slug)
|
||||
|
||||
let install_data = { ...install.data, 4: { status: 'OK' } }
|
||||
|
|
@ -24,7 +24,7 @@ function SampleData() {
|
|||
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ const Organizations = () => {
|
|||
|
||||
const handleSubmit = async (e: any) => {
|
||||
e.preventDefault();
|
||||
console.log({ name, description, email });
|
||||
|
||||
let logo = ''
|
||||
const status = await createNewOrganization({ name, description, email, logo, slug, default: false });
|
||||
alert(JSON.stringify(status));
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export async function generateMetadata(
|
|||
const org = await getOrganizationContextInfo(params.orgslug, { revalidate: 1800, tags: ['organizations'] });
|
||||
const col = await getCollectionByIdWithAuthHeader(params.collectionid, access_token_cookie ? access_token_cookie.value : null, { revalidate: 0, tags: ['collections'] });
|
||||
|
||||
console.log(col)
|
||||
|
||||
|
||||
return {
|
||||
title: `Collection : ${col.name} — ${org.name}`,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ function NewCollection(params: any) {
|
|||
|
||||
const handleSubmit = async (e: any) => {
|
||||
e.preventDefault();
|
||||
console.log("selectedCourses", selectedCourses);
|
||||
|
||||
const collection = {
|
||||
name: name,
|
||||
description: description,
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ function CourseEdit(params: any) {
|
|||
|
||||
// Submit new activity
|
||||
const submitActivity = async (activity: any) => {
|
||||
console.log("submitActivity", activity);
|
||||
|
||||
let org = await getOrganizationContextInfo(orgslug, { revalidate: 1800 });
|
||||
await updateChaptersMetadata(courseid, data);
|
||||
await createActivity(activity, activity.chapterId, org.org_id);
|
||||
|
|
@ -105,7 +105,7 @@ function CourseEdit(params: any) {
|
|||
|
||||
// Submit YouTube Video Upload
|
||||
const submitExternalVideo = async (external_video_data: any, activity: any, chapterId: string) => {
|
||||
console.log("submitExternalVideo", external_video_data);
|
||||
|
||||
await updateChaptersMetadata(courseid, data);
|
||||
await createExternalVideoActivity(external_video_data, activity, chapterId);
|
||||
await getCourseChapters();
|
||||
|
|
@ -115,7 +115,7 @@ function CourseEdit(params: any) {
|
|||
};
|
||||
|
||||
const deleteChapterUI = async (chapterId: any) => {
|
||||
console.log("deleteChapter", chapterId);
|
||||
|
||||
await deleteChapter(chapterId);
|
||||
getCourseChapters();
|
||||
revalidateTags(['courses'], orgslug);
|
||||
|
|
@ -123,7 +123,7 @@ function CourseEdit(params: any) {
|
|||
};
|
||||
|
||||
const updateChapters = () => {
|
||||
console.log(data);
|
||||
|
||||
updateChaptersMetadata(courseid, data);
|
||||
revalidateTags(['courses'], orgslug);
|
||||
router.refresh();
|
||||
|
|
@ -134,7 +134,7 @@ function CourseEdit(params: any) {
|
|||
*/
|
||||
|
||||
const openNewActivityModal = async (chapterId: any) => {
|
||||
console.log("openNewActivityModal", chapterId);
|
||||
|
||||
setNewActivityModal(true);
|
||||
setNewActivityModalData(chapterId);
|
||||
};
|
||||
|
|
@ -145,7 +145,7 @@ function CourseEdit(params: any) {
|
|||
};
|
||||
|
||||
const closeNewActivityModal = () => {
|
||||
console.log("closeNewActivityModal");
|
||||
|
||||
|
||||
setNewActivityModal(false);
|
||||
};
|
||||
|
|
@ -156,7 +156,7 @@ function CourseEdit(params: any) {
|
|||
*/
|
||||
const onDragEnd = (result: any) => {
|
||||
const { destination, source, draggableId, type } = result;
|
||||
console.log(result);
|
||||
|
||||
|
||||
// check if the activity is dropped outside the droppable area
|
||||
if (!destination) {
|
||||
|
|
@ -177,7 +177,7 @@ function CourseEdit(params: any) {
|
|||
...data,
|
||||
chapterOrder: newChapterOrder,
|
||||
};
|
||||
console.log(newState);
|
||||
|
||||
|
||||
setData(newState);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { updatePassword } from '@services/settings/password';
|
|||
function PasswordsClient() {
|
||||
const auth: any = React.useContext(AuthContext);
|
||||
|
||||
console.log('auth', auth)
|
||||
|
||||
|
||||
const updatePasswordUI = async (values: any) => {
|
||||
let user_id = auth.userInfo.user_object.user_id;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ function ImageBlockComponent(props: any) {
|
|||
let modifiedQuestions = [...questions];
|
||||
modifiedQuestions.splice(index, 1);
|
||||
setQuestions(modifiedQuestions);
|
||||
console.log(questions);
|
||||
|
||||
|
||||
// remove the answers from the answers array
|
||||
let modifiedAnswers = [...answers];
|
||||
|
|
@ -79,17 +79,17 @@ function ImageBlockComponent(props: any) {
|
|||
option_id: option_id,
|
||||
};
|
||||
setAnswers([...answers, answer]);
|
||||
console.log(answers);
|
||||
|
||||
};
|
||||
|
||||
const saveQuiz = async () => {
|
||||
// save the questions and answers to the backend
|
||||
console.log("saving quiz");
|
||||
console.log(questions);
|
||||
console.log(answers);
|
||||
|
||||
|
||||
|
||||
try {
|
||||
let res = await submitQuizBlock(props.extension.options.activity.activity_id, {questions : questions , answers : answers})
|
||||
console.log(res.block_id);
|
||||
|
||||
props.updateAttributes({
|
||||
quizId: {
|
||||
value : res.block_id
|
||||
|
|
@ -98,7 +98,7 @@ function ImageBlockComponent(props: any) {
|
|||
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -112,9 +112,9 @@ function ImageBlockComponent(props: any) {
|
|||
|
||||
React.useEffect(() => {
|
||||
// fetch the questions and options from the backend
|
||||
console.log("fetching questions");
|
||||
console.log(questions);
|
||||
console.log(answers);
|
||||
|
||||
|
||||
|
||||
}, [questions, answers]);
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ function NewChapterModal({ submitChapter, closeModal }: any) {
|
|||
|
||||
const handleSubmit = async (e: any) => {
|
||||
e.preventDefault();
|
||||
console.log({ chapterName, chapterDescription });
|
||||
|
||||
setIsSubmitting(true);
|
||||
await submitChapter({ name: chapterName, description: chapterDescription, activities: [] });
|
||||
setIsSubmitting(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue