From 2b196a9f7fe5f96037a6b8fbeacdd42bc5a4b848 Mon Sep 17 00:00:00 2001
From: Saugat Pandey
Date: Tue, 14 Mar 2023 01:12:36 -0500
Subject: [PATCH] adding elements to score page
---
.../surveys/quiz/xGc_iJ_5RI-B0PRBROEN-w.txt | 1 +
ReactTool/frontend/src/pages/thank_you.js | 58 ++++++++++---------
.../frontend/src/pages/visualization_quiz.js | 52 +++++++----------
3 files changed, 54 insertions(+), 57 deletions(-)
create mode 100644 ReactTool/backend/surveys/quiz/xGc_iJ_5RI-B0PRBROEN-w.txt
diff --git a/ReactTool/backend/surveys/quiz/xGc_iJ_5RI-B0PRBROEN-w.txt b/ReactTool/backend/surveys/quiz/xGc_iJ_5RI-B0PRBROEN-w.txt
new file mode 100644
index 0000000..1c3a779
--- /dev/null
+++ b/ReactTool/backend/surveys/quiz/xGc_iJ_5RI-B0PRBROEN-w.txt
@@ -0,0 +1 @@
+{"session_id": "xGc_iJ_5RI-B0PRBROEN-w", "responses": {}, "mini_responses": {"What distance have customers traveled in the taxi the most?": {"response": "30 - 40 Km", "truth": 1, "time": 0.488}, "In 2020, the unemployment rate for Washington (WA) was higher than that of Wisconsin (WI).": {"response": "True", "truth": 0, "time": 0.155}, "Which country has the lowest proportion of Gold medals?": {"response": "U.S.A.", "truth": 0, "time": 0.199}, "What is the approximate global smartphone market share of Samsung?": {"response": "25.3%", "truth": 0, "time": 0.21}, "What was the price of a barrel of oil in February 2020?": {"response": "$47.02", "truth": 0, "time": 0.18}, "What was the ratio of girls named 'Isla' to girls named 'Amelia' in 2012 in the UK?": {"response": "1 to 2", "truth": 1, "time": 0.178}, "What is the cost of peanuts in Seoul?": {"response": "$5.2", "truth": 0, "time": 0.151}, "Which city's metro system has the largest number of stations?": {"response": "Shanghai", "truth": 1, "time": 0.146}, "There is a negative linear relationship between the height and the weight of the 85 males.": {"response": "True", "truth": 1, "time": 0.133}, "eBay is nested in the Software category.": {"response": "True", "truth": 1, "time": 0.089}, "What is the average internet speed in Japan?": {"response": "40.51 Mbps", "truth": 1, "time": 0.125}, "What was the average price of pount of coffee beans in October 2019?": {"response": "$0.90", "truth": 0, "time": 0.491}}, "score": 0, "mini_score": 5, "device": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36", "demographic_responses": {"sex": "male", "age": "21", "education": "associate", "familiarity": "somewhat", "color-blind": "no"}, "comment": "", "height": 870, "width": 1512}
diff --git a/ReactTool/frontend/src/pages/thank_you.js b/ReactTool/frontend/src/pages/thank_you.js
index 4ae0d52..4059f09 100644
--- a/ReactTool/frontend/src/pages/thank_you.js
+++ b/ReactTool/frontend/src/pages/thank_you.js
@@ -1,7 +1,8 @@
-import React, {Component} from 'react';
-import {Col, Row, Button, InputGroup, FormControl} from 'react-bootstrap';
-import {CopyToClipboard} from 'react-copy-to-clipboard';
-import {score_2} from './visualization_quiz';
+import React, { Component } from 'react';
+import { Col, Row, Button, InputGroup, FormControl } from 'react-bootstrap';
+import { CopyToClipboard } from 'react-copy-to-clipboard';
+import { score_2 } from './visualization_quiz';
+import { record_ques } from './visualization_quiz';
class ThankYou extends Component {
@@ -18,9 +19,33 @@ class ThankYou extends Component {
})
}
}
+ renderTable() {
+ return (
+
+ );
+ }
render() {
console.log('attempting to render')
+ console.log("The keys of the dictionary is: " + Object.keys(record_ques))
+ console.log("The values of the dictionary is: " + Object.values(record_ques))
if (this.props.location.state == null) {
return (