Coursemology/coursemology2

View on GitHub

Showing 1,205 of 1,252 total issues

Function AchievementAwardSummary has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AchievementAwardSummary: FC<Props> = (props) => {
  const { achievementUsers, initialObtainedUserIds, selectedUserIds } = props;

  const removedUserIds = new Set(
    [...initialObtainedUserIds].filter(

Function JavaPackageEditor has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const JavaPackageEditor = (props: PackageEditorProps): JSX.Element => {
  const { t } = useTranslation();

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

Function TableSubfolderRow has 101 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const TableSubfolderRow: FC<Props> = (props) => {
  const { currFolderId, subfolder, isCurrentCourseStudent, isConcrete } = props;
  const { t } = useTranslation();

  return (

Function AdminMenu has 100 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AdminMenu = (props) => {
  const [anchorEl, setAnchorEl] = useState(null);
  const { intl, survey, surveyId } = props;
  const navigate = useNavigate();

Class UserInvitationsController has 32 methods (exceeds 20 allowed). Consider refactoring.
Open

class Course::UserInvitationsController < Course::ComponentController
  before_action :authorize_invitation!
  load_resource :invitation, through: :course, class: 'Course::UserInvitation', parent: false,
                             only: :destroy

Severity: Minor
Found in app/controllers/course/user_invitations_controller.rb - About 4 hrs to fix

Function ProgrammingQnList has 100 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ProgrammingQnList: FC<ProgrammingQnListProps> = (props) => {
  const { questionId, isOnlyForLiveFeedbackSetting } = props;
  const { t } = useTranslation();
  const dispatch = useAppDispatch();
  const programmingQn = useAppSelector((state) =>

Function ForumDisbursementForm has 100 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

  const initialValues: DisbursementFormData = forumUsers.reduce(
    (users, value) => {

Function ConvertMcqMrqPrompt has 100 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ConvertMcqMrqPrompt = (props: ConvertMcqMrqPromptProps): JSX.Element => {
  const { for: question } = props;
  const { t } = useTranslation();
  const [converting, setConverting] = useState(false);

Function InstancesTable has 100 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const InstancesTable = (props: InstanceTableProps): JSX.Element => {
  const { renderRowActionComponent, instances } = props;
  const { t } = useTranslation();

  const columns: ColumnTemplate<InstanceMiniEntity>[] = [

Function Gate has 99 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const Gate = (props) => {
  const {
    canModify,
    dispatch,
    gateInputSizeThreshold,
Severity: Major
Found in client/app/bundles/course/learning-map/components/Gate/index.jsx - About 3 hrs to fix

Function AchievementConditionForm has 98 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AchievementConditionForm = (
  props: AnyConditionProps<AchievementConditionData> & {
    achievements: AchievementOptions;
  },
): JSX.Element => {

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

const Tab = (props: TabProps): JSX.Element => {
  const { tab, index } = props;

  const { t } = useTranslation();
  const [newTitle, setNewTitle] = useState(tab.title);

Function InvitationResultUsersTable has 97 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const InvitationResultUsersTable: FC<Props> = (props) => {
  const { title, users, intl } = props;

  if (users && users.length === 0) return null;

Function SkillForm has 97 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const SkillForm: FC<Props> = (props) => {
  const {
    open,
    title,
    onClose,

Function default has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function (state = initialState, action) {
  switch (action.type) {
    case actionTypes.SET_ITEM_TYPE_VISIBILITY: {
      const visibilityByType = {
        ...state.visibilityByType,
Severity: Major
Found in client/app/bundles/course/lesson-plan/reducers/lessonPlan.js - About 3 hrs to fix

Function VisibleProgrammingImportEditor has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const VisibleProgrammingImportEditor = (props) => {
  const {
    answerId,
    disabled,
    dispatch,

Function ForumTopicForm has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

Function FileUploadManager has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const FileUploadManager = (props: Props): JSX.Element => {
  const { disabled, isTextResponseQuestion } = props;
  const { t } = useTranslation();

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

Function CourseSwitcherPopupMenu has 95 lines of code (exceeds 25 allowed). Consider refactoring.
Open

>((props, ref): JSX.Element => {
  const { t } = useTranslation();

  const { courses, user } = useAppContext();

Severity: Major
Found in client/app/lib/components/navigation/CourseSwitcherPopupMenu.tsx - About 3 hrs to fix

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

const reducer = produce((draft: AdminState, action: AdminActionType) => {
  switch (action.type) {
    case SAVE_ANNOUNCEMENT_LIST: {
      const announcementList = action.announcementList;
      const entityList = announcementList.map((data) => ({ ...data }));
Severity: Major
Found in client/app/bundles/system/admin/admin/store.ts - About 3 hrs to fix
Severity
Category
Status
Source
Language