WikiEducationFoundation/WikiEduDashboard

View on GitHub

Showing 1,672 of 1,672 total issues

Function wizard has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function wizard(state = initialState, action) {
  switch (action.type) {
    case RECEIVE_WIZARD_ASSIGNMENT_OPTIONS: {
      const assignmentOptions = action.assignmentOptions;
      return { ...state, assignmentOptions, panels: panels(assignmentOptions) };
Severity: Minor
Found in app/assets/javascripts/reducers/wizard.js - About 1 hr to fix

    Function UserProfile has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const UserProfile = () => {
      const dispatch = useDispatch();
      const stats = useSelector(state => state.userProfile.stats);
      const isLoading = useSelector(state => state.userProfile.isLoading);
      const userTrainingStatus = useSelector(state => state.userTrainingStatus);
    Severity: Minor
    Found in app/assets/javascripts/components/user_profiles/user_profile.jsx - About 1 hr to fix

      Function TicketShowHandler has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const TicketShowHandler = (props) => {
        const { id } = useParams();
      
        const dispatch = useDispatch();
      
      
      Severity: Minor
      Found in app/assets/javascripts/components/tickets/ticket_show_handler.jsx - About 1 hr to fix

        Function updateBlockPosition has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const updateBlockPosition = (movingBlock, newWeekId, targetIndex, blocks) => {
          const oldWeekId = movingBlock.id;
          const movedBlock = { ...movingBlock };
          movedBlock.week_id = newWeekId;
          const weekChanged = newWeekId !== oldWeekId;
        Severity: Minor
        Found in app/assets/javascripts/reducers/timeline.js - About 1 hr to fix

          Function training has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function training(state = initialState, action) {
            const data = action.data;
            switch (action.type) {
              case RECEIVE_TRAINING_MODULE: {
                const newState = {
          Severity: Minor
          Found in app/assets/javascripts/reducers/training.js - About 1 hr to fix

            Function fetchAllRevisions has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const fetchAllRevisions = async (API_URL, days, usernames, wiki, course_start, last_date) => {
              let ucend;
              let exitNext = false;
              if (isBefore(subDays(toDate(last_date), days), toDate(course_start))) {
                ucend = formatISO(toDate(course_start));
            Severity: Minor
            Found in app/assets/javascripts/utils/mediawiki_revisions_utils.js - About 1 hr to fix

              Function _renderDrawers has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const _renderDrawers = () => {
                  return activity.map((revision) => {
                    const courses = revision.courses.map((course) => {
                      return (
                        <li key={`${revision.key}-${course.slug}`}>
              Severity: Minor
              Found in app/assets/javascripts/components/activity/activity_table.jsx - About 1 hr to fix

                Function DidYouKnowHandler has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const DidYouKnowHandler = () => {
                  const myCoursesRef = useRef(null);
                
                  const dispatch = useDispatch();
                  const articles = useSelector(state => state.didYouKnow.articles);
                Severity: Minor
                Found in app/assets/javascripts/components/activity/did_you_know_handler.jsx - About 1 hr to fix

                  Function weekNav has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      const weekNav = weekNavInfo.map((weekInfo, navIndex) => {
                        let navClassName = 'week-nav__item';
                        if (navIndex === 0) {
                          navClassName += ' is-current';
                        }
                  Severity: Minor
                  Found in app/assets/javascripts/components/timeline/timeline.jsx - About 1 hr to fix

                    Function renderConfirm has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const renderConfirm = () => {
                        let buttonContent;
                        if (submittingNewAdmin) {
                          buttonContent = (<div className="loading__spinner" />);
                        } else {
                    Severity: Minor
                    Found in app/assets/javascripts/components/settings/views/add_admin_form.jsx - About 1 hr to fix

                      Function AcademicSystem has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const AcademicSystem = (props) => {
                        const [selectedOption, setSelectedOption] = useState(props.value || 'semester');
                      
                        useEffect(() => {
                          props.updateCourseProps({ academic_system: selectedOption });
                      Severity: Minor
                      Found in app/assets/javascripts/components/common/academic_system.jsx - About 1 hr to fix

                        Similar blocks of code found in 14 locations. Consider refactoring.
                        Open

                              <p>
                                <a href={instructorsLink} className="button right">{I18n.t('campaign.data_instructors')}</a>
                                {I18n.t('campaign.data_instructors_info')}
                              </p>
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 25..28
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 30..33
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 35..38
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 40..43
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 32..35
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 60..63
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 65..68
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 70..73

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 59.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 14 locations. Consider refactoring.
                        Open

                              <p>
                                <a href={uploadsCsvLink} className="button right">{I18n.t('courses.data_uploads')}</a>
                                {I18n.t('courses.data_uploads_info')}
                              </p>
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 25..28
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 30..33
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 35..38
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 40..43
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 32..35
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 60..63
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 65..68
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 70..73

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 59.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 14 locations. Consider refactoring.
                        Open

                              <p>
                                <a href={editsCsvLink} className="button right">{I18n.t('courses.data_edits')}</a>
                                {I18n.t('courses.data_edits_info')}
                              </p>
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 25..28
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 30..33
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 35..38
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 40..43
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 32..35
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 60..63
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 65..68
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 70..73

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 59.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 14 locations. Consider refactoring.
                        Open

                                <p>
                                  <a href={wikidataCsvLink} className="button right">{I18n.t('courses.data_wikidata')}</a>
                                  {I18n.t('courses.data_wikidata_info')}
                                </p>
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 25..28
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 30..33
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 35..38
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 40..43
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 60..63
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 65..68
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 70..73

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 59.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 14 locations. Consider refactoring.
                        Open

                              <p>
                                <a href={revisionsCsvLink} className="button right">{I18n.t('courses.data_revisions')}</a>
                                {I18n.t('courses.data_revisions_info')}
                              </p>
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 25..28
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 30..33
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 35..38
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 40..43
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 32..35
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 60..63
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 65..68

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 59.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 14 locations. Consider refactoring.
                        Open

                              <p>
                                <a href={wikidataLink} className="button right">{I18n.t('campaign.data_wikidata')}</a>
                                {I18n.t('campaign.data_wikidata_info')}
                              </p>
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 25..28
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 30..33
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 35..38
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 40..43
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 32..35
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 60..63
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 65..68
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 70..73

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 59.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 14 locations. Consider refactoring.
                        Open

                              <p>
                                <a href={articlesCsvLink} className="button right">{I18n.t('courses.data_articles')}</a>
                                {I18n.t('courses.data_articles_info')}
                              </p>
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 25..28
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 30..33
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 35..38
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 40..43
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 32..35
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 60..63
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 70..73

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 59.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 14 locations. Consider refactoring.
                        Open

                              <p>
                                <a href={overviewCsvLink} className="button right">{I18n.t('courses.data_overview')}</a>
                                {I18n.t('courses.data_overview_info')}
                              </p>
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 25..28
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 30..33
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 35..38
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 40..43
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 32..35
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 60..63
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 65..68
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 70..73

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 59.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 14 locations. Consider refactoring.
                        Open

                              <p>
                                <a href={RevisionsLink} className="button right">{I18n.t('campaign.data_revisions')}</a>
                                {I18n.t('campaign.data_revisions_info')}
                              </p>
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 25..28
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 30..33
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 40..43
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/campaign/campaign_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 32..35
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 45..48
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 50..53
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 55..58
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 60..63
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 65..68
                        app/assets/javascripts/components/overview/course_stats_download_modal.jsx on lines 70..73

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 59.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Severity
                        Category
                        Status
                        Source
                        Language