Coursemology/coursemology2

View on GitHub

Showing 1,205 of 1,252 total issues

Function renderRating has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const renderRating = () => {
    if (!canUpdate) {
      return null;
    }
    return (

Method generate_zip_file has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def generate_zip_file(data_files_to_keep)
    tmp = Tempfile.new(['package', '.zip'])
    autograde_pre_path = get_file_path('python_autograde_pre.py')
    autograde_post_path = get_file_path('python_autograde_post.py')
    makefile_path = get_file_path('python_makefile')

Method koditsu_programming_language_map has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def koditsu_programming_language_map
    {
      Coursemology::Polyglot::Language::CPlusPlus => {
        language: 'cpp',
        version: '10.2',

Function MoveTabsMenu has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const MoveTabsMenu = (props: MoveTabsMenuProps): JSX.Element | null => {
  const { t } = useTranslation();
  const { categories, onSelectCategory } = props;
  const [button, setButton] = useState<HTMLButtonElement>();

Function Preload has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const Preload = <Data,>(props: PreloadProps<Data>): JSX.Element => {
  const { t } = useTranslation();

  const [state, setState] = useState<PreloadState<Data>>();
  const [loading, setLoading] = useState(true);
Severity: Minor
Found in client/app/lib/components/wrappers/Preload.tsx - About 1 hr to fix

Function AssessmentListItem has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AssessmentListItem: FC<AssessmentListItemProps> = (props) => {
  const { assessment } = props;
  const { isAssessmentListExpanded } = useAppSelector(getViewSettings);

  if (assessment.programmingQuestions.length === 0) return null;

Function Timeline has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const Timeline = (props: TimelineProps): JSX.Element => {
  const { t } = useTranslation();

  const [hovered, setHovered] = useState(false);
  const [hoveredLeft, setHoveredLeft] = useState(0);

Function ExperiencePointsRecords has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ExperiencePointsRecords = (): JSX.Element => {
  const { t } = useTranslation();

  const [pageNum, setPageNum] = useState(1);
  const [isLoading, setIsLoading] = useState(true);

Function UserManagementTabs has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const UserManagementTabs: FC<Props> = (props) => {
  const { permissions, sharedData, intl } = props;

  const courseUrl = getCourseURL(getCourseId());

Function PostContent has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const PostContent: FC<Props> = (props) => {
  const { post, isExpandable } = props;
  const [renderedHeight, setRenderedHeight] = useState(0);

  const contentIsExpandable = isExpandable && renderedHeight > MAX_POST_HEIGHT;

Function NotFoundPage has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const NotFoundPage = (): JSX.Element => {
  const { t } = useTranslation();

  return (
    <ErrorPage
Severity: Minor
Found in client/app/bundles/common/ErrorPage.tsx - About 1 hr to fix

Function FormMultiSelectField has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const FormMultiSelectField = (props) => {
  const { field, fieldState, disabled, label, options, renderIf, ...custom } =
    props;
  if (!renderIf) {
    return null;
Severity: Minor
Found in client/app/lib/components/form/fields/MultiSelectField.jsx - About 1 hr to fix

Function LessonPlanItem has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const LessonPlanItem = (props) => {
  const { item } = props;
  const {
    id,
    title,

Function renderTable has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  renderTable(
    shownSubmissions,
    handleActionParams,
    confirmDialogValue,
    isActive,

Function reducer has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  (draft: DisbursementState, action: DisbursementActionType) => {
    switch (action.type) {
      case SAVE_DISBURSEMENT_LIST: {
        const courseGroups = action.courseGroups.map((data) => ({
          ...data,
Severity: Minor
Found in client/app/bundles/course/experience-points/disbursement/store.ts - About 1 hr to fix

Function AssessmentCategory has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AssessmentCategory: FC<AssessmentCategoryProps> = (props) => {
  const { category } = props;
  const tabs = useAppSelector((state) =>
    getAllAssessmentTabsFor(state, category.id),
  );

Function AnnouncementNew has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AnnouncementNew: FC<Props> = (props) => {
  const { open, onClose, createOperation, canSticky = true } = props;
  const { t } = useTranslation();
  const dispatch = useAppDispatch();

Function AssignableTimeline has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AssignableTimeline = (props: AssignableTimelineProps): JSX.Element => {
  const { for: item, in: timeline, basedOn: defaultTime } = props;

  const { status } = useLastSaved();

Function VideoSubmissionEdit has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const VideoSubmissionEdit: FC<Props> = (props) => {
  const { intl } = props;
  const { submissionId } = useParams();
  const [isLoading, setIsLoading] = useState(true);
  const [editVideoSubmission, setEditVideoSubmission] =

Function VideoEdit has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const VideoEdit: FC<Props> = (props) => {
  const { open, onClose, video } = props;
  const { t } = useTranslation();
  const dispatch = useAppDispatch();

Severity: Minor
Found in client/app/bundles/course/video/pages/VideoEdit/index.tsx - About 1 hr to fix
Severity
Category
Status
Source
Language