Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cms/djangoapps/contentstore/api/views/course_quality.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# pylint: disable=missing-module-docstring
import logging
import statistics
import time

import numpy as np
from edxval.api import get_course_videos_qset
from openedx_authz.authz import COURSES_VIEW_COURSE
from rest_framework.generics import GenericAPIView
from rest_framework.response import Response
from scipy import stats

from openedx.core.djangoapps.authz.constants import LegacyAuthoringPermission
from openedx.core.djangoapps.authz.decorators import authz_permission_required
Expand Down Expand Up @@ -278,5 +278,6 @@ def _stats_dict(self, data): # pylint: disable=missing-function-docstring
max=max(data),
mean=np.around(np.mean(data)),
median=np.around(np.median(data)),
mode=stats.mode(data, axis=None)[0],
# On a tie, report the smallest of the most common values.
mode=min(statistics.multimode(data)),
)
Loading