Skip to content

Commit a2b1c2c

Browse files
authored
Merge branch 'master' into beta-new
2 parents cbf01e9 + 6c2e5e5 commit a2b1c2c

452 files changed

Lines changed: 6214 additions & 131 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ git clone git@github.com:ParallelMaths/parallel.git
1818
cd parallel
1919
```
2020

21-
**Next you need to setup your service account information**
21+
**Next you need to setup your service account & aws information**
2222
```bash
2323
mkdir private
2424
touch private/service-account.json # put your service account json in here
25+
touch private/aws-account.json # put your aws credential json in here
2526
```
2627

2728
**Then you can install the node dependancies using our version of Node**
@@ -37,6 +38,14 @@ npm start
3738

3839
**You can access the local server on http://localhost:5000**
3940

41+
## Scripts
42+
43+
We have many scripts availible in this repo. The most commonly used is
44+
45+
```bash
46+
npm run get-results
47+
```
48+
4049
## Deployments
4150

4251
To deploy updates to the [live site](https://parallel.org.uk), use

functions/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const { countries } = require('./utilities/countries')
2020
const isProfileComplete = require('./utilities/profileComplete');
2121
const { getCleanAnswers, getPgPoints } = require('./utilities/pgPoints')
2222
const { getTypeSafeUser } = require('./utilities/getTypeSafeUser')
23+
const { fetchPassword, OVERRIDE_PASSWORD } = require('./utilities/fetchPassword')
2324

2425
const PAGES = require('./build/pages.json');
2526
const LEVELS = ['year6', 'year7', 'year8', 'year9', 'year10', 'year11'];
@@ -739,7 +740,7 @@ app.get('/homework/:pid', (req, res, next) => {
739740
res.render('homework', {pid, body, page: HOMEWORK_MAP[pid], userData});
740741
});
741742

742-
app.get('/test/:pid', (req, res, next) => {
743+
app.get('/test/:pid', async (req, res, next) => {
743744
const pid = req.params.pid;
744745
if (!TEST_MAP[pid]) return next();
745746

@@ -758,7 +759,8 @@ app.get('/test/:pid', (req, res, next) => {
758759
if(!page.password || page.answersVisible || showAnswersIfSubmitted) {
759760
hasPassword = true;
760761
} else if(req.query.p) {
761-
if(req.query.p == page.password) {
762+
const password = await fetchPassword(pid);
763+
if(req.query.p === password || req.query.p === OVERRIDE_PASSWORD) {
762764
hasPassword = true;
763765
} else {
764766
passwordIncorrect = true;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const OVERRIDE_PASSWORD = 'applemangopear';
2+
3+
async function fetchPassword(pid) {
4+
try {
5+
const response = await fetch(`https://parallel.org.uk/admin/api/password/${encodeURIComponent(pid)}`);
6+
const data = await response.json();
7+
return data.password || OVERRIDE_PASSWORD;
8+
} catch (e) {
9+
console.error('Failed to fetch password for', pid, e);
10+
return OVERRIDE_PASSWORD;
11+
}
12+
}
13+
14+
module.exports = { fetchPassword, OVERRIDE_PASSWORD };

