Coursemology/coursemology2

View on GitHub

Showing 1,205 of 1,252 total issues

Function addAchievements has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const addAchievements = (): void => {
    const achievementData = data as LeaderboardAchievement[];
    columns.push({
      name: 'achievements',
      label: 'Achievements',

Function renderTextResponseComprehensionPoint has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function renderTextResponseComprehensionPoint(point) {
  return (
    <>
      <br />
      <Typography variant="h6">

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

const reducer = produce((draft: SkillState, action: SkillsActionType) => {
  switch (action.type) {
    case SAVE_SKILL_BRANCH_LIST: {
      const skillBranchList = action.skillBranches;
      const skillBranchEntityList = skillBranchList.map((data) => {
Severity: Minor
Found in client/app/bundles/course/assessment/skills/store.ts - About 2 hrs to fix

Function BasicPackageEditor has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const BasicPackageEditor = (props: BasicPackageEditorProps): JSX.Element => {
  const { t } = useTranslation();

  return (
    <>

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

export function processSubmissionsIntoChartData(submissions) {
  const submittedSubmissions = submissions.filter((s) => s.submittedAt != null);
  const mappedSubmissions = submittedSubmissions
    .map((s) => ({
      ...s,

Function PersonalTimeBooleanIcons has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const PersonalTimeBooleanIcons: FC<Props> = (props) => {
  const {
    hasPersonalTimes,
    affectsPersonalTimes,
    isStudent,
Severity: Minor
Found in client/app/lib/components/extensions/PersonalTimeBooleanIcon.tsx - About 1 hr to fix

Method generate_zip_file has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def generate_zip_file(data_files_to_keep, submission_files_to_keep, solution_files_to_keep)
    tmp = Tempfile.new(['package', '.zip'])
    autograde_build_path = File.join(File.expand_path(__dir__), 'java_build.xml').freeze
    autograde_pre_path = File.join(File.expand_path(__dir__), 'java_autograde_pre.java').freeze
    autograde_run_path = File.join(File.expand_path(__dir__), 'RunTests.java').freeze

Function FinaliseButton has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const FinaliseButton: FC = () => {
  const { t } = useTranslation();
  const assessment = useAppSelector(getAssessment);
  const submission = useAppSelector(getSubmission);
  const questions = useAppSelector(getQuestions);

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

  render() {
    const {
      accept,
      disabled,
      previewComponent: PreviewComponent,
Severity: Minor
Found in client/app/lib/components/form/fields/SingleFileInput/index.jsx - About 1 hr to fix

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

  render() {
    const { intl, title, disabled, form, open, children } = this.props;
    const formActions = [
      <Button
        key="form-dialogue-cancel-button"
Severity: Minor
Found in client/app/lib/components/form/FormDialogue.jsx - About 1 hr to fix

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

export default function (state = {}, action) {
  switch (action.type) {
    case actions.FETCH_SUBMISSION_SUCCESS:
    case actions.FINALISE_SUCCESS:
    case actions.UNSUBMIT_SUCCESS:

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

  render() {
    const {
      type,
      title,
      startAt,

Function renderOptionBody has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const renderOptionBody = () => {
    const fieldValue = field;
    const imageFile = fieldValue && fieldValue.file;

    const fileOrSrc = {};

Function LinePopover has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const LinePopover = (props) => {
  const {
    intl,
    lineToolType,
    open,

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

  render() {
    if (this.props.videoDuration === videoDefaults.placeHolderDuration) {
      return <LoadingIndicator />;
    }

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

  render() {
    return (
      <Card
        className="forum-post"
        style={{ ...styles.default, ...this.props.style }}

Method generate_zip_file has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def generate_zip_file(data_files_to_keep)
    tmp = Tempfile.new(['package', '.zip'])
    autograde_include_path = get_file_path('cpp_autograde_include.cc')
    autograde_pre_path = get_file_path('cpp_autograde_pre.cc')
    autograde_post_path = get_file_path('cpp_autograde_post.cc')

Function TopicListWithPagination has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const TopicListWithPagination: FC<Props> = (props) => {
  const { settings, tabValue } = props;
  const dispatch = useAppDispatch();
  const { t } = useTranslation();

Function convertAnswerDataToInitialValue has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const convertAnswerDataToInitialValue = (
  answer: AnswerData,
): AnswerFieldEntity | null => {
  switch (answer.questionType) {
    case QuestionType.MultipleChoice:
Severity: Minor
Found in client/app/bundles/course/assessment/submission/utils/answers.ts - About 1 hr to fix

Function customBodyRenderLite has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        customBodyRenderLite: (dataIndex): JSX.Element => {
          const forum = forums[dataIndex];

          return (
            <>
Severity: Minor
Found in client/app/bundles/course/forum/components/tables/ForumTable.tsx - About 1 hr to fix
Severity
Category
Status
Source
Language