Skip to content

Overview

This page provides all the routes accessible under super-admin namespace.

Tab: Curriculum

Route: /super-admin/curriculum

Features

  • Shows the list of curriculums available.

Components

  1. CardSm: Displays the list of curriculums available.
    • Location: /src/lib/components/super-admin/CardSm.svelte

API Calls

  1. GET - /api/v1/library/curriculums, fetches a list of curriculums.

Discussion

  1. uses the data from the API calls in 1 and displays the curriculums.

Route: /super-admin/curriculum/[curriculumId]

Features

  • Displays the list of domains available in the curriculum.
  • Archives selected domains.
  • Unarchives the selected domains.
  • Displays the lesson plans.
  • Deletes the selected lesson plans.

Components

  1. CardSm: Displays the list of domains available.
    • Location: /src/lib/components/super-admin/CardSm.svelte
  2. LessonPlanCard: Displays the list of lesson plans available.
    • Location: /src/lib/components/lesson-plan/LessonPlanCard.svelte
  3. Button: can be found at /src/lib/components/school-admin/Button.svelte

API Calls

  1. GET - /api/v1/library/curriculums/${curriculumId}, fetches the curriculum details (id & name).
  2. GET - /api/v1/library/domains?curriculum_id=${curriculumId}, fetches the list of domains available in a curriculum.
  3. GET - /api/v1/library/lesson_plans/search_and_filter?q[is_archived_true]=0&q[curriculum_id_eq]=${curriculumId}&q[sorts]=created_at+asc&page=1, fetches the list of lesson plans.
  4. PATCH - /api/v1/library/domains/${domainId}, archives or unarchives the selected domains.
  5. PATCH -/api/v1/library/lesson_plans/${lessonPlanId}, deletes the selected lesson plans.

Discussion

  1. Uses the data from the API calls in 1 and displays the curriculum details.
  2. Uses the data from the API calls in 2 and displays the list of domains available.
  3. Uses the data from the API call in 3 and displays the list of lesson plans.
  4. Archives and unarchives the selected domains using the API call 4.
  5. Deletes the selected lesson plans using the API call 5.

Route: /super-admin/curriculum/[curriculumId]/domain/[domainId]

Features

  • Creates a new domain.
  • Shows domain info.
  • Add and edit categories.

Components

  1. CardLayout: displays the list of goals available in a category. When used inside the Goal component, it displays the list of subgoals.
    • Location: /src/lib/components/super-admin/CardLayout.svelte.
  2. CardLayoutForm: is used to enter a name and save the category.
    • Location: /src/lib/components/super-admin/CardLayoutForm.svelte.
  3. QuantityInput: is used to display and define default goal completion criteria.
    • Location: /src/lib/components/super-admin/domain-details/QuantityInput.svelte.
  4. AssessmentCriteriaOption: is used to display and define default assessment criteria.
    • Location: ./AssessmentCriteriaOption.svelte.
  5. AssessmentCriteriaCard: is used to display assessment criteria options.
    • Location: ./AssessmentCriteriaCard.svelte.
  6. OnboardingTaskBarUpdated: Proceeds to the next steps.
    • Location: /src/lib/components/shared/OnboardingTaskBarUpdated.svelte

API Calls

  1. POST - /api/v1/library/domains?curriculum_id=${curriculumId}, creates a new domain in the curriculum.
  2. GET - /api/v1/library/domains?curriculum_id=${curriculumId}, fetches a list of domains.
  3. POST - /api/v1/library/categories, creates a new category in the domain.
  4. PATCH - /api/v1/library/categories/${categoryId}, edits a category.
  5. PATCH - /library/assessment_criteria/${assessment_criterion_id}?domain_id=${domain_id}, to define a default assessment criteria.

Discussion

  1. Creates a new domain using the API call 1.
  2. The load() finds the domain from the list of domains fetched from the API call 2 and displays the domain details.
  3. Creates a new category using the API call 3.
  4. Edits the categories using the API call 4.
  5. Creates and edits the assessment and goal completion criteria using the API call 5.

Route: /super-admin/curriculum/[curriculumId]/domain/[domainId]/add-goals-tab

Features

  • Create goals in a category and adds it to the domain.
  • Edits the goal.
  • Displays the goals available in a category.
  • Deletes the goal from a category.
  • Rearrange the goals in a category.
  • Adds subgoals in a goal.
  • Edits a subgoal.
  • Deletes a subgoal from the goal.
  • Adds lesson plan for a subgoal.
  • Adds age range for a subgoal.
  • Rearranges subgoals in a goal.

