Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Course templates api #36021

Closed
wants to merge 4 commits into from
Closed

Course templates api #36021

wants to merge 4 commits into from

Conversation

awais786
Copy link
Contributor

@awais786 awais786 commented Dec 12, 2024

In progress PR dont review.

This PR is about the course templates implementation.

A sample github repo contains the courses of different organizations.
https://github.com/awais786/courses

An API has been added to interact with the repository, allowing retrieval of courses based
on the organization.

API endpoint which hit the github repo and brings the course information.
http://localhost:18010/api/contentstore/v1/course_templates/edly/course-v1:edly+cs202+2024

[
{'courses_name': 'Course1', 'zip_url': 'https://raw.githubusercontent.com/awais786/courses/main/edx/Course1/course.tar.gz',
 'metadata': {'course_id': 'course-v1:edX+DemoX+T2024', 'title': 'Introduction to Open edX', 
'description': 'Learn the fundamentals of the Open edX platform, including how to create and manage courses.', 'thumbnail': 'https://discover.ilmx.org/wp-content/uploads/2024/04/course-card-banner.png',
 'active': True}},
 {'courses_name': 'Course2', 'zip_url': 'https://raw.githubusercontent.com/awais786/courses/main/edx/Course2/course.tar.gz', 
'metadata': {'course_id': 'course-v1:edX+DemoX+T2024', 'title': 'Introduction to Open edX', 
'description': 'Learn the fundamentals of the Open edX platform, including how to create and manage courses.', 'thumbnail': 'https://discover.ilmx.org/wp-content/uploads/2024/01/Course-image-2.webp', 
'active': True}}
]

Course detail page will show the course template menu.

Screenshot 2024-12-12 at 4 28 19 PM

All templates will be appear here

Screenshot 2024-12-12 at 4 29 29 PM

@awais786 awais786 closed this Dec 12, 2024
organization = course_key.org

# GitHub repository details. It should come from settings.
templates_repo_url = f"https://api.github.com/repos/awais786/courses/contents/{organization}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will come from settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant