Coursemology/coursemology2

View on GitHub

Showing 1,205 of 1,252 total issues

Function processColumns has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const processColumns = (includeRowNumber, columns) => {
  if (!columns.length) return columns;

  const processed = columns.map((column) => {
    if (!column.options?.alignCenter && !column.options?.hideInSmallScreen)
Severity: Minor
Found in client/app/lib/components/core/layouts/DataTable.jsx - About 1 hr to fix

Function renderExperiencePoints has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  renderExperiencePoints() {
    const {
      grading: { exp, expMultiplier },
      submission: { basePoints, graderView },
      bonusAwarded,

Function PostPresentation has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const PostPresentation = (props) => {
  let childrenElements = null;
  const childrenNodes = props.childrenIds.map((childId) => (
    <PostContainer key={childId} postId={childId} />
  ));

Function TypePopover has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const TypePopover = (props) => {
  const {
    intl,
    open,
    anchorEl,

Function ConditionRow has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ConditionRow = <AnyConditionData extends ConditionData>(
  props: ConditionProps<AnyConditionData>,
): JSX.Element => {
  const { t } = useTranslation();
  const [editing, setEditing] = useState(false);
Severity: Minor
Found in client/app/lib/components/extensions/conditions/ConditionRow.tsx - About 1 hr to fix

Function CommentTabs has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const CommentTabs: FC<CommentTabProps> = (props) => {
  const { tabValue, intl } = props;
  const dispatch = useAppDispatch();
  const [tabTypesToRender, setTabTypesToRender] = useState(
    [] as CommentTabData[],

Function getAssessmentGenerateQuestionsData has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const getAssessmentGenerateQuestionsData = (
  state: AppState,
): GenerationPageState => {
  const internalState = state.assessments.generatePage;
  const conversationMetadata = Object.values(internalState.conversations)

Function SearchField has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const SearchField = (props: SearchFieldProps): JSX.Element => {
  const { onChangeKeyword, noIcon, ...otherProps } = props;

  const [keyword, setKeyword] = useState('');
  const [isPending, startTransition] = useTransition();
Severity: Minor
Found in client/app/lib/components/core/fields/SearchField.tsx - About 1 hr to fix

Function AchievementEdit has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AchievementEdit: FC<Props> = (props) => {
  const { achievementId, open, onClose, onSubmit } = props;
  const { t } = useTranslation();
  const dispatch = useAppDispatch();
  const achievement = useAppSelector((state) =>

Function ExperiencePointsNumberField has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ExperiencePointsNumberField: FC<Props> = (props) => {
  const { defaultPoint, record, disabled, rowData, setIsDirty, setRowData } =
    props;
  const [errorHelperText, setErrorHelperText] = useState('');

Function FeedbackFields has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

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

Function VideoNew has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const VideoNew: FC<Props> = (props) => {
  const { open, onClose, currentTab } = props;
  const { t } = useTranslation();
  const [, setSearchParams] = useSearchParams();
  const videoTabs = useAppSelector(getVideoTabs);
Severity: Minor
Found in client/app/bundles/course/video/pages/VideoNew/index.tsx - About 1 hr to fix

Function QuestionFormDeletedOptions has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const QuestionFormDeletedOptions = (props) => {
  const {
    disabled,
    fieldsConfig,
    multipleChoice,

Function renderEditor has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  renderEditor() {
    /* eslint-disable react/no-array-index-key */
    const { content } = this.props;
    return (
      <div style={styles.editorContainer}>

Function renderGradeTable has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  renderGradeTable() {
    const {
      intl,
      questions,
      questionIds,

Function extractQuestionPrototypeData has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function extractQuestionPrototypeData(
  response: CodaveriGenerateResponseData,
): QuestionPrototypeFormData {
  const prefix = response.resources[0]?.templates[0]?.prefix ?? '';

Function TimelinesOverview has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const TimelinesOverview = (props: TimelinesOverviewProps): JSX.Element => {
  const { for: timelines, hiding: hiddenTimelineIds } = props;

  const { t } = useTranslation();

Function AssignedTimeline has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AssignedTimeline = (props: AssignedTimelineProps): JSX.Element => {
  const { for: item, in: timeline, visualising: time } = props;

  const { t } = useTranslation();

Function SavedIndicator has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const SavedIndicator = (props: SavedIndicatorProps): JSX.Element => {
  const { at: lastSaved, success } = props;

  const { t } = useTranslation();

Function ExperiencePointsIndex has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ExperiencePointsIndex: FC = () => {
  const { t } = useTranslation();

  const [tabValue, setTabValue] = useState('experience-points-tab');

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