Components

  1. CardLayout: displays the list of goals available in a category. When used inside the Goal component, it displays the list of subgoals.
    • Location: /src/lib/components/super-admin/CardLayout.svelte.
  2. CardLayoutForm: is used to enter a name and save the goal. When used inside the Goal component, it is used to edit subgoal name.
    • Location: /src/lib/components/super-admin/CardLayoutForm.svelte.
  3. OnboardingTaskBarUpdated: is used to for navigating to the next step.
    • Location: /src/lib/components/shared/OnboardingTaskBarUpdated.svelte
  4. Goal: displays the list of goals.
    • Location: /src/lib/components/shared/OnboardingTaskBarUpdated.svelte
  5. SubGoalCard: displays the list of subgoals in a goal. This component is used inside the Goal component.
    • Location: /src/lib/components/shared/OnboardingTaskBarUpdated.svelte
  6. ContentEditor: displays the list of materials available. This component is used inside the Goal component.
    • Location: /src/lib/components/shared/OnboardingTaskBarUpdated.svelte
  7. Modal: is used to load and display the content on the same page without changing the url.
    • Location: /src/lib/components/shared/Modal.svelte

API Calls

  1. GET - api/v1/library/goals?domain_id=${domainId}&per_page=200, displays the list of goals in a category.
  2. POST /api/v1/library/goals, creates new goals and adds it to the domain.
  3. PATCH api/v1/library/goals/${goalId}, edits a goal.
  4. DELETE /api/v1/library/goals/${goalId}, deletes the goals in a category.
  5. POST - /api/v1/library/goals/${goalId}/move_to_position, rearranges the goals.
  6. POST - /api/v1/library/subgoals, creates new subgoals in a goal.
  7. PATCH - /api/v1/library/subgoals/${subgoalId}, edits a subgoal.
  8. DELETE - /api/v1/library/subgoals/${subgoalId}, deletes a subgoal.
  9. GET - /api/v1/library/domains/${domainId}, fetches domain details.
  10. POST - /api/v1/library/assessment_criteria, creates an assessment criteria.
  11. GET - /api/v1/library/material_entities?entity_id=${subgoalId}&page=1, gets the list of materials in a subgoal
  12. GET - /api/v1/library/materials?page=1&is_archived=false, gets the list of materials available to be added to a subgoal
  13. POST - api/v1/library/material_entities, adds the materials to a subgoal
  14. DELETE - /api/v1/library/material_entities/${materialId}, deletes the materials from a subgoal.

Discussion

  1. Fetches the list of goals using the API call 1.
  2. Creates a new goal and adds it to the domain using the API call 2.
  3. Edits the goal using the API call 3.
  4. Deletes the goal using the API call 4.
  5. Rearranges a goal in the category using the API call 5.
  6. Adds description to the goal using the API call 3.
  7. Uses API call 7 to fetch the domain details.
  8. Fetches the list of materials in a subgoal using the API call 9.
  9. Adds subgoals to the goal using the API call 6.
  10. Edits subgoals using the API call 7.
  11. Deletes the subgoals using the API call 8.
  12. Fetches the domain details using the API call 9.
  13. Adds an assessment criteria to the goal using the API call 10.
  14. Fetches the list of materials available in a subgoal using the API call 11.
  15. Fetches the list of materials to be added to the subgoal using the API call 12.
  16. Adds the selected materials to the subgoal using the API call 13.
  17. Deletes the materials from the subgoal using the API call 14.

Route: /super-admin/curriculum/${curriculumId}/lesson-plan/new

Features

  • Creates a new lesson plan in a curriculum.

API Calls

  1. POST - /api/v1/library/lesson_plans, creates a lesson plan.
  2. GET - /api/v1/library/curriculums/${curriculumId}, fetches curriculum info.
  3. GET - /api/v1/library/domains?curriculum_id=${curriculumId}, fetches the list of domains in the curriculum.

Discussion

  1. Fetches the curriculum and the domains info using the API calls 2 & 3.
  2. creates a new lesson plan using the API call 1.

Tab: School

Route: /super-admin/school

Features

  • Links curricula ot the school.
  • Adds a new school.
  • Creates a new user and assigns or removes access from the user.

