Skip to content

Commit 06495f9

Browse files
committed
Update template
1 parent e059ef8 commit 06495f9

26 files changed

Lines changed: 4224 additions & 3442 deletions

gatsby-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const blue = require("@material-ui/core/colors/red").default
33

44
module.exports = {
55
siteMetadata: {
6-
title: "Ohjelmoinnin MOOC 2020",
6+
title: "Ohjelmoinnin MOOC 2019",
77
siteUrl: `https://ohjelmointi-19.mooc.fi`,
88
},
99
plugins: [

gatsby-node.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ exports.createPages = ({ actions, graphql }) => {
1010
const { createPage, createRedirect } = actions
1111

1212
createRedirect({
13-
fromPath: `/osa-1/x-redirect-example`,
13+
fromPath: `/osa-1/4-muuttujat`,
1414
isPermanent: true,
1515
redirectInBrowser: true,
16-
toPath: `/osa-1/`,
16+
toPath: `/osa-1/4-laskentaa`,
1717
})
1818

1919
const courseMaterialTemplate = path.resolve(

package-lock.json

Lines changed: 3914 additions & 3196 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
"@fortawesome/free-regular-svg-icons": "^5.8.2",
77
"@fortawesome/free-solid-svg-icons": "^5.8.2",
88
"@fortawesome/react-fontawesome": "^0.1.4",
9-
"@material-ui/core": "^4.0.0",
10-
"@material-ui/icons": "^4.0.0",
11-
"@material-ui/styles": "^4.0.0",
9+
"@material-ui/core": "^4.1.0",
10+
"@material-ui/icons": "^4.1.0",
1211
"@rstacruz/gatsby-remark-component": "^1.2.0-pre.1",
1312
"axios": "^0.18.0",
1413
"babel-plugin-styled-components": "^1.10.0",
1514
"clsx": "^1.0.4",
1615
"code-states-visualizer": "^0.1.1",
1716
"color": "^3.1.1",
17+
"commonmark": "^0.29.0",
1818
"core-js": "^3.1.2",
1919
"crowdsorcerer": "^0.1.79",
2020
"fetch-ponyfill": "^6.0.2",
@@ -40,17 +40,21 @@
4040
"interactjs": "^1.4.2",
4141
"jquery": "^3.4.1",
4242
"moment": "^2.24.0",
43+
"moocfi-quizzes": "^0.3.5",
4344
"pdf-slideshow": "^0.1.4",
4445
"prismjs": "^1.16.0",
4546
"react": "^16.8.6",
47+
"react-content-loader": "^4.2.2",
4648
"react-dom": "^16.8.6",
4749
"react-helmet": "^5.2.1",
4850
"react-jss": "^8.6.1",
4951
"react-motion": "^0.5.2",
52+
"react-redux": ">= 7.1.0",
5053
"react-scrollspy": "^3.4.0",
5154
"react-youtube": "^7.9.0",
5255
"recharts": "^1.6.2",
5356
"redux-action-analytics": "0.0.3",
57+
"redux-devtools-extension": "^2.13.8",
5458
"rehype-react": "^3.1.0",
5559
"store": "^2.0.12",
5660
"styled-components": "^4.2.0",
@@ -59,6 +63,7 @@
5963
"typeface-open-sans-condensed": "0.0.72",
6064
"typeface-roboto-mono": "0.0.54",
6165
"typeface-roboto-slab": "0.0.72",
66+
"typesafe-actions": "^4.4.2",
6267
"uuid": "^3.3.2",
6368
"visibilityjs": "^2.0.2"
6469
},
@@ -75,7 +80,8 @@
7580
"test": "echo \"Error: no test specified\" && exit 1",
7681
"upgrade-interactive": "npm-check --update",
7782
"now-dev": "gatsby develop -p $PORT",
78-
"now-build": "npm run build"
83+
"now-build": "npm run build",
84+
"local-quizzes-package": "./use-local-quizzes.sh"
7985
},
8086
"devDependencies": {
8187
"@babel/plugin-proposal-optional-chaining": "^7.2.0",

plugins/gatsby-transformer-moocfi-exercises/gatsby-node.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const GraphQLString = require("gatsby/graphql").GraphQLString
22
const GraphQLList = require("gatsby/graphql").GraphQLList
33
const GraphQLObjectType = require("gatsby/graphql").GraphQLObjectType
44

5-
const <quiz id=natorRegex = /<\s*<quiz id=nator\s*id\s*=\s*['"]\s*(\w+)\s*['"]\s*>/gm
5+
const quizRegex = /<\s*quiz\s*id\s*=\s*['"]\s*([\w-]+)\s*['"]\s*>/gm
66
const crowdsorcererRegex = /<\s*crowdsorcerer\s*id\s*=\s*['"]\s*(\w+)\s*['"].*>/gm
77
const programmingExerciseTagRegex = /<\s*programming-exercise\s+(.*)\s*>/gm
88
const programmingExerciseNameRegex = /\bname\s*=\s*(["].*?["]|['].*?['])/gm
@@ -49,11 +49,11 @@ exports.setFieldsOnGraphQLNodeType = ({ type }) => {
4949
type: GraphQLList(ExerciseType),
5050
resolve: (node, _fieldArgs) => {
5151
const source = node.rawMarkdownBody
52-
const <quiz id=zes = getMatches(source, <quiz id=natorRegex, 1).map(res => {
52+
const quizzes = getMatches(source, quizRegex, 1).map(res => {
5353
return {
5454
id: res.match,
5555
location: res.location,
56-
type: "<quiz id=nator",
56+
type: "quiz",
5757
parentPagePath: node.frontmatter.path,
5858
}
5959
})
@@ -88,7 +88,7 @@ exports.setFieldsOnGraphQLNodeType = ({ type }) => {
8888
}
8989
})
9090

91-
return programmingExercises.concat(<quiz id=zes).concat(crowdsorcerers).sort(function(a, b) {
91+
return programmingExercises.concat(quizzes).concat(crowdsorcerers).sort(function(a, b) {
9292
return a.location - b.location
9393
})
9494
},

src/components/Banner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const SubHeading = styled.div`
5050

5151
const Banner = () => (
5252
<BannerWrapper>
53-
<Heading>Ohjelmoinnin MOOC 2020</Heading>
53+
<Heading>Ohjelmoinnin MOOC 2019</Heading>
5454
<SubHeading>Ohjelmoinnin alkeet kaikille, ilmaiseksi</SubHeading>
5555
</BannerWrapper>
5656
)

src/components/Footer.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,7 @@ class Footer extends React.Component {
114114
</OutboundLink>
115115
</GithubContainer>
116116
<ContentContainer>
117-
Kurssin on tehnyt Helsingin yliopiston{" "}
118-
<OutboundLink
119-
href="https://www.helsinki.fi/en/researchgroups/data-driven-education"
120-
target="_blank"
121-
rel="noopener noreferrer"
122-
>
123-
Agile Education Research -tutkimusryhmä
124-
</OutboundLink>
117+
Kurssin on tehnyt Teemu Kerola
125118
.
126119
</ContentContainer>
127120

src/components/Sidebar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ var content2 = [
122122
{ separator: true, title: "Ohjelmoinnin perusteet" },
123123
]
124124

125-
var futurePages = [] // { title: "Osa 14", tba: "19.4.2020" }
125+
var futurePages = [] // { title: "Osa 14", tba: "19.4.2019" }
126126

127127
const MobileWrapper = styled.div`
128128
@media only screen and (max-width: ${SMALL_MEDIUM_BREAKPOINT}) {
@@ -188,7 +188,7 @@ class Sidebar extends React.Component {
188188
</Button>
189189
</MenuExpanderWrapper>
190190
<SidebarContainer mobileMenuOpen={this.props.mobileMenuOpen}>
191-
<Brand>Ohjelmoinnin MOOC 2020</Brand>
191+
<Brand>Ohjelmoinnin MOOC 2019</Brand>
192192
<TreeViewContainer>
193193
<TreeView data={content} />
194194
</TreeViewContainer>

src/html.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ export default class HTML extends React.Component {
2222
dangerouslySetInnerHTML={{ __html: this.props.body }}
2323
/>
2424
{this.props.postBodyComponents}
25-
<script>window._<quiz id=NATOR_ENABLED = true;</script>
26-
<script src="https://<quiz id=nator.mooc.fi/javascripts/plugin-loader.min.js" />
2725
</body>
2826
</html>
2927
)

src/pages/credits.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ const Credits = () => (
4141
<li>Mikael Nousiainen</li>
4242
<li>Nea Pirttinen</li>
4343
<li>Pekka Mikkola</li>
44-
<li>Reetta Puska</li>
4544
<li>Vilma Kangas</li>
4645
</ul>
4746

0 commit comments

Comments
 (0)