Coursemology/coursemology2

View on GitHub

Showing 1,214 of 1,261 total issues

Function GroupCreationForm has 170 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const GroupCreationForm = (props) => {
  const { dispatch, existingGroups, initialValues, onSubmit } = props;
  const {
    control,
    handleSubmit,
Severity: Major
Found in client/app/bundles/course/group/forms/GroupCreationForm.jsx - About 6 hrs to fix

Function ScribingQuestionForm has 170 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ScribingQuestionForm = (props) => {
  const { data, initialValues, scribingId } = props;

  const { t } = useTranslation();

Function Solution has 168 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  (props, ref): JSX.Element => {
    const { disabled, for: originalSolution } = props;

    const [solution, setSolution] = useState(originalSolution);
    const [toBeDeleted, setToBeDeleted] = useState(false);

Function DisbursementForm has 166 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const DisbursementForm: FC<Props> = (props) => {
  const { intl, courseUsers } = props;

  const courseGroups = useAppSelector(getAllCourseGroupMiniEntities);

Function PendingTodosTable has 165 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const PendingTodosTable: FC<Props> = (props) => {
  const { intl, todos, todoType } = props;

  const [shavedTodos, setShavedTodos] = useState(todos.slice(0, 5));
  const [end, setEnd] = useState(10);

Function EmailsList has 164 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const EmailsList = (props: EmailCardProps): JSX.Element => {
  const { t } = useTranslation();
  const [emailToRemove, setEmailToRemove] = useState<EmailData>();

  const removeEmail = (email: EmailData): void => {
Severity: Major
Found in client/app/bundles/user/components/EmailsList.tsx - About 6 hrs to fix

Function CodaveriCommentCard has 163 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const CodaveriCommentCard = (props) => {
  const {
    editValue,
    handleChange,
    updateComment,

Function SubmissionsTable has 162 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const SubmissionsTable: FC<Props> = (props) => {
  const {
    intl,
    isGamified,
    submissions,

Function StudentProgressionChart has 159 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const StudentProgressionChart: FC<Props> = (props) => {
  const { assessments, submissions } = props;
  const { t } = useTranslation();
  const [selectedStudentIndex, setSelectedStudentIndex] = useState(null);
  const [showOpeningTimes, setShowOpeningTimes] = useState(true);

Function GenerateQuestionPrototypeForm has 159 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const GenerateQuestionPrototypeForm: FC<Props> = (props) => {
  const { prototypeForm, lockStates, onToggleLock } = props;
  const { t } = useTranslation();
  const dispatch = useAppDispatch();
  const { onChange } = prototypeForm.register('question.title', {

Function EvaluatorFields has 159 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const EvaluatorFields = (props: EvaluatorFieldsProps): JSX.Element | null => {
  const { t } = useTranslation();

  const { control, watch } = useFormContext<ProgrammingFormData>();

Function useTanStackTableBuilder has 158 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const useTanStackTableBuilder = <D extends object>(
  props: TableTemplate<D>,
): TanStackTableProps<D> => {
  const [columns, getRealColumn] = buildTanStackColumns(
    props.columns,

Function SubmissionTabs has 157 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const SubmissionTabs: FC<Props> = (props) => {
  const {
    intl,
    canManage,
    isTeachingStaff,

Function Dashboard has 156 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const Dashboard = (props) => {
  const { dispatch, intl, isLoading, nodes, response, selectedElement } = props;

  const [deleteArrowConfirmation, setDeleteArrowConfirmation] = useState(false);
  const isEmptyResponse =
Severity: Major
Found in client/app/bundles/course/learning-map/containers/Dashboard/index.jsx - About 6 hrs to fix

Function VideoForm has 156 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const VideoForm: FC<Props> = (props) => {
  const {
    open,
    editing,
    title,
Severity: Major
Found in client/app/bundles/course/video/components/forms/VideoForm.tsx - About 6 hrs to fix

Function LeaderboardIndex has 156 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const LeaderboardIndex: FC<Props> = (props) => {
  const { intl } = props;
  const dispatch = useAppDispatch();
  const tabView = useMedia.MinWidth('lg');
  const [isLoading, setIsLoading] = useState(true);

Function ForumDisbursementTable has 154 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ForumDisbursementTable: FC<Props> = (props: Props) => {
  const { intl, forumUsers, onPostClick } = props;

  const columns: TableColumns[] = [
    {

Function ForumTable has 154 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ForumTable: FC<Props> = (props) => {
  const { forums } = props;
  const { t } = useTranslation();
  if (forums && forums.length === 0) {
    return <Note message={t(translations.noForum)} />;
Severity: Major
Found in client/app/bundles/course/forum/components/tables/ForumTable.tsx - About 6 hrs to fix

Function Tab has 153 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const Tab = (props: TabProps): JSX.Element => {
  const { tab, index, stationary, disabled } = props;
  const { t } = useTranslation();
  const { settings, deleteTabInCategory, moveAssessments } =
    useAssessmentSettings();

Function ForumPostTable has 153 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ForumPostTable: FC<Props> = (props: Props) => {
  const { intl, posts: data } = props;

  const columns: TableColumns[] = [
    {
Severity
Category
Status
Source
Language