Coursemology/coursemology2

View on GitHub

Showing 1,132 of 1,179 total issues

Function SubmissionsIndex has 128 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

  const dispatch = useAppDispatch();

Severity: Major
Found in client/app/bundles/course/assessment/submissions/SubmissionsIndex.tsx - About 5 hrs to fix

Function LoadedAssessmentSettings has 127 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const LoadedAssessmentSettings = (
  props: LoadedAssessmentSettingsProps,
): JSX.Element | null => {
  const { t } = useTranslation();
  const [form, setForm] = useState<FormEmitter<AssessmentSettingsData>>();
Severity: Major
Found in client/app/bundles/course/admin/pages/AssessmentSettings/index.tsx - About 5 hrs to fix

Function ThemeProvider has 127 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ThemeProvider = (props: ThemeProviderProps): JSX.Element => {
  const theme = createTheme({
    palette,
    // https://material-ui.com/customization/themes/#typography---html-font-size
    // https://material-ui.com/style/typography/#migration-to-typography-v2
Severity: Major
Found in client/app/lib/components/wrappers/ThemeProvider.tsx - About 5 hrs to fix

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

const reducer = produce((state, action) => {
  switch (action.type) {
    case actionTypes.FETCH_LEARNING_MAP_SUCCESS:
      return {
        ...state,
Severity: Major
Found in client/app/bundles/course/learning-map/store.ts - About 5 hrs to fix

Function SubmissionAnswer has 126 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const SubmissionAnswer = <T extends keyof typeof QuestionType>(
  props: SubmissionAnswerProps<T>,
): JSX.Element => {
  const {
    answerId,

Function AssessmentsSettingsForm has 125 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AssessmentsSettingsForm = (
  props: AssessmentsSettingsFormProps,
): JSX.Element => {
  const { t } = useTranslation();
  const validationSchema = yup.object({

Function McqMrqForm has 124 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const McqMrqForm = <T extends 'new' | 'edit'>(
  props: McqMrqFormProps<T>,
): JSX.Element => {
  const { adapter, with: data } = props;

Function renderContent has 121 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  renderContent() {
    const { step } = this.state;
    const {
      answers,
      assessment: {

Function WorkbinTable has 121 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const WorkbinTable: FC<Props> = (props) => {
  const {
    currFolderId,
    subfolders,
    materials,

Function SubmissionFilter has 121 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const SubmissionFilter: FC<Props> = (props) => {
  const {
    intl,
    filter,
    tabCategories,

Function CoursesTable has 121 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const CoursesTable = (props: CoursesTableProps): JSX.Element => {
  const { courses, renderRowActionComponent } = props;
  const { t } = useTranslation();

  if (!courses?.length)

Function InvitationResultDialog has 121 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const InvitationResultDialog: FC<Props> = (props) => {
  const { handleClose, invitationResult, intl } = props;
  const {
    duplicateUsers,
    existingInstanceUsers,

ScribingCanvas has 37 functions (exceeds 20 allowed). Consider refactoring.
Open

export default class ScribingCanvas extends Component {
  constructor(props) {
    super(props);

    this.line = undefined;

Function CKEditorRichText has 120 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const CKEditorRichText = (props: Props) => {
  const {
    label,
    value,
    onChange,
Severity: Major
Found in client/app/lib/components/core/fields/CKEditorRichText.tsx - About 4 hrs to fix

Function ForumTopicManagementButtons has 119 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ForumTopicManagementButtons: FC<Props> = (props) => {
  const { topic, pageType, disabled, showOnHover } = props;
  const dispatch = useAppDispatch();
  const { t } = useTranslation();
  const navigate = useNavigate();

Function SolutionsManager has 119 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  (props, ref): JSX.Element => {
    const { disabled, for: originalSolutions, isAssessmentAutograded } = props;
    const [solutions, setSolutions] = useState(originalSolutions);

    const solutionRefs = useRef<Record<SolutionEntity['id'], SolutionRef>>({});

Function SignInPage has 119 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

  const [email, setEmail] = useEmailFromAuthPagesContext();

Severity: Major
Found in client/app/bundles/users/pages/SignInPage.tsx - About 4 hrs to fix

Function InstanceUserRoleRequestForm has 119 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

Function ReplyCard has 118 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ReplyCard: FC<Props> = (props) => {
  const {
    postId,
    isReplying,
    isAnonymousEnabled,
Severity: Major
Found in client/app/bundles/course/forum/components/cards/ReplyCard.tsx - About 4 hrs to fix

Function ForumDisbursement has 117 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ForumDisbursement: FC = () => {
  const retrievedPostUserIds = new Set();
  const { t } = useTranslation();
  const [selectedForumPostUser, setSelectedForumPostUser] =
    useState<ForumDisbursementUserEntity | null>();
Severity
Category
Status
Source
Language