diff --git a/gatsby-config.js b/gatsby-config.js index 4c22575eb..5d2698c40 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -120,16 +120,6 @@ module.exports = { ] } }, - { - resolve: `gatsby-plugin-google-analytics`, - options: { - trackingId: "UA-47575342-9", - // Puts tracking script in the head instead of the body - head: false, - // Setting this parameter is optional - anonymize: true - } - }, { resolve: `gatsby-plugin-sitemap`, options: { diff --git a/package-lock.json b/package-lock.json index 8e1a0e641..7106b1444 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,6 @@ "gatsby": "^3.7.1", "gatsby-plugin-anchor-links": "^1.2.1", "gatsby-plugin-catch-links": "^3.7.1", - "gatsby-plugin-google-analytics": "^3.7.1", "gatsby-plugin-i18next": "^1.1.10", "gatsby-plugin-manifest": "^3.7.1", "gatsby-plugin-material-ui": "^3.0.1", @@ -11607,24 +11606,6 @@ "gatsby": "^3.0.0-next.0" } }, - "node_modules/gatsby-plugin-google-analytics": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/gatsby-plugin-google-analytics/-/gatsby-plugin-google-analytics-3.14.0.tgz", - "integrity": "sha512-yfSBRrGZZWruKDQMAJOHp7S1nUBQewT9MuvqegCqFsHhxUtm6PZ5JFv3k8385DfQ/+ux9MmzpY20vQ0E5/30fA==", - "dependencies": { - "@babel/runtime": "^7.15.4", - "minimatch": "3.0.4", - "web-vitals": "^1.1.2" - }, - "engines": { - "node": ">=12.13.0" - }, - "peerDependencies": { - "gatsby": "^3.0.0-next.0", - "react": "^16.9.0 || ^17.0.0", - "react-dom": "^16.9.0 || ^17.0.0" - } - }, "node_modules/gatsby-plugin-i18next": { "version": "1.1.10", "resolved": "https://registry.npmjs.org/gatsby-plugin-i18next/-/gatsby-plugin-i18next-1.1.10.tgz", @@ -27113,11 +27094,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/web-vitals": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-1.1.2.tgz", - "integrity": "sha512-PFMKIY+bRSXlMxVAQ+m2aw9c/ioUYfDgrYot0YUa+/xa0sakubWhSDyxAKwzymvXVdF4CZI71g06W+mqhzu6ig==" - }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -37074,16 +37050,6 @@ "escape-string-regexp": "^1.0.5" } }, - "gatsby-plugin-google-analytics": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/gatsby-plugin-google-analytics/-/gatsby-plugin-google-analytics-3.14.0.tgz", - "integrity": "sha512-yfSBRrGZZWruKDQMAJOHp7S1nUBQewT9MuvqegCqFsHhxUtm6PZ5JFv3k8385DfQ/+ux9MmzpY20vQ0E5/30fA==", - "requires": { - "@babel/runtime": "^7.15.4", - "minimatch": "3.0.4", - "web-vitals": "^1.1.2" - } - }, "gatsby-plugin-i18next": { "version": "1.1.10", "resolved": "https://registry.npmjs.org/gatsby-plugin-i18next/-/gatsby-plugin-i18next-1.1.10.tgz", @@ -48411,11 +48377,6 @@ "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", "integrity": "sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==" }, - "web-vitals": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-1.1.2.tgz", - "integrity": "sha512-PFMKIY+bRSXlMxVAQ+m2aw9c/ioUYfDgrYot0YUa+/xa0sakubWhSDyxAKwzymvXVdF4CZI71g06W+mqhzu6ig==" - }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", diff --git a/package.json b/package.json index 33dc6fd39..45db41bfd 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "gatsby": "^3.7.1", "gatsby-plugin-anchor-links": "^1.2.1", "gatsby-plugin-catch-links": "^3.7.1", - "gatsby-plugin-google-analytics": "^3.7.1", "gatsby-plugin-i18next": "^1.1.10", "gatsby-plugin-manifest": "^3.7.1", "gatsby-plugin-material-ui": "^3.0.1", diff --git a/src/components/Footer.js b/src/components/Footer.js index a602fc868..5ceb2406d 100644 --- a/src/components/Footer.js +++ b/src/components/Footer.js @@ -2,7 +2,6 @@ import React, { useContext } from "react" import styled from "styled-components" import BackgroundImage from "../images/banner.svg" import { Card, CardContent } from "@material-ui/core" -import { OutboundLink } from "gatsby-plugin-google-analytics" import { Link } from "gatsby" import { withTranslation } from "react-i18next" import withSimpleErrorBoundary from "../util/withSimpleErrorBoundary" @@ -109,14 +108,14 @@ const Footer = ({ t }) => { -
{t("footer-src")}
-
+
@@ -128,13 +127,13 @@ const Footer = ({ t }) => { {t("makers")}{" "} - {t("rage")} - + . @@ -142,46 +141,46 @@ const Footer = ({ t }) => { {t("credits")}. - - - + - - + - + - Helsingin yliopisto - - + MOOC.fi - +
diff --git a/src/components/user/CourseOptionsEditor.js b/src/components/user/CourseOptionsEditor.js index b518daefa..436aa3231 100644 --- a/src/components/user/CourseOptionsEditor.js +++ b/src/components/user/CourseOptionsEditor.js @@ -14,8 +14,6 @@ import { TextField, } from "@material-ui/core" -import { OutboundLink } from "gatsby-plugin-google-analytics" - import { courseVariants, updateUserDetails, @@ -350,14 +348,14 @@ class CourseOptionsEditor extends React.Component {

{this.props.t("research5")} - Educational Data Mining and Learning Analytics in Programming: Literature Review and Case Studies - + .

diff --git a/src/components/user/CreateAccountForm.js b/src/components/user/CreateAccountForm.js index e6ff87a65..fea717ef1 100644 --- a/src/components/user/CreateAccountForm.js +++ b/src/components/user/CreateAccountForm.js @@ -4,7 +4,6 @@ import { TextField, Button } from "@material-ui/core" import { createAccount, authenticate } from "../../services/moocfi" import { capitalizeFirstLetter } from "../../util/strings" import { navigate } from "gatsby" -import { OutboundLink } from "gatsby-plugin-google-analytics" import { withTranslation } from "react-i18next" import styled from "styled-components" import withSimpleErrorBoundary from "../../util/withSimpleErrorBoundary" @@ -153,13 +152,9 @@ class CreateAccountForm extends React.Component {
{this.props.t("courseUses")}{" "} - + mooc.fi - {" "} + {" "} {this.props.t("courseUses2")} diff --git a/src/pages/credits.js b/src/pages/credits.js index 4d40bec9d..518d29c14 100644 --- a/src/pages/credits.js +++ b/src/pages/credits.js @@ -2,7 +2,6 @@ import React from "react" import Helmet from "react-helmet" import Layout from "../templates/Layout" import Container from "../components/Container" -import { OutboundLink } from "gatsby-plugin-google-analytics" import { withLoginStateContext } from "../contexes/LoginStateContext" const Credits = () => ( @@ -12,13 +11,13 @@ const Credits = () => (

Kiitokset ja materiaalista

Kurssin on tehnyt Helsingin yliopiston{" "} - Agile Education Research -tutkimusryhmä - + .

Kurssimateriaali

@@ -30,13 +29,13 @@ const Credits = () => (

Kurssin materiaali on lisensoitu{" "} - Creative Commons BY-NC-SA 4.0 - {" "} + {" "} -lisenssillä, joten voit käyttää ja levittää sitä vapaasti, kunhan alkuperäisten tekijöiden nimiä ei poisteta. Jos teet muutoksia materiaaliin ja haluat levittää muunneltua versiota, se täytyy @@ -48,37 +47,33 @@ const Credits = () => (

Kurssisivuston ovat tehneet{" "} - Henrik Nygren - {" "} + {" "} ja{" "} - Antti Leinonen - + . Helsingin yliopiston{" "} - Agile Education Research -tutkimusryhmä - {" "} + {" "} on luonut kurssilla käytetyn ohjelmointitehtävien palautusympäristön ( - + Test My Code - + ) ja sen liitännäiset ohjelmointiympäristöihin, kurssimateriaalissa olevan kyselyjärjestelmän ja muut toiminnot.

diff --git a/src/pages/edit-page.js b/src/pages/edit-page.js index ffe50aadf..d73c2e8e6 100644 --- a/src/pages/edit-page.js +++ b/src/pages/edit-page.js @@ -2,7 +2,6 @@ import React from "react" import Helmet from "react-helmet" import Layout from "../templates/Layout" import Container from "../components/Container" -import { OutboundLink } from "gatsby-plugin-google-analytics" import { withLoginStateContext } from "../contexes/LoginStateContext" import { Button, Typography } from "@material-ui/core" import CourseSettings from "../../course-settings" @@ -45,31 +44,31 @@ class EditPage extends React.Component {

{this.props.t("editPage1")}

{this.props.t("editPage2")}{" "} - {this.props.t("editPage3")} - +

{this.props.t("editPage4")}{" "} - {this.props.t("editPage3")} - {" "} + {" "} {this.props.t("editPage5")}

- - +

diff --git a/src/pages/profile.js b/src/pages/profile.js index 691daff83..0f45e5e8d 100644 --- a/src/pages/profile.js +++ b/src/pages/profile.js @@ -9,7 +9,6 @@ import LoginStateContext, { withLoginStateContext, } from "../contexes/LoginStateContext" import Container from "../components/Container" -import { OutboundLink } from "gatsby-plugin-google-analytics" import { getCachedUserDetails } from "../services/moocfi" import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" @@ -70,9 +69,9 @@ class MissingInfo extends React.Component {

Täällä voit muokata mooc.fi -tilisi asetuksia tämän kurssin osalta. Katso myös profiilisi mooc.fi:n Test My Code -palvelussa:{" "} - + https://tmc.mooc.fi - + .

diff --git a/src/pages/report-issue.js b/src/pages/report-issue.js index d560f4bc7..764db660f 100644 --- a/src/pages/report-issue.js +++ b/src/pages/report-issue.js @@ -2,7 +2,6 @@ import React from "react" import Helmet from "react-helmet" import Layout from "../templates/Layout" import Container from "../components/Container" -import { OutboundLink } from "gatsby-plugin-google-analytics" import { withLoginStateContext } from "../contexes/LoginStateContext" import { Button, Typography } from "@material-ui/core" import CourseSettings from "../../course-settings" @@ -21,7 +20,7 @@ const ReportIssue = ({ t }) => (

{t("reportIssue1")}

{t("reportIssue2")}{" "} - ( rel="noopener noreferrer" > {t("reportIssue3")} - +

{t("reportIssue4")}{" "} - {t("reportIssue3")} - {" "} + {" "} {t("reportIssue5")}

- ( - +

diff --git a/src/pages/sign-in.js b/src/pages/sign-in.js index 8b4dbebde..c7d034563 100644 --- a/src/pages/sign-in.js +++ b/src/pages/sign-in.js @@ -4,7 +4,6 @@ import Layout from "../templates/Layout" import { authenticate, loggedIn } from "../services/moocfi" import { navigate, Link } from "gatsby" import { TextField, Button } from "@material-ui/core" -import { OutboundLink } from "gatsby-plugin-google-analytics" import { withTranslation } from "react-i18next" import styled from "styled-components" import LoginStateContext, { @@ -108,13 +107,13 @@ class SignInPage extends React.Component { {this.props.t("user:courseUses")}{" "} - mooc.fi - {" "} + {" "} {this.props.t("user:courseUses2")} @@ -163,13 +162,13 @@ class SignInPage extends React.Component { {this.props.t("user:createAccount")} - {this.props.t("user:forgottenPW")} - + diff --git a/src/partials/GoogleFormLink.js b/src/partials/GoogleFormLink.js index 8cd0fcf4b..93359824f 100644 --- a/src/partials/GoogleFormLink.js +++ b/src/partials/GoogleFormLink.js @@ -2,7 +2,6 @@ import React, { useContext } from "react" import LoginStateContext from "../contexes/LoginStateContext" import styled from "styled-components" import { Card } from "@material-ui/core" -import { OutboundLink } from "gatsby-plugin-google-analytics" import { withTranslation } from "react-i18next" import withSimpleErrorBoundary from "../util/withSimpleErrorBoundary" import { useAsync } from "react-use" @@ -55,9 +54,9 @@ const GoogleFormLink = ({ children, href, t, emailfieldname }) => { )}` } return ( - + {children} - + ) } diff --git a/src/partials/ProgrammingExercise/ExtraDetails.js b/src/partials/ProgrammingExercise/ExtraDetails.js index f9bc449b8..b2fef810b 100644 --- a/src/partials/ProgrammingExercise/ExtraDetails.js +++ b/src/partials/ProgrammingExercise/ExtraDetails.js @@ -1,6 +1,5 @@ import React from "react" import Loading from "../../components/Loading" -import { OutboundLink } from "gatsby-plugin-google-analytics" import { ExpansionPanel, ExpansionPanelSummary, @@ -30,24 +29,24 @@ const ExtraDetails = ({ exerciseDetails, onUpdate, nocoins, t }) => {
{t("submitNetBeans")}{" "} - {t("submitHowTo")} - + . {t("seeSubmissions")}{" "} - {t("here")} - + .
diff --git a/src/partials/ProgrammingExercise/index.js b/src/partials/ProgrammingExercise/index.js index 3c9a8d730..c8effde79 100644 --- a/src/partials/ProgrammingExercise/index.js +++ b/src/partials/ProgrammingExercise/index.js @@ -1,6 +1,5 @@ import React from "react" import styled from "styled-components" -import { OutboundLink } from "gatsby-plugin-google-analytics" import { get } from "lodash" import { withTranslation } from "react-i18next" @@ -152,13 +151,13 @@ class ProgrammingExercise extends React.Component {

{this.props.t("submitNB")}{" "} - {this.props.t("submitHowTo")} - + .

@@ -174,13 +173,13 @@ class ProgrammingExercise extends React.Component {

{this.props.t("submitNB")}{" "} - {this.props.t("submitHowTo")} - + .

diff --git a/src/partials/RegistrationLink.js b/src/partials/RegistrationLink.js index 3fe677cf2..4dd69731c 100644 --- a/src/partials/RegistrationLink.js +++ b/src/partials/RegistrationLink.js @@ -1,6 +1,5 @@ import React from "react" import moment from "moment" -import { OutboundLink } from "gatsby-plugin-google-analytics" import withSimpleErrorBoundary from "../util/withSimpleErrorBoundary" const start = moment("01/01/2018", "DD/MM/YYYY") @@ -26,7 +25,7 @@ function getLink() { } const RegistrationLink = () => { - return {getLink()} + return {getLink()} } export default withSimpleErrorBoundary(RegistrationLink) diff --git a/src/partials/RegistrationLink2.js b/src/partials/RegistrationLink2.js index 66fe4140f..91e5185ca 100644 --- a/src/partials/RegistrationLink2.js +++ b/src/partials/RegistrationLink2.js @@ -1,6 +1,5 @@ import React from "react" import moment from "moment" -import { OutboundLink } from "gatsby-plugin-google-analytics" import withSimpleErrorBoundary from "../util/withSimpleErrorBoundary" const start = moment("01/01/2018", "DD/MM/YYYY") @@ -26,7 +25,7 @@ function getLink() { } const RegistrationLink2 = () => { - return {getLink()} + return {getLink()} } export default withSimpleErrorBoundary(RegistrationLink2) diff --git a/src/partials/SqlTrainerExercise.js b/src/partials/SqlTrainerExercise.js index d5b6db52f..ada9e4aff 100644 --- a/src/partials/SqlTrainerExercise.js +++ b/src/partials/SqlTrainerExercise.js @@ -1,6 +1,5 @@ import React from "react" import styled from "styled-components" -import { OutboundLink } from "gatsby-plugin-google-analytics" import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" import { faDatabase as icon } from "@fortawesome/free-solid-svg-icons" @@ -46,13 +45,13 @@ const SqltrainerExercise = (props) => { {props.children} Löydät harjoittelujärjestelmän osoitteesta{" "} - https://sql-t.herokuapp.com/ - + ) diff --git a/src/partials/index.js b/src/partials/index.js index 34e89e62b..db51e5d77 100644 --- a/src/partials/index.js +++ b/src/partials/index.js @@ -20,8 +20,6 @@ // export default getNamedPartials -import { OutboundLink } from "gatsby-plugin-google-analytics" - import Test from "./Test" import PagesInThisSection from "./PagesInThisSection" import ProgrammingExercise from "./ProgrammingExercise" @@ -111,7 +109,6 @@ const mapping = () => ({ td: TableCell, th: TableTh, deadline: Deadline, - a: OutboundLink, h1: H1, h2: H2, h3: H3,