feat: configurable frontend base path
Co-authored-by: Suraj Shetty <surajshetty3416@users.noreply.github.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import translationPlugin from '@/translation'
|
||||
import ProgrammingExerciseModal from '@/pages/ProgrammingExercises/ProgrammingExerciseModal.vue';
|
||||
import { call } from 'frappe-ui';
|
||||
import { usersStore } from '@/stores/user'
|
||||
import { getLmsRoute } from '@/utils/basePath'
|
||||
|
||||
|
||||
export class Program {
|
||||
@@ -73,7 +74,10 @@ export class Program {
|
||||
fieldname: ['name'],
|
||||
}).then((data: { name: string }) => {
|
||||
let submission = data.name || 'new'
|
||||
this.wrapper.innerHTML = `<iframe src="/lms/programming-exercises/${exercise}/submission/${submission}?fromLesson=1" class="w-full h-[900px] border rounded-md"></iframe>`
|
||||
const submissionPath = getLmsRoute(
|
||||
`programming-exercises/${exercise}/submission/${submission}?fromLesson=1`
|
||||
)
|
||||
this.wrapper.innerHTML = `<iframe src="${submissionPath}" class="w-full h-[900px] border rounded-md"></iframe>`
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -100,4 +104,4 @@ export class Program {
|
||||
exercise: this.data.exercise,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user