Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Faraz Maqsood authored and Muhammad Faraz Maqsood committed Jul 5, 2024
1 parent 626b366 commit 0172b22
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
12 changes: 12 additions & 0 deletions openedx/features/sdaia_features/course_progress/api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@

@can_disable_rate_limit
class UserWatchHoursAPIView(APIView):
"""
APIView to get the total watch hours for a user.
**Example Requests**
GET /sdaia/api/v1/user_watch_hours
It return watch_time in hours
Response: {
"watch_time": 0.00043390860160191856
}
"""

authentication_classes = (
JwtAuthentication,
BearerAuthenticationAllowInactiveUser,
Expand Down
10 changes: 5 additions & 5 deletions openedx/features/sdaia_features/course_progress/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ class CourseProgressConfig(AppConfig):
name = "openedx.features.sdaia_features.course_progress"

plugin_app = {
"url_config": {
"lms.djangoapp": {
"namespace": "course_progress",
"regex": r"^sdaia",
"relative_path": "urls",
PluginURLs.CONFIG: {
ProjectType.LMS: {
PluginURLs.NAMESPACE: "course_progress",
PluginURLs.REGEX: r"^sdaia",
PluginURLs.RELATIVE_PATH: "urls",
}
},
PluginSettings.CONFIG: {
Expand Down

0 comments on commit 0172b22

Please sign in to comment.