Coursemology/coursemology2

View on GitHub

Showing 1,205 of 1,252 total issues

Function renderColorBar has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  renderColorBar() {
    const { activeObject, disabled, colorBarBorder, colorBarBackground } =
      this.props;

    let backgroundColor = colorBarBackground;

Function render has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  render() {
    const { disabled, onClick, onClickIcon, onClickChevron, tooltip } =
      this.props;

    return (

Function PersonalStartEndTime has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const PersonalStartEndTime = (props: Props): JSX.Element => {
  const { t } = useTranslation();

  const { timeInfo, className, hideInfo, long } = props;
  if (!timeInfo?.effectiveTime) return <div>-</div>;
Severity: Minor
Found in client/app/lib/components/extensions/PersonalStartEndTime.tsx - About 1 hr to fix

Function FormTextField has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const FormTextField = <Type extends TextFieldTypes>(
  props: FormTextFieldProps<Type>,
): JSX.Element => {
  const {
    field,
Severity: Minor
Found in client/app/lib/components/form/fields/TextField.tsx - About 1 hr to fix

Function TextField has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  (props, ref): JSX.Element => {
    const { trims, onPressEnter, onPressEscape, ...textFieldProps } = props;

    const handleChange: ChangeEventHandler<HTMLInputElement> = (e): void => {
      if (trims) {
Severity: Minor
Found in client/app/lib/components/core/fields/TextField.tsx - About 1 hr to fix

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

const reducer = produce((draft: GlobalUserState, action: GlobalActionType) => {
  switch (action.type) {
    case SAVE_USER: {
      const userData = action.user;
      const userEntity = { ...userData };
Severity: Minor
Found in client/app/bundles/users/store.ts - About 1 hr to fix

Function LevelReachedPopup has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const LevelReachedPopup = (props: LevelReachedPopupProps): JSX.Element => {
  const { notification, onDismiss } = props;

  const { t } = useTranslation();

Function FileUploadForm has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const FileUploadForm: FC<Props> = (props) => {
  const { open, onSubmit, onClose, formSubtitle } = props;
  const { t } = useTranslation();

  return (

Function ExperiencePointsFiltering has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ExperiencePointsFiltering: FC<Props> = (props) => {
  const { filter, studentName, setSelectedFilter, setPageNum, disabled } =
    props;

  const { t } = useTranslation();

Function UserNameField has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const UserNameField = (props: UserNameFieldProps): JSX.Element => {
  const { for: user } = props;

  const dispatch = useAppDispatch();

Function TimePopupTopBar has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const TimePopupTopBar = (props: TimePopupTopBarProps): JSX.Element => {
  const { t } = useTranslation();

  const { status } = useLastSaved();

Function PersonalTimes has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const PersonalTimes: FC<Props> = (props) => {
  const { intl } = props;
  const [isLoading, setIsLoading] = useState(true);
  const permissions = useAppSelector(getManageCourseUserPermissions);
  const sharedData = useAppSelector(getManageCourseUsersSharedData);
Severity: Minor
Found in client/app/bundles/course/users/pages/PersonalTimes/index.tsx - About 1 hr to fix

Function VoiceForm has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

Function GradesChart has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const GradesChart: FC<Props> = (props) => {
  const { t } = useTranslation();
  const { totalGrades } = props;

  const transformedData = {

Function PastAnswers has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const PastAnswers: FC = () => {
  const { courseId, assessmentId, submissionQuestionId } = useParams();
  if (!submissionQuestionId) {
    return null;
  }

Function duplicateCourse has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function duplicateCourse(
  fields,
  destinationHost,
  successMessage,
  pendingMessage,
Severity: Minor
Found in client/app/bundles/course/duplication/operations.js - About 1 hr to fix

Function duplicateItems has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function duplicateItems(
  destinationCourseId,
  selectedItems,
  successMessage,
  pendingMessage,
Severity: Minor
Found in client/app/bundles/course/duplication/operations.js - About 1 hr to fix

Function processSubmissionsIntoChartData has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function processSubmissionsIntoChartData(
  assessments,
  submissions,
  showPhantoms,
) {

Function renderMilestoneCardTitle has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  renderMilestoneCardTitle(milestone) {
    const { title, description, start_at } = milestone;

    return (
      <CardHeader

Function render has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  render() {
    return (
      <Subsection
        subtitle={<FormattedMessage {...translations.explanation} />}
        title={<FormattedMessage {...translations.header} />}
Severity
Category
Status
Source
Language