🔇 Removed print- and console.log-statements
This commit is contained in:
@@ -34,7 +34,6 @@ async def generate_spreadsheet(quiz_results: dict, quiz: Quiz) -> BytesIO:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
async with ClientSession() as session, session.get(question["image"]) as response:
|
async with ClientSession() as session, session.get(question["image"]) as response:
|
||||||
print("OK!!!!")
|
|
||||||
img_data = BytesIO(await response.read())
|
img_data = BytesIO(await response.read())
|
||||||
worksheet.insert_image(i + 1, 2, question["image"], {"image_data": img_data})
|
worksheet.insert_image(i + 1, 2, question["image"], {"image_data": img_data})
|
||||||
image = Image.open(img_data)
|
image = Image.open(img_data)
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
timer_res = seconds.toString();
|
timer_res = seconds.toString();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
};
|
};
|
||||||
console.log(selected_answer);
|
|
||||||
|
|
||||||
timer(question.time);
|
timer(question.time);
|
||||||
|
|
||||||
|
|||||||
@@ -8,13 +8,10 @@
|
|||||||
|
|
||||||
const question = game_data.questions[parseInt(question_index)].answers;
|
const question = game_data.questions[parseInt(question_index)].answers;
|
||||||
for (let i = 0; i < question.length; i++) {
|
for (let i = 0; i < question.length; i++) {
|
||||||
console.log(question[i].answer, 'HI!!!');
|
|
||||||
data_store[question[i].answer] = 0;
|
data_store[question[i].answer] = 0;
|
||||||
}
|
}
|
||||||
console.log(data_store);
|
|
||||||
|
|
||||||
for (let i = 0; i < results.length; i++) {
|
for (let i = 0; i < results.length; i++) {
|
||||||
console.log(results[i].answer);
|
|
||||||
data_store[results[i].answer] += 1;
|
data_store[results[i].answer] += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,8 +64,6 @@
|
|||||||
let dataexport_download_a;
|
let dataexport_download_a;
|
||||||
let warnToLeave = true;
|
let warnToLeave = true;
|
||||||
|
|
||||||
$: console.log(timer_res);
|
|
||||||
|
|
||||||
let shown_question_now: number;
|
let shown_question_now: number;
|
||||||
const connect = () => {
|
const connect = () => {
|
||||||
socket.emit('register_as_admin', {
|
socket.emit('register_as_admin', {
|
||||||
@@ -77,11 +75,8 @@
|
|||||||
connect();
|
connect();
|
||||||
}
|
}
|
||||||
socket.on('registered_as_admin', (data) => {
|
socket.on('registered_as_admin', (data) => {
|
||||||
console.log('registered_as_admin', data['game']);
|
|
||||||
quiz_data = JSON.parse(data['game']);
|
quiz_data = JSON.parse(data['game']);
|
||||||
console.log(quiz_data);
|
console.log(quiz_data);
|
||||||
console.log(quiz_data.questions[0].question);
|
|
||||||
console.log(quiz_data.questions);
|
|
||||||
success = true;
|
success = true;
|
||||||
});
|
});
|
||||||
socket.on('player_joined', (data) => {
|
socket.on('player_joined', (data) => {
|
||||||
@@ -160,7 +155,6 @@
|
|||||||
|
|
||||||
socket.on('final_results', (data) => {
|
socket.on('final_results', (data) => {
|
||||||
// data = JSON.parse(data);
|
// data = JSON.parse(data);
|
||||||
console.log(data);
|
|
||||||
final_results = data;
|
final_results = data;
|
||||||
|
|
||||||
console.log(getWinnersSorted());
|
console.log(getWinnersSorted());
|
||||||
|
|||||||
@@ -1,78 +0,0 @@
|
|||||||
<script lang="ts">
|
|
||||||
import type { QuizData } from '$lib/quiz_types';
|
|
||||||
import Title from '$lib/play/title.svelte';
|
|
||||||
import Question from '$lib/play/question.svelte';
|
|
||||||
import { socket } from '$lib/socket';
|
|
||||||
import { navbarVisible } from '$lib/stores';
|
|
||||||
|
|
||||||
navbarVisible.set(true);
|
|
||||||
|
|
||||||
interface GameMeta {
|
|
||||||
started: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
let gameId = '81039240';
|
|
||||||
let message = '';
|
|
||||||
let username = '';
|
|
||||||
let gameData: QuizData;
|
|
||||||
let gameMeta: GameMeta = {
|
|
||||||
started: false
|
|
||||||
};
|
|
||||||
|
|
||||||
let question_index = '';
|
|
||||||
|
|
||||||
let unique = {};
|
|
||||||
|
|
||||||
// function restart() {
|
|
||||||
// unique = {}; // every {} is unique, {} === {} evaluates to false
|
|
||||||
// }
|
|
||||||
|
|
||||||
const connect = () => {
|
|
||||||
socket.emit('join_game', { game_pin: gameId, username: username });
|
|
||||||
};
|
|
||||||
|
|
||||||
const sendMessage = () => {
|
|
||||||
socket.emit('message', message);
|
|
||||||
message = '';
|
|
||||||
};
|
|
||||||
|
|
||||||
socket.on('joined_game', (data) => {
|
|
||||||
console.log('joined_game', data);
|
|
||||||
gameData = JSON.parse(data);
|
|
||||||
});
|
|
||||||
socket.on('game_not_found', (data) => {
|
|
||||||
console.log(data, 'game not found');
|
|
||||||
});
|
|
||||||
|
|
||||||
socket.on('join_game', (data) => {
|
|
||||||
console.log(data, 'join_game');
|
|
||||||
});
|
|
||||||
|
|
||||||
socket.on('message', (data) => {
|
|
||||||
console.log(data, 'message');
|
|
||||||
});
|
|
||||||
|
|
||||||
socket.on('start_game', () => {
|
|
||||||
gameMeta.started = true;
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#if !gameMeta.started}
|
|
||||||
<input bind:value={gameId} placeholder="GameID" />
|
|
||||||
<input bind:value={username} placeholder="Username" />
|
|
||||||
|
|
||||||
<button on:click={connect}>Connect</button>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<input bind:value={message} placeholder="message" />
|
|
||||||
<button on:click={sendMessage}>Send Message</button>
|
|
||||||
{:else if question_index === ''}
|
|
||||||
<Title bind:description={gameData.description} bind:title={gameData.title} />
|
|
||||||
{:else}
|
|
||||||
{#key unique}
|
|
||||||
<Question
|
|
||||||
bind:question={gameData.questions[parseInt(question_index)]}
|
|
||||||
bind:question_index
|
|
||||||
/>
|
|
||||||
{/key}
|
|
||||||
{/if}
|
|
||||||
@@ -63,7 +63,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const startGame = async (id: string): Promise<void> => {
|
const startGame = async (id: string): Promise<void> => {
|
||||||
console.log('start game', id);
|
|
||||||
let res;
|
let res;
|
||||||
if (window.confirm('Do you want to enable the captcha for players?')) {
|
if (window.confirm('Do you want to enable the captcha for players?')) {
|
||||||
res = await fetch(`/api/v1/quiz/start/${id}?captcha_enabled=True`, {
|
res = await fetch(`/api/v1/quiz/start/${id}?captcha_enabled=True`, {
|
||||||
|
|||||||
Reference in New Issue
Block a user