pages/academy-7sum-2026-week-1.md

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# Parallel Academy Year 7 Summer Term Week 1 Assignment
2+
3+
These problems relate to a recent theme you have been covering with your tutor. They are arranged in order of increasing difficulty and the final problem is much more of a challenge than the rest.
4+
5+
The problems are designed to help you reflect on material from previous tutorial sessions (which you can access on your Academy page).
6+
7+
The number of marks each question or part is worth is shown. Some have an optional hint, which cost 1 mark, so only reveal the hint if you’ve given the problem some real thought.
8+
9+
Take your time, ensuring that you haven't overlooked something or made a silly error, before submitting your answers. Please remember that completing homework is certainly not a race!
10+
11+
**For questions where you need to type in the answer, unless otherwise specified you may assume the answer is a whole number, and you should only enter the number itself.**
12+
13+
You should only leave an answer blank if you have really thought about the problem and are still stuck (particularly with the final problem).
14+
15+
We will also be running a weekly homework review session (look out for our emails).
16+
17+
**Before you click Submit at the end of the assignment, check that all of your answers have been entered correctly.**
18+
19+
**After you click Submit, make sure you scroll down to see the correct answers and read the full written solutions.**
20+
21+
## 1.
22+
![](/resources/academy-7sum-2026-week-1/q1.png){image align="center"}
23+
24+
::: problem id=1_1 marks=2
25+
26+
* [ ] (A) 1398
27+
* [x] (B) 1695
28+
* [ ] (C) 8765
29+
* [ ] (D) 4751
30+
* [ ] (E) 2079
31+
32+
^^^ hint id=1_1_1 marks=1
33+
![](/resources/academy-7sum-2026-week-1/h1.png){image align="center"}
34+
^^^
35+
36+
---
37+
38+
![](/resources/academy-7sum-2026-week-1/s1.png){image align="center"}
39+
:::
40+
41+
42+
## 2.
43+
![](/resources/academy-7sum-2026-week-1/q2.png){image align="center"}
44+
45+
::: problem id=2_1 marks=2
46+
47+
* [ ] (A) 1231
48+
* [ ] (B) 2312
49+
* [x] (C) 12312
50+
* [ ] (D) 21321
51+
* [ ] (E) 32132
52+
53+
^^^ hint id=2_1_1 marks=1
54+
![](/resources/academy-7sum-2026-week-1/h2.png){image align="center"}
55+
^^^
56+
57+
---
58+
59+
![](/resources/academy-7sum-2026-week-1/s2.png){image align="center"}
60+
:::
61+
62+
63+
## 3.
64+
![](/resources/academy-7sum-2026-week-1/q3.png){image align="center"}
65+
66+
::: problem id=3_1 marks=2
67+
68+
* [x] (A) 24
69+
* [ ] (B) 34
70+
* [ ] (C) 44
71+
* [ ] (D) 54
72+
* [ ] (E) 64
73+
74+
^^^ hint id=3_1_1 marks=1
75+
![](/resources/academy-7sum-2026-week-1/h3.png){image align="center"}
76+
^^^
77+
78+
---
79+
80+
![](/resources/academy-7sum-2026-week-1/s3.png){image align="center"}
81+
:::
82+
83+
84+
## 4.
85+
![](/resources/academy-7sum-2026-week-1/q4.png){image align="center"}
86+
87+
::: problem id=4_1 marks=2
88+
89+
* [ ] (A) One turn
90+
* [x] (B) Two turns
91+
* [ ] (C) Three turns
92+
* [ ] (D) Four turns
93+
* [ ] (E) It is impossible
94+
95+
^^^ hint id=4_1_1 marks=1
96+
![](/resources/academy-7sum-2026-week-1/h4.png){image align="center"}
97+
^^^
98+
99+
---
100+
101+
![](/resources/academy-7sum-2026-week-1/s4.png){image align="center"}
102+
:::
103+
104+
105+
## 5.
106+
![](/resources/academy-7sum-2026-week-1/q5.png){image align="center"}
107+
108+
::: problem id=5_1 marks=2
109+
110+
* [ ] (A) 13
111+
* [x] (B) 13.5
112+
* [ ] (C) 14
113+
* [ ] (D) 14.5
114+
* [ ] (E) More information needed
115+
116+
^^^ hint id=5_1_1 marks=1
117+
![](/resources/academy-7sum-2026-week-1/h5.png){image align="center"}
118+
^^^
119+
120+
---
121+
122+
![](/resources/academy-7sum-2026-week-1/s5.png){image align="center"}
123+
:::
124+
125+
## 6.
126+
![](/resources/academy-4-week-2/4-skull.png){image align="right"}
127+
![](/resources/academy-7sum-2026-week-1/q6.png){image align="center"}
128+
129+
::: problem id=6_1 marks=2
130+
131+
* [ ] A
132+
* [x] B
133+
* [ ] C
134+
* [ ] D
135+
* [ ] E
136+
137+
^^^ hint id=6_1_1 marks=1
138+
![](/resources/academy-7sum-2026-week-1/h6.png){image align="center"}
139+
^^^
140+
141+
---
142+
143+
![](/resources/academy-7sum-2026-week-1/s6.png){image align="center"}
144+
:::
145+
146+
147+
**Before you click Submit at the end of the assignment, check that all of your answers have been entered correctly.**
148+
149+
**After you click Submit, make sure you scroll down to see the correct answers and read the full written solutions.**