Components

  1. CardLayout: displays the list of goals available in a category. When used inside the Goal component, it displays the list of subgoals.
    • Location: /src/lib/components/super-admin/CardLayout.svelte.
  2. CardLayoutForm: is used to enter a name and save the goal. When used inside the Goal component, it is used to edit subgoal name.
    • Location: /src/lib/components/super-admin/CardLayoutForm.svelte.
  3. AddAdminModal: is used to add school administrators.
    • Location: /src/lib/components/super-admin/AddAdminModal.svelte.
  4. LinkCurriculaModal: is used to link curricula.
    • Location: /src/lib/components/super-admin/LinkCurriculaModal.svelte.
  5. SchoolCard: fetches and displays all the schools data.
    • Location: /src/lib/components/super-admin/SchoolCard.svelte.
  6. UsersModal: displays the list of users.
    • Location: /src/lib/components/super-admin/UsersModal.svelte.

API Calls

  1. GET - /api/v1/schools, fetches the list of schools.
  2. GET - /api/v1/library/curriculums, fetches the list of curricula.
  3. GET - /api/v1/library/domains?curriculum_id=${curriculumId}, fetches the domains in the curriculum.
  4. POST - /api/v1/schools, creates a new school.
  5. POST - /api/v1/school/school_curriculums, adds and links a curricula to the school.
  6. DELETE - /api/v1/school/school_curriculums/${curriculumId}, removes the curriculum from the school.
  7. POST - /api/v1/users, creates a new user.
  8. POST - /api/v1/school/profiles?all=true, adds user to the school administrators.
  9. PATCH - /api/v1/users/${userId}, updates the user.
  10. DELETE - /api/v1/school/accesses/${userId}, removes access from a user.

Discussion

  1. Fetches the schools, curriculums and domains in that curriculums information using the API calls 1,2 and 3.
  2. Creates a new school using the API call 4.
  3. Adds or links the curricula to the school using the API call 5.
  4. Removes the curriculum from the school using the API call 6.
  5. Creates, adds and edits the users using the API calls 7,8 & 9.
  6. Removes the user access using the API call 10.

Tab: Content Library

Route: /super-admin/materials

Features

  • Creates a new flashcard.
  • Displays a list of flashcards.
  • Edits the flashcards.
  • Archives the flashcards.

Components

  1. TagsSelectionModal: Selects from the list of tags.
    • Location: ./TagsSelectionModal.svelte.
  2. CreateNewTagModal: Creates a new tag.
    • Location: ./CreateNewTagModal.svelte.
  3. CreateFlashcardModal: Creates a Flashcard (aka material).
    • Location: ./CreateFlashcardModal.svelte.

API Calls

  1. GET - /api/v1/library/materials/search_and_filter?page=1&q[sorts]=updated_at+desc&q[is_archived_true]=0, fetches all the materials
  2. GET - /api/v1/library/tags?page=1, fetches all the tags.
  3. GET - /api/v1/library/materials?query_material_text=${queryString}$&page=1&is_archived=false, searches the flashcards as per the query string.
  4. GET - /api/v1/library/materials?tag=${tagName}&page=1&is_archived=false, searches the flashcards as per the tag name.
  5. POST - /api/v1/library/tags, creates a tag for the flashcard.
  6. POST - /api/v1/media/signed_upload_url, creates a flashcard.
  7. PATCH - /api/v1/library/materials/${materialsId}}$, archives or edits the flashcards.

Discussion

  1. Fetches all the flashcards and tags using the API calls 1 & 2.
  2. Searches the flashcards as per the query string using the API call 3.
  3. Searches the flashcards as per the tag name using the API call 4.
  4. Creates a new tag using the API call5.
  5. Creates a new flashcard using the API call 6.
  6. Archives or edits the flashcards using the API call 7.

Tab: Worksheets

Route: /super-admin/worksheets

Features

  • Creates a new worksheet and redirects to /super-admin/worksheets/worksheet in order to create a new worksheet.
  • Publishes or unpublishes the admin worksheets.
  • All the rest of the features and functionalities are same as Tab: Classroom Worksheets. But here we are dealing with admin worksheets only.

API Calls

  1. POST - /api/v1/library/worksheets/search_and_filter?per_page=50, fetches all the admin worksheets.
  2. GET - /api/v1/library/worksheet/tags, fetches all the worksheet tags.
  3. GET - /api/v1/library/domains?per_page=50, fetches all the domains.
  4. POST - /api/v1/library/worksheets, creates a new worksheet.
  5. POST - /api/v1/library/worksheets/search_and_filter?per_page=50, filters the worksheets using the domains.
  6. POST - /api/v1/library/worksheets/${worksheetId}/publish, publishes the admin worksheet.
  7. POST - /api/v1/library/worksheets/${worksheetId}/unpublish, unpublishes the admin worksheet.

Discussion

  1. Refer to the API calls above and Tab: Classroom Worksheets. All the edit and delete and other features are similar as the former.