Git Product home page Git Product logo

Comments (3)

Adrian-Moldovan avatar Adrian-Moldovan commented on July 29, 2024

@DanNerghes because you don't have access to the backend card, here is the description for backend:

The course contents will require the specified parameters:

  • name
  • type
  • visible

All the other parameters will not be mandatory, but if sent, will have to be restricted to one of the following types

  • QUIZ_TEMPLATE_ID
  • URL
  • DESCRIPTION
  • DATETIME
    All these parameters should be send in the payload on the settings JSON property

The types will be defined as an ENUM type in the course_content_settings table for the "name" column. Each parameter will have to be checked for validation.

The request payload should have the JSON format:

{
"name": "Content 10 quiz",
"type": "QUIZ",
"settings": {
"QUIZ_TEMPLATE_ID": "1",
"URL": "test url",
"DATETIME" : "2017-12-03T10:15:30"
},
"visible": true
}

  • The settings properties MUST be sent using uppercase
  • The example does not contain a real data payload (the quiz should not have the DATETIME property)
  • The timestamp is required as ISO format

Also, when providing the course content data, on endpoint: https://edu-hospice-api.herokuapp.com/api/admin/courses/41/sections-details the provided information should be for each element of the adminContentDetails property:

  • id
  • name
  • type
  • visible
  • index
  • resourceSummary
  • courseContentSettings

from edu-hospice.

Adrian-Moldovan avatar Adrian-Moldovan commented on July 29, 2024

Temporary, the endpoint used for the backend is:

edu-hospice-api-temp.heroku.com

from edu-hospice.

madalin18 avatar madalin18 commented on July 29, 2024

The following endpoints are updated to use the implementation with content settings table:

POST
/api/admin/courses/sections/{sectionId}/contents
Create a content unit for a section (course-controller)

PUT
/api/admin/courses/sections/contents/{contentId}/update
Update an existing content (course-controller)

GET
/api/admin/courses/{courseId}/sections-details
Get all the details related to a course sections, course contents and content resources. (course-controller)

GET
/api/courses/content/{contentId}
Retrieve a course content for a user (user-course-controller)

The Front-end team should check where these endpoints are used and change the implementation to use the new request/response body

Every content which has a valid URL should be updated so that URL will be moved to the settings table
URL field is still present in content table (will be deleted with a future database reset) but is not used anymore.

Please let me know if something is not clear or is not working and I will try to be present in the next meeting.

from edu-hospice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.