Getting Started
Examples
introduction the content that your user sees depends on the payload that you initialize the socratease library with this article lists a few common use cases in the examples below, we will only show what the payload docid 7cy1qkswkezcp719c1vu must be like refer the quickstart docid\ bhvlnovflh6j1 2ttfssw article for boilerplate code, and other options recall that for all socratease related pages, you will have a single entry point if you are hosting socratease on yoursite com/learning (see definitions docid 7dwbpbpjxuvh38h r2hel ), for all urls like yoursite com/learning/ , you will return a static html page content creation requirement you want a user with username=creator\@yoursite com to see the screen where they can add quizzes, create courses, etc code const payload = { username "creator\@yoursite com", user details {first name "creator", role "ca"} }; explanation we need the username because we need to keep track of who created the content (if username isn't created, socratease will create a random user depending on your non logged in users in init() docid 7kqwrgpmag5uczpqqz2nq and unauthenticated and unauthorized requests docid\ ibsclwetdixd0l2zmawlz settings) because you are initialising the user with role=ca , socratease will automatically redirect the user to /cms/home here the user can see their existing content, or create new content accessing existing content requirement a content creator has created a quiz in its settings, the creator has said that only logged in users can access it its relative url is, /units/abcd you want a user with username=student\@yoursite com to take this quiz code const payload = { username "student\@yoursite com", user details {first name "student"} }; explanation because only logged in users can access the test, username is required you don't need to specify path here because, by default, the sdk loads window\ location pathname anyway creating a cohort requirements an instructor needs to be logged in to show a page where they can create cohorts and see their existing cohorts the instructor has already been added to an organization code const payload = { username "student\@yoursite com", user details {first name "student", role "instructor"} }; explanation because only logged in users can access the test, username is required you don't need to specify path here because, by default, the sdk loads window\ location pathname anyway