pages/academy-7sum-2026-week-2.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Parallel Academy Year 7 Summer Term Week 2 Assignment
2+
3+
These problems relate to a recent theme you have been covering with your tutor. They are arranged in order of increasing difficulty and the final problem is much more of a challenge than the rest.
4+
5+
The problems are designed to help you reflect on material from previous tutorial sessions (which you can access on your Academy page).
6+
7+
The number of marks each question or part is worth is shown. Some have an optional hint, which cost 1 mark, so only reveal the hint if you’ve given the problem some real thought.
8+
9+
Take your time, ensuring that you haven't overlooked something or made a silly error, before submitting your answers. Please remember that completing homework is certainly not a race!
10+
11+
**For questions where you need to type in the answer, unless otherwise specified you may assume the answer is a whole number, and you should only enter the number itself.**
12+
13+
You should only leave an answer blank if you have really thought about the problem and are still stuck (particularly with the final problem).
14+
15+
We will also be running a weekly homework review session (look out for our emails).
16+
17+
**Before you click Submit at the end of the assignment, check that all of your answers have been entered correctly.**
18+
19+
**After you click Submit, make sure you scroll down to see the correct answers and read the full written solutions.**
20+
21+
## 1.
22+
![](/resources/academy-7sum-2026-week-2/q1.png){image align="center"}
23+
24+
::: problem id=1_1 marks=1
25+
![](/resources/academy-7sum-2026-week-2/q1a.png){image align="center"}
26+
a) <input type="text" solution="g"/>
27+
28+
---
29+
30+
![](/resources/academy-7sum-2026-week-2/s1a.png){image align="center"}
31+
:::
32+
33+
::: problem id=1_2 marks=1
34+
![](/resources/academy-7sum-2026-week-2/q1b.png){image align="center"}
35+
b) <input type="text" solution="d"/>
36+
37+
---
38+
39+
![](/resources/academy-7sum-2026-week-2/s1b.png){image align="center"}
40+
:::
41+
42+
::: problem id=1_3 marks=1
43+
![](/resources/academy-7sum-2026-week-2/q1c.png){image align="center"}
44+
c) <input type="text" solution="e"/>
45+
46+
---
47+
48+
![](/resources/academy-7sum-2026-week-2/s1c.png){image align="center"}
49+
:::
50+
51+
::: problem id=1_4 marks=1
52+
![](/resources/academy-7sum-2026-week-2/q1d.png){image align="center"}
53+
d) <input type="text" solution="h"/>
54+
55+
---
56+
57+
![](/resources/academy-7sum-2026-week-2/s1d.png){image align="center"}
58+
:::
59+
60+
::: problem id=1_5 marks=1
61+
![](/resources/academy-7sum-2026-week-2/q1e.png){image align="center"}
62+
e) <input type="number" solution="165"/>
63+
64+
---
65+
66+
![](/resources/academy-7sum-2026-week-2/s1e.png){image align="center"}
67+
:::
68+
69+
70+
## 2.
71+
![](/resources/academy-7sum-2026-week-2/q2.png){image align="center"}
72+
73+
::: problem id=2_1 marks=2
74+
<input type="number" solution="21"/>
75+
76+
---
77+
78+
![](/resources/academy-7sum-2026-week-2/s2.png){image align="center"}
79+
:::
80+
81+
82+
## 3.
83+
![](/resources/academy-7sum-2026-week-2/q3.png){image align="center"}
84+
85+
::: problem id=3_1 marks=2
86+
<input type="number" solution="51"/>
87+
88+
^^^ hint id=3_1_1 marks=1
89+
![](/resources/academy-7sum-2026-week-2/h3.png){image align="center"}
90+
^^^
91+
92+
---
93+
94+
![](/resources/academy-7sum-2026-week-2/s3.png){image align="center"}
95+
:::
96+
97+
98+
## 4.
99+
![](/resources/academy-7sum-2026-week-2/q4.png){image align="center"}
100+
101+
::: problem id=4_1 marks=2
102+
<input type="number" solution="53"/>
103+
104+
^^^ hint id=4_1_1 marks=1
105+
![](/resources/academy-7sum-2026-week-2/h4.png){image align="center"}
106+
^^^
107+
108+
---
109+
110+
![](/resources/academy-7sum-2026-week-2/s4.png){image align="center"}
111+
:::
112+
113+
114+
## 5.
115+
![](/resources/academy-7sum-2026-week-2/q5.png){image align="center"}
116+
117+
::: problem id=5_1 marks=2
118+
<input type="number" solution="900"/>
119+
120+
^^^ hint id=5_1_1 marks=1
121+
![](/resources/academy-7sum-2026-week-2/h5.png){image align="center"}
122+
^^^
123+
124+
---
125+
126+
![](/resources/academy-7sum-2026-week-2/s5.png){image align="center"}
127+
:::
128+
129+
## 6.
130+
![](/resources/academy-4-week-2/4-skull.png){image align="right"}
131+
![](/resources/academy-7sum-2026-week-2/q6.png){image align="center"}
132+
133+
::: problem id=6_1 marks=2
134+
<input type="number" solution="110"/>
135+
136+
^^^ hint id=6_1_1 marks=1
137+
![](/resources/academy-7sum-2026-week-2/h6.png){image align="center"}
138+
^^^
139+
140+
---
141+
142+
![](/resources/academy-7sum-2026-week-2/s6.png){image align="center"}
143+
:::
144+
145+
146+
**Before you click Submit at the end of the assignment, check that all of your answers have been entered correctly.**
147+
148+
**After you click Submit, make sure you scroll down to see the correct answers and read the full written solutions.**

0 commit comments

Comments
 (0)