From 6961c52c6ef0885a22b276d5136fd7aa12ddb431 Mon Sep 17 00:00:00 2001 From: nitya26 <42712091+nitya2602@users.noreply.github.com> Date: Mon, 30 Dec 2019 23:35:51 +0530 Subject: [PATCH 01/36] Update app.js --- blind_coding/static/js/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/blind_coding/static/js/app.js b/blind_coding/static/js/app.js index 2eb2ffc..85bf672 100644 --- a/blind_coding/static/js/app.js +++ b/blind_coding/static/js/app.js @@ -148,6 +148,10 @@ const sendRequest = (method,url,data) => { if(getOutput().output == 'Correct Answer') start = 0; // startClock(); + qNo = receivedData['qNo'] + 1; + console.log(qNo); + document.getElementsByClassName('left')[0].getElementsByTagName('h5')[0] = "Question "+qNo; + document.getElementsByClassName('left')[0].innerHTML = getQuestion(qNo); return recievedData; } else{ @@ -325,4 +329,4 @@ function startClock() { function stopClock() { clearInterval(timerInterval); -} \ No newline at end of file +} From fd028e09e43c70837ce6800895860a31f0f9cf17 Mon Sep 17 00:00:00 2001 From: Harpinder Date: Tue, 31 Dec 2019 16:50:08 +0530 Subject: [PATCH 02/36] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a11e9ce..fd7e2d7 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,4 @@ - [ ] Add details in about section - [ ] Cursor does not goes up in the editor, fix it - [ ] Do Backend stuff - do not put keys as it is within the files +- [ ] Add feature to show code for sometime, say 5-10 seconds once per question From aba9b5b5b80c7a295c632d27a61dc227d214fbcf Mon Sep 17 00:00:00 2001 From: dmahajan980 Date: Tue, 31 Dec 2019 18:58:59 +0530 Subject: [PATCH 03/36] Fixed timer issues. --- blind_coding/db.sqlite3 | Bin 86016 -> 86016 bytes blind_coding/static/js/app.js | 268 ++++++++++++++++++---------------- 2 files changed, 143 insertions(+), 125 deletions(-) diff --git a/blind_coding/db.sqlite3 b/blind_coding/db.sqlite3 index 04c6145ca013682988f47757a65232ca7a043bdd..6bf83be7d32f9a637170a3d98bad73110976664e 100644 GIT binary patch delta 681 zcmZozz}m2Yb%GQVtI9+fCm^{oVVAC;p@N~Ym7%$nfuWwIp{1FT;bv{U>r-X^F>oG#=ZDG2}e1|!gc{}qYW)EhM&4wIT7$<)^TA`}K?8}&9T2P*um6M!RoL^L$ zW{_lRYG$69n`>-ZV3C<$mY*sxx&N3dSY@VpN`+5Pxl2`;A749t(14>K=eZe@07PGfq- z%*m|5bb7mh4dY}cM!SiQ(vx4E;uSK1dB;f4z|hFZ(p&&2>#2}X9RSeiOJ@* zui`CP7~L5nfkELtJz9nFJ!379S-Jg)Dx(t@S1SYad|+^#Vs70mC{oHSCBencAkWAl z&Xkf_R+*SroKeba00Iolx6e0bG!jRSW^)5GOEc5$kGvR_7`d1jelRe(0g2l{)6at} xlGbSQ7GU*lQFSB~v)kXOGKw-22PC#;F!Y*Aw0|g^PDImjBu~1 ziK(TT3IAsI)92;t4b0PXOAFFG-JPpSJuH(8JPHcaEsaBp%gtPZ<4b))vK_s>irgHX zb38MAO#{NRe1nTZO3KUqbBzMh0xMEVq6#AY%S!!%;?vwyJS=o|OOjpliV6ySBfQcA zO#A~qy$d`Is$2^^%Pq@FOx;`q;wyZdiVQ4^3Q|2n1C0zM3@vpHjdYEH!D$2vP6Goy zV+%tIW7ExRU&ULpFhnv$PB!H5o_^PdQF^ljhacniBdUx}TwLu8%=3YsKgHY*^lmw` zgcuh)gFGXLI7domS!H5gaYiYx0SIiLZ_H>UjvQNt#+GKLCfgr*F)A^#F*3O^Fu83u d6tH2^Xg23(^=++nBoqtV^ZXba83i!{6aW$nt78BF diff --git a/blind_coding/static/js/app.js b/blind_coding/static/js/app.js index fd4bbaa..85c3351 100644 --- a/blind_coding/static/js/app.js +++ b/blind_coding/static/js/app.js @@ -30,6 +30,7 @@ inp.addEventListener('select', function() { if (ctrlDown && (e.keyCode == vKey)) console.log("Document catch Ctrl+V"); }); + // Display/hide leaderboard let i = 0; $('.leaderboard-icon').click(function() { $('.leaderboard').fadeToggle(); @@ -44,97 +45,96 @@ inp.addEventListener('select', function() { } }) }); -const languages = ['c','java','cpp','cpp14','python2','python3']; +const languages = ['c','java','cpp','cpp14','python2','python3']; const versions = ['0','1','2']; - -var code = ` +let code = ` #include int main(){ printf("Hello World num entered is :"); return 0; }`; - let langNo = 0; let versionNo = 0; let input = '1'; let output = ''; -let qNo=0; +let qNo = 0; let tc1 = ''; let tc2 = ''; let tc3 = ''; -const setCode = (prog)=>{ +const setCode = prog => { code = prog; }; - -const getCode = () => { - return code; -}; +const getCode = () => { code } -const setLanguage = (langNum) => { +const setLanguage = langNum => { langNo = langNum; }; - -const getLanguage = () => { - return langNo; -}; +const getLanguage = () => { langNo }; -const setVersion = (vrsn) => { +const setVersion = vrsn => { versionNo = vrsn; }; +const getVersion = () => { versions[versionNo] }; -const getVersion = () => { - return versions[versionNo]; -} -const setCustomInput = (inp)=>{ +const setCustomInput = inp => { input = inp; } +const getCustomInput = () => { input }; -const getCustomInput = ()=>{ - return input; -} -const setOutput = (outp) => { - console.log('Result:',outp); +const setOutput = outp => { output = outp; }; +const getOutput = () => { output }; -const getOutput = () => { - return output; -}; +function getQNum() { + return qNo +} +// Get the various inputs and send it to server const runCode = () => { - stopClock(); - console.log('time elapsed is: ',start); + // Pause, send time or store time + // stopClock(); + pauseTime() + + console.log(`Time elapsed is: ${m} minutes and ${s} seconds`); + + // Get code entered by the user and store it let prog = document.getElementById("codeInput").value; - setCode(prog); + // setCode(prog); + // Get language chosen by the user and store it let lang = document.getElementById("langSelect").value; - setLanguage(lang); + // setLanguage(lang); - console.log('Language: ',getLanguage(),'code: ',getCode()); + // console.log('Language: ', getLanguage(), '\nCode: ', getCode()); + let time = m * 60 + s; + console.log(getQNum()) - var program = { - script : getCode(), - language: getLanguage(), - versionIndex: getVersion(), + let program = { + // Code equals script + // script : getCode(), + // language: getLanguage(), + script : prog, + language: lang, + versionIndex: versions[versionNo], clientId: "222a2ef84f6881409d32ae21369d1a32", - clientSecret:"67872757630a355db890ee74b6b20926cb9e025dbb444182df2bd2700fc64af1", + clientSecret: "67872757630a355db890ee74b6b20926cb9e025dbb444182df2bd2700fc64af1", stdin: getCustomInput(), //to give custom input - qNo: getQNum(), - timeElapsed: start + qNo: getQNum(), + timeElapsed: time }; - //just send this object to jdoodle url and send back the response - // for all test cases backend checks the output and returns no of test cases cleared - let resp = sendRequest('POST','runCode/',program); - - + // Send the code to jdoodle url with all other required parameters + // For all test cases backend checks the output and returns no of test cases cleared + // let resp = sendRequest('POST', 'runCode/', program); + sendRequest('POST', 'runCode/', program); }; function getCookie(name) { @@ -143,95 +143,107 @@ function getCookie(name) { } -const sendRequest = (method,url,data) => { - var csrf_token = getCookie('csrftoken'); - var ourRequest = new XMLHttpRequest(); - ourRequest.open(method,url, true); +const sendRequest = (method, url, data) => { + let csrf_token = getCookie('csrftoken'); + let ourRequest = new XMLHttpRequest(); + + ourRequest.open(method, url, true); ourRequest.setRequestHeader("Content-type", "application/json"); ourRequest.setRequestHeader("X-CSRFToken", csrf_token); + ourRequest.onload = function() { if (ourRequest.status >= 200 && ourRequest.status < 400) { - if(url == 'runCode/'){ - let recievedData = JSON.parse(ourRequest.responseText); - setOutput(recievedData); - document.getElementById("compilerOutput").value = getOutput().output; - document.getElementById('score').innerHTML = recievedData['score']; - console.log(recievedData['score']); - if(getOutput().output == 'Correct Answer') - start = 0; -// startClock(); - return recievedData; - } - else{ - let recievedData = JSON.parse(ourRequest.responseText); - let inpt = recievedData['sampIn'].split(' '); - let inStr = ''; - for(let i=0;i
'+'Sample Input'+'
'+recievedData['sampTCNum']+'
'+inStr+'

'+'Sample Output'+'
'+recievedData['sampleOut']; - console.log('hi ',recievedData); - document.getElementsByClassName('left')[0].innerHTML=que; - qNo = recievedData['qNo']; - console.log(qNo); - console.log(recievedData['userScore']); - document.getElementById('score').innerHTML = recievedData['userScore']; - return recievedData; - } + console.log('success 200'); + + if (url == 'runCode/'){ + console.log('1'); + + let recievedData = JSON.parse(ourRequest.responseText); + setOutput(recievedData); + document.getElementById("compilerOutput").value = getOutput(); + document.getElementById('score').innerHTML = recievedData['score']; + console.log(recievedData['score']); + if(getOutput() == 'Correct Answer') { + // start = 0; + s = 0; + m = 0; + } + // startClock(); + console.log("OO") + increaseTime() + + console.log(recievedData); + + return recievedData; + } + else { + console.log('2') + + let recievedData = JSON.parse(ourRequest.responseText); + let inpt = recievedData['sampIn'].split(' '); + let inStr = ''; + for(let i = 0; i < inpt.length; i++) { + inStr += inpt[i]; + inStr += '\n'; + } + let que = recievedData['question'] + '

'+'Sample Input' + '
' + recievedData['sampTCNum'] + '
' + inStr + '

' + 'Sample Output' + '
' + recievedData['sampleOut']; + console.log('Hi ',recievedData); + document.getElementsByClassName('left')[0].innerHTML = que; + qNo = recievedData['qNo']; + console.log(qNo); + console.log(recievedData['userScore']); + document.getElementById('score').innerHTML = recievedData['userScore']; + + console.log(recievedData); + + return recievedData; + } + } else { // Nothing - startClock(); + // startClock(); + console.log("OO") + increaseTime() } } + ourRequest.onerror = function() { // Nothing -// startClock(); + // startClock(); + console.log("OO") + increaseTime() } + console.log(JSON.stringify(data)); ourRequest.send(JSON.stringify(data)); }; -const getQuestion = (queNum) => { -// start = 0; - startClock(); - let data = { - queNum : queNum - }; - sendRequest('POST','/question/',data); +const getQuestion = queNum => { + // start = 0; + s = 0; + m = 0; + // // startClock(); + // console.log("OO") + // increaseTime() + // let data = { queNum }; + // sendRequest('POST', '/question/', data); + sendRequest('POST', '/question/', { queNum }); }; -function getQNum(){ - return qNo; -} - -window.onresize = function(){ +window.onresize = function() { if ((window.outerHeight - window.innerHeight) > 100) { - // console was opened (or screen was resized) - alert("Sorry!! you will be logged out since you didn't follow instructions"); - window.location.href="/logout" + // console was opened (or screen was resized) + alert("Sorry! You will be logged out since you didn't follow the instructions."); + window.location.href = "/logout" } } - - - - - - - - - - - - - function getCookie(name) { var v = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)'); return v ? v[2] : null; } + function login() { var csrf_token = getCookie('csrftoken'); var ourRequest = new XMLHttpRequest(); @@ -239,10 +251,8 @@ function login() { ourRequest.setRequestHeader("X-CSRFToken", csrf_token); ourRequest.setRequestHeader("Content-type", "application/json"); ourRequest.onload = function() { - if (ourRequest.status >= 200 && ourRequest.status < 400) { - ; - } else { - } + if (ourRequest.status >= 200 && ourRequest.status < 400) { ; } + else {} } ourRequest.onerror = function() { // Nothing @@ -250,10 +260,6 @@ function login() { ourRequest.send(); } -window.onload = () => { - startClock(); -} - function showAbout() { document.getElementsByClassName('about')[0].style.display = 'flex'; document.getElementsByClassName('backdrop')[0].style.display = 'block'; @@ -295,17 +301,19 @@ document.addEventListener('DOMContentLoaded', function() { } }); - let hamburger = document.querySelector(".hamburger"); - const title = document.querySelector('.title') +let hamburger = document.querySelector(".hamburger"); +const title = document.querySelector('.title') -hamburger.onclick = function(e){ +// Side-nav event handler +hamburger.onclick = function(e) { e.preventDefault; - if(hamburger.classList.contains("active")){ + if (hamburger.classList.contains("active")) { hamburger.classList.remove("active"); hamburger.style.transform = 'translateX(0)'; document.getElementById('sidenav').style.transform = 'translateX(-100%)'; title.style.left = 'calc(3vh + 50px)' - }else{ + } + else { hamburger.classList.add("active"); hamburger.style.transform = 'translateX(21vw)'; document.getElementById('sidenav').style.transform = 'translateX(0)'; @@ -342,10 +350,13 @@ let timerCont = document.getElementById('timer'); // clearInterval(timerInterval); // } +// Seconds = s +// Minutes = m +// Run time function let s = 0, m = 0; +let timerId; function increaseTime() { - - setInterval(function() { + timerId = setInterval(function() { if (s > 59){ s -= 60; m += 1; @@ -370,8 +381,15 @@ function increaseTime() { s++; }, 1000) +} - +// Pause time function +function pauseTime() { + clearInterval(timerId); } -increaseTime() \ No newline at end of file +window.onload = () => { + // startClock(); + console.log("OO") + increaseTime() +} \ No newline at end of file From a95897a1017c497639a72caff449269d4afaad59 Mon Sep 17 00:00:00 2001 From: Aarjav Jain Date: Tue, 31 Dec 2019 19:57:49 +0530 Subject: [PATCH 04/36] Leaderboard Backend --- blind_coding/main_app/urls.py | 15 +++++++-------- blind_coding/main_app/views.py | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/blind_coding/main_app/urls.py b/blind_coding/main_app/urls.py index 6ed3ec0..1fb8612 100644 --- a/blind_coding/main_app/urls.py +++ b/blind_coding/main_app/urls.py @@ -2,15 +2,14 @@ from django.urls import path,include,re_path from . import views - app_name='quiz' urlpatterns=[ - path('main/',views.default), - path('',views.index), - path('login/',views.login), - path('logout/',views.l_out), - path('question/',views.question, name='question'), - path('main/runCode/',views.runCode, name='runCode') - + path('main/', views.default, name='main'), + path('', views.index, name='index'), + path('login/', views.login, name='login'), + path('logout/', views.l_out, name='logout'), + path('question/', views.question, name='question'), + path('main/runCode/', views.runCode, name='runCode'), + path('leaderboard/', views.leaderboard, name='leaderboard') ] diff --git a/blind_coding/main_app/views.py b/blind_coding/main_app/views.py index 1f0e3d3..dca027f 100644 --- a/blind_coding/main_app/views.py +++ b/blind_coding/main_app/views.py @@ -91,4 +91,20 @@ def runCode(request): def l_out(request): logout(request) - return render(request,'index.html') \ No newline at end of file + return render(request,'index.html') + +def leaderboard(request): + leaderboard = Userdata.objects.order_by('-score') + print(leaderboard) + username = [] + score = [] + for i in range(10): + try: + username.append(leaderboard[i].name) + score.append(leaderboard[i].score) + except: + pass + + resp = {'username': username, 'score': score} + + return HttpResponse(json.dumps(resp), content_type='application/json') From 37619060abfaa051ec4fa30084126a92d6e065d4 Mon Sep 17 00:00:00 2001 From: Nikhil-Vats Date: Wed, 1 Jan 2020 16:01:40 +0530 Subject: [PATCH 05/36] Fixed leaderboard code --- blind_coding/main_app/templates/loggedIn.html | 45 ++++++++++--------- blind_coding/static/js/app.js | 1 + blind_coding/static/js/script.js | 25 +++++++++++ 3 files changed, 51 insertions(+), 20 deletions(-) diff --git a/blind_coding/main_app/templates/loggedIn.html b/blind_coding/main_app/templates/loggedIn.html index ef6d19b..34eaf9e 100644 --- a/blind_coding/main_app/templates/loggedIn.html +++ b/blind_coding/main_app/templates/loggedIn.html @@ -122,29 +122,34 @@
Question 1
insert_chart
- - - - - - - - - - - - - - - - +
RankNamePoints
1DM50
2BK10
+ + + + + + + + + + + + + +
RankNamePoints
Loading...
- +

© Coding Club ,2019

+ + + diff --git a/blind_coding/static/js/app.js b/blind_coding/static/js/app.js index 85c3351..2a360cb 100644 --- a/blind_coding/static/js/app.js +++ b/blind_coding/static/js/app.js @@ -37,6 +37,7 @@ inp.addEventListener('select', function() { if (i === 0) { $('.li').html('cancel'); i = 1 + getLeaderboard(); // insert_chart } else { diff --git a/blind_coding/static/js/script.js b/blind_coding/static/js/script.js index e69de29..df6feca 100644 --- a/blind_coding/static/js/script.js +++ b/blind_coding/static/js/script.js @@ -0,0 +1,25 @@ +function getLeaderboard() { + $.ajax({ + url : "http://127.0.0.1:8000/leaderboard/", + type : "GET", + beforeSend : function() { + document.getElementById('leaderboard-loader').style.display = 'block'; + }, + success : function(jsondata) { + var objRecieved = jQuery.parseJSON(JSON.stringify(jsondata)); + let template = document.getElementById("leaderboard-row"); + document.getElementById('leaderboard-loader').style.display = 'none'; + for (var i = 0; i < objRecieved.username.length; ++i) { + let clone = template.content.cloneNode(true); + document.getElementById('leaderboard-body').appendChild(clone); + document.getElementsByClassName('rank')[i+2].innerHTML = i+1; //Get Array of Username's here + document.getElementsByClassName('name')[i+2].innerHTML = objRecieved.username[i]; //Get Array of Username's here + document.getElementsByClassName('score')[i+2].innerHTML = objRecieved.score[i]; //Get Array of Score's here + } + // document.getElementById('position').innerHTML = objRecieved.rank; + }, + error : function() { + console.log("Error"); + } + }) +} \ No newline at end of file From 4519246bccc549f7dd6f2fa78120e78461d58436 Mon Sep 17 00:00:00 2001 From: Nikhil-Vats Date: Wed, 1 Jan 2020 16:24:25 +0530 Subject: [PATCH 06/36] Added gitignore --- .gitignore | 129 ++++++++++++++++++ .../__pycache__/__init__.cpython-34.pyc | Bin 155 -> 0 bytes .../__pycache__/__init__.cpython-36.pyc | Bin 156 -> 0 bytes .../__pycache__/settings.cpython-34.pyc | Bin 3014 -> 0 bytes .../__pycache__/settings.cpython-36.pyc | Bin 2836 -> 0 bytes .../__pycache__/urls.cpython-34.pyc | Bin 1299 -> 0 bytes .../__pycache__/urls.cpython-36.pyc | Bin 1246 -> 0 bytes .../__pycache__/wsgi.cpython-34.pyc | Bin 586 -> 0 bytes .../__pycache__/wsgi.cpython-36.pyc | Bin 569 -> 0 bytes blind_coding/db.sqlite3 | Bin 86016 -> 0 bytes .../__pycache__/__init__.cpython-34.pyc | Bin 151 -> 0 bytes .../__pycache__/__init__.cpython-36.pyc | Bin 152 -> 0 bytes .../main_app/__pycache__/admin.cpython-34.pyc | Bin 372 -> 0 bytes .../main_app/__pycache__/admin.cpython-36.pyc | Bin 351 -> 0 bytes .../main_app/__pycache__/apps.cpython-34.pyc | Bin 542 -> 0 bytes .../__pycache__/models.cpython-34.pyc | Bin 1513 -> 0 bytes .../__pycache__/models.cpython-36.pyc | Bin 1393 -> 0 bytes .../__pycache__/signals.cpython-34.pyc | Bin 697 -> 0 bytes .../main_app/__pycache__/urls.cpython-34.pyc | Bin 595 -> 0 bytes .../main_app/__pycache__/urls.cpython-36.pyc | Bin 544 -> 0 bytes .../main_app/__pycache__/views.cpython-34.pyc | Bin 3094 -> 0 bytes .../main_app/__pycache__/views.cpython-36.pyc | Bin 2832 -> 0 bytes 22 files changed, 129 insertions(+) create mode 100644 .gitignore delete mode 100644 blind_coding/blind_coding/__pycache__/__init__.cpython-34.pyc delete mode 100644 blind_coding/blind_coding/__pycache__/__init__.cpython-36.pyc delete mode 100644 blind_coding/blind_coding/__pycache__/settings.cpython-34.pyc delete mode 100644 blind_coding/blind_coding/__pycache__/settings.cpython-36.pyc delete mode 100644 blind_coding/blind_coding/__pycache__/urls.cpython-34.pyc delete mode 100644 blind_coding/blind_coding/__pycache__/urls.cpython-36.pyc delete mode 100644 blind_coding/blind_coding/__pycache__/wsgi.cpython-34.pyc delete mode 100644 blind_coding/blind_coding/__pycache__/wsgi.cpython-36.pyc delete mode 100644 blind_coding/db.sqlite3 delete mode 100644 blind_coding/main_app/__pycache__/__init__.cpython-34.pyc delete mode 100644 blind_coding/main_app/__pycache__/__init__.cpython-36.pyc delete mode 100644 blind_coding/main_app/__pycache__/admin.cpython-34.pyc delete mode 100644 blind_coding/main_app/__pycache__/admin.cpython-36.pyc delete mode 100644 blind_coding/main_app/__pycache__/apps.cpython-34.pyc delete mode 100644 blind_coding/main_app/__pycache__/models.cpython-34.pyc delete mode 100644 blind_coding/main_app/__pycache__/models.cpython-36.pyc delete mode 100644 blind_coding/main_app/__pycache__/signals.cpython-34.pyc delete mode 100644 blind_coding/main_app/__pycache__/urls.cpython-34.pyc delete mode 100644 blind_coding/main_app/__pycache__/urls.cpython-36.pyc delete mode 100644 blind_coding/main_app/__pycache__/views.cpython-34.pyc delete mode 100644 blind_coding/main_app/__pycache__/views.cpython-36.pyc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5117cdd --- /dev/null +++ b/.gitignore @@ -0,0 +1,129 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +blind_coding/db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ diff --git a/blind_coding/blind_coding/__pycache__/__init__.cpython-34.pyc b/blind_coding/blind_coding/__pycache__/__init__.cpython-34.pyc deleted file mode 100644 index 2f2529516378551c065893637bc8cc50e4d92ef3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 155 zcmaFI!^ diff --git a/blind_coding/blind_coding/__pycache__/__init__.cpython-36.pyc b/blind_coding/blind_coding/__pycache__/__init__.cpython-36.pyc deleted file mode 100644 index 320943ea33ec92d7653071a67707b49c4fe7f6e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 156 zcmXr!<>kuM&=ek&P@K*9*(m#2P4er~FMN@iJQ zVqS4ZslH2Uadt_5fxc5tW?qVOeoAIux_%Of9iNPa6Ca2KczG$ M)edAuF%UBV0Lhmpp8x;= diff --git a/blind_coding/blind_coding/__pycache__/settings.cpython-34.pyc b/blind_coding/blind_coding/__pycache__/settings.cpython-34.pyc deleted file mode 100644 index 2314f7198eb2ba0e6b898c090ad796487fb05b4f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3014 zcmb7GTXWM!6h6L0PE5ijK)F*>Ziy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9dr)8L+?)Kp7#ZCg@R`Q diff --git a/blind_coding/blind_coding/__pycache__/urls.cpython-36.pyc b/blind_coding/blind_coding/__pycache__/urls.cpython-36.pyc deleted file mode 100644 index 3b494354c5bf0fac0034c0a43ed7a3454e4060b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1246 zcma)5%Wl&^6tx}aQ737kAay&t)KalUSyYMuQTh;-fJ$xIcu{xinIsOL8Ea--Xtv$L zhww|@vf>w5ac7c1Ktige8698U$GPXueb(;>c@$jk`Hu75S@~LkU%^pd;37`q5SMs` z%e=&M4Q><-<|jUDCQa5#TGr+lZPrOT7B`DE79@e|P@lA@H|3;RLoMeM;Sla`zJv6pGu#w)m6ZUcCInH&FbCPC)67XyO_VQ^4jrJh_vV`L@k|5yk;q0$hEtWZljZy=Xte@`~XKf)?C zNw&j(7@hE}sO%ImxAjbG84Po&&xsWV0TmdJ@uk}#8ZD$8&gGhqBQk<7NiKYMtSI+p zdtHce3<54I4UEC&9fV=<19rg)-MWbh%X!$SeWQ5YmNcD%MHslWl!j-N0qQ8KHM~+a zYuT{4c4mEsb8dw-lxM*u&N5MPt>Re^7X_~L#1;+Rqz~_{VwCGt3ZdVJn{_))!Iq}U z`l4-6OUwLP!df_WcSQ@?0E>jxc4QN-Wb04B$mWmcET!4@-;qXq*)|qm<(k&M;aCUf z7yB0{2PsUa?k@1z>FGt?U3r7`+PkB}lYQ$H%%So5=Ez5egt>km#pW%>B)_@ETurL@ zkgAWcHt}n-(g${<5PBed zP##RkpdEnnp$K3SfQKF|wqUUhVhhAJ-23DT;GXI_P0_g5xqAq|j0Z!O89kFZo0*DT zE2%}A86kDf%E~M-b5R%$9m8*>v1pl_BimGQrTDc%#x3KlFycnxD}_r`Y{@IR4ryMX zVACltOC>Yzq|wtU_4`Ovg{hE9O{~Q_z>KEm(z2OU_>x(~aPC}bkK$OE%tm6tb#DG? z%1jZXj^9MDVKlf%$ETN< z!_i=zo?rB@KA+wlv_}wGbdE-0d)>O5rlccHYv0&uKiGi7qze8S2450bW;|1S+|RIcis Ux0~6&+o8s`fsViH@A)tMzg~~FumAu6 diff --git a/blind_coding/blind_coding/__pycache__/wsgi.cpython-36.pyc b/blind_coding/blind_coding/__pycache__/wsgi.cpython-36.pyc deleted file mode 100644 index 7a4707c158724113a200741a8d5421e8e2b507c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 569 zcmY*W%Z}496m^`=v@#500j#~P1Tl{tLWoC8RRoWObt7soe>-431Yd;y=q zFIntZ@e8bQS|J5XzV`L?J?HrN+1VM>8T;}*A>$qkKJdP5eciq6UK^!g|JJfBQ?fp(=!zQTrI8f{fxpwhPFb%Pry ze8$++bNE)H1IPUu__0eGBQFhb>A2(-s;z-X26kZhPB!{bva$ljmrGgKMivwD*;wK&7O!gUU?J> zYJ>XiuM{XCC4@;p#<;qFmQR>VhSEp|gATj+z`=>~0Ju~ETFZjBGOI0o E3)w-m#{d8T diff --git a/blind_coding/db.sqlite3 b/blind_coding/db.sqlite3 deleted file mode 100644 index 6bf83be7d32f9a637170a3d98bad73110976664e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86016 zcmeHw32+-(c32;vKuRJt9EpR`NF22&X(S9qun#oQphhzT@dPD+;w2KC9m5TvNi^6v zhz59IGV6s#GmfiV<+8I*?3CAuy=yy3*{*S7Z_1mEoptQ;+PmJkd~JNK?TNik`PkIj z$*$vdj`x3e1C4_eM?0scF{97!|KEH6{rAs)|NZ|K=WnTHg;_6@a&nmw2p2(;#PbY8 z5M37uf>?ro*6%a$;IdxeFKK(;=MiZ5&c5D7e~manzm8yH^f&0gqW_$JgZ@MMtMq@R zf0Of+NHn|lp$tYE~PSZ=?cfP z-Z~znHn`sx#3)neWbbY2h-Y}1jN@|ZTN*U)gsyB=lzd8Qd8M1m*OGVzv3V6Ry|p;$ z_Kc2_cV)Zma_UA&E~|ySZc45ZK{e5}s;QBVD(Ov24densgHCYsA3+eQLNNU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dbldN3Y z^D?rIJm{6c8=eks8-3++d2bK>TTdH5nBsN#RVw9jGMg>HCV0BylI3JFnL+@HlD>Q1 z1%42hJp+UAKY9A}`=pZXwP*RUH0n<+zwwdp*O4V$35FR3qz7^}rBSX^UdSvIwp9Ra-{c~+@k&Xtlh!i+&bKy=j!dqWrMdO3H8nLq z8m|8$w&(C@czi|`O6j#*(~Fy#Vk|JeF{#d|YIZ5Udn+(G>-W!(<_e?5Orc!xWs4h# zNBn&bT+UefBWAWxMhV!RYoaX~C20ld$Cz&=kKWhioT}~BVG)6sU-8jqmAo1>tE7|L zS)1TdmEa4hVP*x_RP_`IInic=$dPqO2y#;3*deNGtCCjn*6Sd=a2wriy1>lN zEisFc*z`_$i?!VI=}+)?#)NA&0Jb6?xD;EAg^x~t zV|NGE3}QvvV9V0hR%mSnY~!Y*yU~?9+FBMoVN|C!V_9Sehb;LPGSLZ02Mfh$H4gu2 zV8J)Z#veip#9QNV3Fpe4YKouAuVLH0+2jhhqpotHtrQ=stnwV#|HU$E{GAlo`t97B zh;X;2cGP9z4#*1Ot#QfeT`@8fE3WaPwl;nPYy@v)QhPTx<<&JYz9LrTndQpr_-uN0 VakgRqXVe_%4|t#G2cIh9{|8R9rw#xB diff --git a/blind_coding/main_app/__pycache__/__init__.cpython-34.pyc b/blind_coding/main_app/__pycache__/__init__.cpython-34.pyc deleted file mode 100644 index c7f38f34125a1846056d40f2fcd79ece30c8e423..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 151 zcmaFI!^kuM&=ek&P@K*9*(m#cn8er~FMN@iJQ zVqS4ZslH2Uadt_5fxc5tW?qVOeoAIux_%Of9iI&0>VS^#;E&QI>9B>;<#Rn+*>ZFl0i78JZL53TACA18(Aa|i||2O6Umbo zj&{FF*=1Gg94yrkT77E$^*sW z71JCvgBK17W_*~2op0=ikh%S{ritrno@X=4Y?gKE0xd$4#b|bj4pGQNxzBAd4ZVq>=8z@B&2(h*tdfNdJ?C3p%#Du? zA7Hw;{f^_4^u}sq(<{7anOCq!ARML}_2h=+wN))k+26CkJ6x8wFG$I+2|ORmql mtj$b9?he$Qtg<>HS%!qPm7RG~Xb9qh)79l8dZ||QkpBU4FL=cO diff --git a/blind_coding/main_app/__pycache__/models.cpython-34.pyc b/blind_coding/main_app/__pycache__/models.cpython-34.pyc deleted file mode 100644 index 0a1b3c5f885e7e98567366e97ec4bd110f7c9736..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1513 zcmZ{k&2G~`5P)axBzBynO^bv|#S7#TL3=|8wM~COh)Spe2`kdd&2Ce-{z-QoXb~sM zYw!S^cnzLmuUzP*;>?K|J4sDb?CfM_c6MiW_gh~#Ti*Kbul;uwfS*u$(1s0c`Yj59 zKL!y%%)n>B$hIJ|AhyA`f$a$!L0DfZ-KNakHiEl*K2UenD6AeOZ8zW_Rm)DNuLVS{pZ1GbkX0I`ZP;N{jDfWL@yO#GVC9c z&Ig4N2Vuf7v|ns~cXVMK&M_J1O{$1W1NN~!U2S*Lx!+kdF6UGO=f>k4$B!e@o1CAG zgQ)0HG~Rf-sgmI^c_}ZHO%A8GdC=S3-cb#*>b>JY?S?WErb5F^^F@-$p`7@tdVs_I zMv&+aQtgHBW#TuoFqS(}Fw#;e+O>T7C9z1p3JM}e(^8sjg)QTY(#m`82J9L`=K({y zkR`&Vn&W}M3JrYEcT0!C4XGyB=qh>0ZJkNYD!{P^lmPzWn zI*3P+3=_XzXz6$oz$xN!5uEF5C4Jprph=1tuG6SwuidiO$^Jidt5_J(r>WLvjvPT( zz()Y$YblD_?>MF|PJ(2ZcEw?FRaPhVAWbqA9(IFqcHAxQW^r|@ujnh81DsD%+FJSo XC`xVIr^R)AMqd|AC)s9g`+@fttt>+{ diff --git a/blind_coding/main_app/__pycache__/models.cpython-36.pyc b/blind_coding/main_app/__pycache__/models.cpython-36.pyc deleted file mode 100644 index 4b4091c8545faaf00b6f230ffdbebb560f798928..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1393 zcmZ{k&2G~`5XX0ICw82Vejp)K@dCLd&|VRuq#r_vN~i(}A6U7WZQ|4)>8@Q`#I3#d z4R`@gyavy(S1$AwI5A@oZGIhS_Oz(@m{7-=pdO>hrc-@CzGSf86_l7WmhD(8ci zYE0qfxIOYCMkEV3u)vb`%#jVWP2ks7;G*)t0{fZ=Ez~|Z&_LZT<9HZ&nANGRbfE?Q z6$^UM#zs2EqjMq5L+qiIr2^ZLxx4{96C-{So{LzflYFXp6>>oyhee#<_~-|XXEgej za?w*Bnla_kpnnVJ2&e9#$=NqH<1_1$ZyQ_Z%D4q~AR;gxi8M?kU5A$O@eihY zSoe1{oMwp}LUeW!rg~Zoccebav-$9K9HlVIAWA30Bhq4AIY}6$BAm~M)%_0U7seF= zPZNSV(bN~?Ussn8KUgdt^jC~01T`Uq@rA(pA|~At;hV2Q4IV4SeLGZM^q|)OnPp3(`uOqF+A= z#1b#V>YPP?@XjBGjmWHETcTzuiWzHuf_rsQ-oI12?58+y$yhdXN5;BZqr!DEkH`=N z>Is^_K20-J^8e4v1~x|EXzJA~X(3*an7f~)DC?l_nikB$bdn9=sG@vh;g7R4SJBZR rEb{4~daWwz8}H~FR#0JI diff --git a/blind_coding/main_app/__pycache__/signals.cpython-34.pyc b/blind_coding/main_app/__pycache__/signals.cpython-34.pyc deleted file mode 100644 index 26720e7103014a3dc396f9ade24f86d568e0a431..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 697 zcmY*WO^ekq6g}zpdpI~a3gSZ7-8^tBBH~jJgxQR4O5u?AhzUm!G5Q2UiXsJ*F=PmlKr-wZ6DdT7Z=f1Q2C=|JzPzPA$eD{i z8L8>Jm_}nahF?npnU=L|ucf{vot~9>mf)7V#7HHiu0y|{Mof`Xe4sENDeVI2=diPd z9rMB|cT|v~2z!KIBkUq{0o7pYnWuIkI`Y6gbr1F*gUny#@wrR4Bw^DE7b!kS7n^$2 zQqTHgols+!dB(gLc^@tvt4`L|xUi8nkF}TSvQ`<(RZYvamfT9=lB+LVH>Q~Pdy_w) z9}xG?di|pG#!dO2Pt#5LR+=k2PUV}vRboAgRyAei>rH(C18>!asHJHe#e1`wZrs_S z&1RNA>G5;hORvN%DIrMMQ+5(OV)`MW^L*i+h>ojfT-Bqpx~*1xYcE&BC}eMRK%C<7 zkszw$^y=76`#W*>|1Gy>;nvBvZqbE2G F{sN5+t+fCE diff --git a/blind_coding/main_app/__pycache__/urls.cpython-34.pyc b/blind_coding/main_app/__pycache__/urls.cpython-34.pyc deleted file mode 100644 index 45c79e910fe5a9ba70cf6402b195b5f7ff7535c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 595 zcmYjO%TC-d6uq82oS85Wf!Of_vtjmCRiRR$uGmy;qDWB~o55f^!A{zeE#JWhbj#;> zSFvKl2e9JW!$`!*@jd5W--q+MH=X=Hdn`2pc!p2U1nm?2>=OdRmw*IN1PTJg^AX4q zs0fM(R18H7DuE(FUj!@$nS!EFP~<3Qz)?+sQ@9z!!zfT1=wwGR2EF-?jsxA>(Mh0F zU^y@^5}$Ay#90t$UfiTm%z@3}*K+ZKeZ!Ktq-IL!W#rATf1zU#T|M1$T~*NVGrCk)eY$n^TOVSI%J zw$}M_;b!cn)|=*d-RRDUOEbcnF8>gFBdv*0F|milL*{`ZxU6p5DpaD3U)8+D-gZq}ewUaK vn-+RgUV6J)Z;2nM!qC#Uc--E*?5k>6FZnlrX?7oBL5|2GN~1a1u0!$;M_-tB diff --git a/blind_coding/main_app/__pycache__/urls.cpython-36.pyc b/blind_coding/main_app/__pycache__/urls.cpython-36.pyc deleted file mode 100644 index 303fe7ba3cbd4937b145771c044b24fc98975e2b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 544 zcmYk2J967F5QYJP5GYcVJxMO1MkvyHJbAcI;|@hQw17x(@Ss7$i8=04=ODQfT35b; zD=(;ICgkwvw+k%xU%YRcO7E(#4kPr0{(CCm5AY3-AQDMzki`Py%nP%yL=anu!csvY zM`U4^mI($-MX88fDt5d2wE$v3)l4N&J<|$kJyQkL$Xc#{6WH58w2_+}9hTxuo?WBu z`7<~`TbyVot#(_IioP3e-JgOyQ40om_PFaGQh8y$ Xj7DANdmG+>tnoX%CIzYR>D}O0TO^h* diff --git a/blind_coding/main_app/__pycache__/views.cpython-34.pyc b/blind_coding/main_app/__pycache__/views.cpython-34.pyc deleted file mode 100644 index 5ec62d0ca73ce757056b2e96783e58c8d31370bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3094 zcmbVOTW=dh6h5uyfxf z`i0JYO2A*>m;H$*z#}LkiUoOsVv9VB1dm!2mB=emfXAlqi9DNvG6jyo0FbGi%`|hW z6gd=E$g5CXC9g_xjl3H4)hKW&aw)EpSEsl^UZb#5r)Y}eCV9S`@d* zYvbJ%1x;glhGd%pNVMn;#(`&e{0;n{r2x;I5u2l6o`MB~0TwA(GI)Vk_N23Xg2hwE z(vFfzAeF8v8T6Ix<=Z{Mukhi2-mFdhvMDq<(XrXDH>|?iKAMWs{e2m1CEbHOjyghF zkm?9sQS!x5X8Dh#${2ZjZ}aZXx0zJg&O?7NINW(4v*&p_*ts9|lVCFq`pN#z9^>6! z(TV+jvJ26jmwovv>kbZeC6LejVU)AJjLncx6}11sTNei8>x-@`8#;`WMdP5W%SNyY zII+Zdvb>URJj&AKvCIZ(l1V-HFwX~*-sABu>c;ue6W&T}c9l0F@N-{Rzv2DqrwMk; z!7ir59HBLNuI6kr|Etq*Nh%G%*Thn zOBZQm79db8(o$_;uU5D)RMA_pcEN%FMTJXE+kCt$=Pb_xpW3RSb872XbgIOC!gCI*lsS zCmL1h7&283`3+2FR0e`LkOKsHpbAjMpek+TjfugU@p6i7hE4O@#cSk^df{22+NEXV z=d@W_i{;SA^Q6<*J}M9MXCHpzIS8QbVXR9pl2lhsG=VMXZl_)?^W(wOO}zFThFgg? zLy`P?nCr?AB-`x=UX8(%UaF+F4*H$8wnOk%m!s4VGHvgr!J&2niI9`JJW%~4S50iU zuB3Y*5<#X*`!d&dE??)`%|X|mpGo$HZAP+xY8B*FoFBB!7Iiseo2t$uDcyurLOfkzX)Ok?!Q1#JvM4KcJ~mV$&RKo|&7 z7F-rWc7I+X_4DKfc#8KM$>##}yUcB{w?ZJPaT#cO>^)$sfQSY5!H`qr?THo)Arfay zT!HU3vcp-*=Zx!9#>J1V-C3SD_VKwz>JMHH3K%>Us9j_4SbdGc`C^p|XPuF2Oq-R7 zV|TJG%cyy*?I)wHZKfFqP~Bz-W^oYEx5WD?5~N7DaXNVeg)v;_0XPA%-FZq}E|Ozs z&So-#ChXt>PVI_e#tQc_5f6&zBubA~50Lw_yK8Iypx+IHGz}uz?WOUWd@Xy!T&}4( za7=NQ)nZ)>7r~LE+^H)(;vjGah}g1JDpjh%qD%aup7&$l8@abGNRuv~+b(NcU zxZ#jj97t*vO%dq39O<{u;XCK>I^PvcLP8Q5q*<=6@kIL>s-|voo+zg8W@&V;f9D_l zb?%$Aq26cfw^&IDNl4cV|G(;ZJ}mG;w4M1cC6ZW*{p0XeH_&wICbf7~_T&MV z))H!$SAv7==eS1OjMPoYdnT6}L8q|eReRWAuFSd=!Pdn*gS*Ty!4*ZWV{&#M4d)ui zS{65uZ5me7o3h6RZ+zi8e}%EsG=#@ju1o7|Iobuob|97U4S?W?dW8SZqHYDDpX{gI>>yP+ zn3@?q=Dwglg^0OZDZcjT`dE~yuDCcWCR~x;oftb4WyLX?;xRjx?xiRv{k^U~%nu4j zneyJXOI~-m1}Q&JRi;|3nlB=X?*t}go82;gpF0|JNanIu-GC3nNPfoqm@%&xM5Ban Vxh1ZO1sp}gYN5AcH|83hzX7?xoGJhS diff --git a/blind_coding/main_app/__pycache__/views.cpython-36.pyc b/blind_coding/main_app/__pycache__/views.cpython-36.pyc deleted file mode 100644 index 22d1c8144b515da7a7b8e9a077d537328280f760..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2832 zcmb7GOK&8%5hnZ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U)B*vlgJhZu+zEG{D?6B>=ZZl*s>t`xmfKGOOKn4L^Kf}> z$#RP`!0S(tYN(bn*jJyRpHB2h&avQ6W%iTdPKmNHvvoMdj7p vo93X5-?yS-;$t2?!7+ST74p|~gbhJ@!~+|j8}mKH0kN@SjCP!0FPQ!Z=o^}x From c76fa08b39e05f444155187f8010dfe6ab387a03 Mon Sep 17 00:00:00 2001 From: Harpinder Date: Fri, 3 Jan 2020 14:51:46 +0530 Subject: [PATCH 07/36] Added details of extra features to be implemented --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fd7e2d7..bd66bd0 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,12 @@ ## Bugs to be fixed/ Features to be added - [X] Timer is not working properly, fix it -- [ ] When user gets a question correct, automatically redirect to next question -- [ ] Add a live leaderboard +- [X] When user gets a question correct, automatically redirect to next question +- [X] Add a live leaderboard - [ ] Change frontend - [ ] Add details in about section - [ ] Cursor does not goes up in the editor, fix it - [ ] Do Backend stuff - do not put keys as it is within the files - [ ] Add feature to show code for sometime, say 5-10 seconds once per question +- [ ] Disable run button for the time compiler runs the code and returns the result to prevent multiple compiler runs +- [ ] Limit number of runs per question per user From dcb136ead25badc5ef9a0a0e284cbec83bfae251 Mon Sep 17 00:00:00 2001 From: Himanshu Pandey <42613146+coderjedi@users.noreply.github.com> Date: Fri, 3 Jan 2020 23:20:58 +0530 Subject: [PATCH 08/36] Updated models for score logic --- blind_coding/main_app/models.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/blind_coding/main_app/models.py b/blind_coding/main_app/models.py index f58d542..ca64704 100644 --- a/blind_coding/main_app/models.py +++ b/blind_coding/main_app/models.py @@ -8,13 +8,15 @@ class Userdata(models.Model): score = models.IntegerField(default = 0) answerGiven = models.CharField(max_length = 10, default="00000") timeElapsed = models.IntegerField(default = 0) - + def __str__(self): return str(self.user_id.username) class Question(models.Model): qno=models.IntegerField(default=0) + weight = models.IntegerField() text = models.CharField(max_length=45000) + time_penalty = models.ManyToManyField(Userdata, through="Time_Penalty",blank=True,null=True) testcaseno=models.IntegerField(default=0) samplein = models.CharField(max_length=45000,default='') sampleout = models.CharField(max_length=45000,default='') @@ -27,3 +29,15 @@ class Question(models.Model): def __str__(self): return str(self.pk) + +class Time_Penalty(models.Model): + player = models.ForeignKey(Userdata, on_delete=models.CASCADE) + question = models.ForeignKey(Question, on_delete=models.CASCADE,related_name='questions') + time_penalty = models.IntegerField(default=0) + no_wa = models.IntegerField(default=0) + + class Meta: + unique_together = ("player", "question") + + def __str__(self): + return "{} : {}".format(self.player.name, self.question.qno) From 7c622ec22bca6b1c89a93cff5aa226630d52b13d Mon Sep 17 00:00:00 2001 From: Himanshu Pandey <42613146+coderjedi@users.noreply.github.com> Date: Fri, 3 Jan 2020 23:22:40 +0530 Subject: [PATCH 09/36] Updated views --- blind_coding/main_app/views.py | 86 ++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 41 deletions(-) diff --git a/blind_coding/main_app/views.py b/blind_coding/main_app/views.py index ad11283..d74dfa0 100644 --- a/blind_coding/main_app/views.py +++ b/blind_coding/main_app/views.py @@ -12,7 +12,7 @@ def index(request): # pass from django.shortcuts import render from django.http import JsonResponse,HttpResponseRedirect,HttpResponse -from .models import Userdata,Question +from .models import Userdata,Question,Time_Penalty from django.contrib.auth import logout import json @@ -47,49 +47,53 @@ def question(request): print('hi') print(res['userScore']) return HttpResponse(json.dumps(res)) - + def runCode(request): - postData = json.loads( request.body.decode('utf-8') ) - url = 'https://api.jdoodle.com/execute/' - print(postData) - que = Question.objects.get(qno=postData['qNo']) - postData['stdin'] = '3'+'\n'+que.test_case1+'\n'+que.test_case2+'\n'+que.test_case3 - response = requests.post(url,json=postData) - resp = response.json() + postData = json.loads( request.body.decode('utf-8') ) + url = 'https://api.jdoodle.com/execute/' + print(postData) + que = Question.objects.get(qno=postData['qNo']) + postData['stdin'] = '3'+'\n'+que.test_case1+'\n'+que.test_case2+'\n'+que.test_case3 + response = requests.post(url,json=postData) + resp = response.json() # resp = json.loads(resp) - print('qNo',postData['qNo']) - print('jdoodle response json object: ',resp) - print('jdoodle output response: ',resp['output']) - res = {} + print('qNo',postData['qNo']) + print('jdoodle response json object: ',resp) + print('jdoodle output response: ',resp['output']) + res = {} #Get current user - currUser = Userdata.objects.get(user_id = request.user) - - if resp['output'].find('error') != -1: - res['output'] = resp['output'] - else: - quesNo = postData['qNo'] - quesData = Question.objects.get(qno= quesNo) - answer = quesData.test_case1_sol+'\n'+quesData.test_case2_sol+'\n'+quesData.test_case3_sol+'\n' - print(answer) - currUser.timeElapsed += int(postData['timeElapsed']) - if answer == resp['output']: - print('hurray') - res['output'] = 'Correct Answer' - print(currUser.answerGiven) - lst = list(currUser.answerGiven) - print(lst) - if(lst[quesNo] == '0'): # if the question is being answered first time - print('Updating score for question no', ) - lst[quesNo] = '1' - currUser.answerGiven="".join(lst) - currUser.score+=10 - currUser.save() - else: - res['output'] = 'Wrong answer..' - - currUser.save() - res['score'] = currUser.score - return HttpResponse(json.dumps(res)) + currUser = Userdata.objects.get(user_id = request.user) + if resp['output'].find('error') != -1: + res['output'] = resp['output'] + else: + quesNo = postData['qNo'] + quesData = Question.objects.get(qno= quesNo) + answer = quesData.test_case1_sol+'\n'+quesData.test_case2_sol+'\n'+quesData.test_case3_sol+'\n' + print(answer) + currUser.timeElapsed += int(postData['timeElapsed']) + if answer == resp['output']: + print('hurray') + res['output'] = 'Correct Answer' + print(currUser.answerGiven) + lst = list(currUser.answerGiven) + print(lst) + if(lst[quesNo] == '0'): # if the question is being answered first time + print('Updating score for question no', ) + lst[quesNo] = '1' + currUser.answerGiven="".join(lst) + timepenalty=Time_Penalty.objects.get_or_create(player=currUser,question=que) + timepenalty.time_penalty=int(postData['timeElapsed'])+20/100*timepenalty.no_wa*que.weight + currUser.score=que.weight-timepenalty.time_penalty + timepenalty.save() + currUser.save() + else: + timepenalty=Time_Penalty.objects.get_or_create(player=currUser,question=que) + timepenalty.no_wa+=1 + res['output'] = 'Wrong answer..' + timepenalty.save() + currUser.save() + res['score'] = currUser.score + return HttpResponse(json.dumps(res)) def l_out(request): logout(request) From 94270f1800e07812fdb48c44001964b0dd22285c Mon Sep 17 00:00:00 2001 From: HarpinderJotSingh Date: Sat, 4 Jan 2020 00:00:47 +0530 Subject: [PATCH 10/36] Added db.sqlite3 back --- blind_coding/db.sqlite3 | Bin 0 -> 87040 bytes .../main_app/migrations/0001_initial.py | 8 +++- .../main_app/migrations/0002_question_qno.py | 18 -------- .../migrations/0003_auto_20190328_2312.py | 23 ---------- .../migrations/0004_question_testcaseno.py | 18 -------- .../migrations/0005_userdata_score.py | 18 -------- .../0006_question_correctanswered.py | 18 -------- .../migrations/0007_auto_20190329_0445.py | 42 ------------------ .../migrations/0008_auto_20190329_0509.py | 38 ---------------- .../migrations/0009_auto_20190329_0613.py | 18 -------- .../migrations/0010_auto_20190329_0616.py | 18 -------- .../migrations/0011_userdata_timeelapsed.py | 18 -------- .../__pycache__/0001_initial.cpython-34.pyc | Bin 1349 -> 0 bytes .../__pycache__/0001_initial.cpython-36.pyc | Bin 1194 -> 0 bytes .../0002_question_qno.cpython-34.pyc | Bin 631 -> 0 bytes .../0002_question_qno.cpython-36.pyc | Bin 583 -> 0 bytes .../0003_auto_20190328_2312.cpython-34.pyc | Bin 719 -> 0 bytes .../0004_question_testcaseno.cpython-34.pyc | Bin 667 -> 0 bytes .../0005_userdata_score.cpython-34.pyc | Bin 638 -> 0 bytes ...06_question_correctanswered.cpython-34.pyc | Bin 669 -> 0 bytes .../0007_auto_20190329_0445.cpython-34.pyc | Bin 985 -> 0 bytes .../0008_auto_20190329_0509.cpython-34.pyc | Bin 922 -> 0 bytes .../0009_auto_20190329_0613.cpython-34.pyc | Bin 666 -> 0 bytes .../0010_auto_20190329_0616.cpython-34.pyc | Bin 621 -> 0 bytes .../0011_userdata_timeelapsed.cpython-34.pyc | Bin 649 -> 0 bytes .../__pycache__/__init__.cpython-34.pyc | Bin 162 -> 0 bytes .../__pycache__/__init__.cpython-36.pyc | Bin 163 -> 0 bytes 27 files changed, 7 insertions(+), 230 deletions(-) create mode 100644 blind_coding/db.sqlite3 delete mode 100644 blind_coding/main_app/migrations/0002_question_qno.py delete mode 100644 blind_coding/main_app/migrations/0003_auto_20190328_2312.py delete mode 100644 blind_coding/main_app/migrations/0004_question_testcaseno.py delete mode 100644 blind_coding/main_app/migrations/0005_userdata_score.py delete mode 100644 blind_coding/main_app/migrations/0006_question_correctanswered.py delete mode 100644 blind_coding/main_app/migrations/0007_auto_20190329_0445.py delete mode 100644 blind_coding/main_app/migrations/0008_auto_20190329_0509.py delete mode 100644 blind_coding/main_app/migrations/0009_auto_20190329_0613.py delete mode 100644 blind_coding/main_app/migrations/0010_auto_20190329_0616.py delete mode 100644 blind_coding/main_app/migrations/0011_userdata_timeelapsed.py delete mode 100644 blind_coding/main_app/migrations/__pycache__/0001_initial.cpython-34.pyc delete mode 100644 blind_coding/main_app/migrations/__pycache__/0001_initial.cpython-36.pyc delete mode 100644 blind_coding/main_app/migrations/__pycache__/0002_question_qno.cpython-34.pyc delete mode 100644 blind_coding/main_app/migrations/__pycache__/0002_question_qno.cpython-36.pyc delete mode 100644 blind_coding/main_app/migrations/__pycache__/0003_auto_20190328_2312.cpython-34.pyc delete mode 100644 blind_coding/main_app/migrations/__pycache__/0004_question_testcaseno.cpython-34.pyc delete mode 100644 blind_coding/main_app/migrations/__pycache__/0005_userdata_score.cpython-34.pyc delete mode 100644 blind_coding/main_app/migrations/__pycache__/0006_question_correctanswered.cpython-34.pyc delete mode 100644 blind_coding/main_app/migrations/__pycache__/0007_auto_20190329_0445.cpython-34.pyc delete mode 100644 blind_coding/main_app/migrations/__pycache__/0008_auto_20190329_0509.cpython-34.pyc delete mode 100644 blind_coding/main_app/migrations/__pycache__/0009_auto_20190329_0613.cpython-34.pyc delete mode 100644 blind_coding/main_app/migrations/__pycache__/0010_auto_20190329_0616.cpython-34.pyc delete mode 100644 blind_coding/main_app/migrations/__pycache__/0011_userdata_timeelapsed.cpython-34.pyc delete mode 100644 blind_coding/main_app/migrations/__pycache__/__init__.cpython-34.pyc delete mode 100644 blind_coding/main_app/migrations/__pycache__/__init__.cpython-36.pyc diff --git a/blind_coding/db.sqlite3 b/blind_coding/db.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..b5ab1008fb941247c606ace48d6c2b657030f830 GIT binary patch literal 87040 zcmeHw32+-(c32;vNJ=6#8i|9^NE)@M(MTMMV4vu2YBaMDPf!9VULwKW3DN)>K;tG3 z9+=E#p_y4HRZh9=*h!qSoy143vR&&W-c&XlJ5HSP?WBChj$7Sy1 zoc>Yz=jkudKTLnl1Ui7&hY;;)%z65~MS*PW8ij1%h6f|f}B>VMv>5>d2KJ6 z(+jC;nrAt6f)yrsh2i8WQJxZbpTJ3qD9;T8p;eoZ;v|Hq9Z84tsl1|a%Do|=^M*}F zw&?6=IU}J}i{(mGOC+Ltxm+wq^LnMCrSwWSQ=Cr{ffgG$4a9;rF@LlS?ZznUc85p( zy%L3T^Swy0vZAQUT@dNWJ)4B&EEg6~u9z|k(Lybk>!!i_RL<|0T{k>#h&Tl=UkLFW&a_5f|lv z7LONeg(}YWXer7*KOl1=PXjV!*F-)fL)piREYAs(6i6O$%wBc~g5T%ocv+HV5(Ip` zQ@{rzLSJTIgkbW_5cRK!Vd_)E)X&rZhTf+iP~S>_3-voxh58=)0`)1Hq!k*?`|i(` zz8bE&6BZe?}A3FH=8C{T}^;^kw=E9XT*>H^G&_hbw^*&*jU_A;#{!!)>wl zxHEL#bNM1!fv$ko?AG7Ymps?6kF-#+9DwrPAPK&y8!n z((v#xaM^QllC-)h?xm1z(m>zfz+C_Ho{QJpQmsCGV%XyyA@Puhg1#Zo$Os;6P{}># zJR?`}TdQ}|!=4c@j>Cfkb=Kp(Jcx%Yd)YJu^*2oY2tofo{hRbp(_f^2fc{o`hu)-L zr7uzckNU6FFF~UFb0zSRl)(964{`ajy~MEl|M?+j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b_nn~v|_&1#!lQe;D_YYXeO&FRI&=IUb0{?DvA&>!&755T92gxCLI|4aP?2;ASt zQUZ7PCt;slBb4bUv~c+zZdd zVFV2up-gaZX+BsFZv=&LLDm=RPtT}QYF>i!2Sw1|o&V@E+_qOKOxd_<*Zh<}S(%KwYHZNwO zl$l5-C~m@U=r literal 0 HcmV?d00001 diff --git a/blind_coding/main_app/migrations/0001_initial.py b/blind_coding/main_app/migrations/0001_initial.py index 2332569..47557c3 100644 --- a/blind_coding/main_app/migrations/0001_initial.py +++ b/blind_coding/main_app/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 2.0.13 on 2019-03-21 14:30 +# Generated by Django 2.2.7 on 2020-01-03 18:07 from django.conf import settings from django.db import migrations, models @@ -20,6 +20,9 @@ class Migration(migrations.Migration): ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('qno', models.IntegerField(default=0)), ('text', models.CharField(max_length=45000)), + ('testcaseno', models.IntegerField(default=0)), + ('samplein', models.CharField(default='', max_length=45000)), + ('sampleout', models.CharField(default='', max_length=45000)), ('test_case1', models.CharField(max_length=1000)), ('test_case2', models.CharField(max_length=1000)), ('test_case3', models.CharField(max_length=1000)), @@ -33,6 +36,9 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100)), + ('score', models.IntegerField(default=0)), + ('answerGiven', models.CharField(default='00000', max_length=10)), + ('timeElapsed', models.IntegerField(default=0)), ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), diff --git a/blind_coding/main_app/migrations/0002_question_qno.py b/blind_coding/main_app/migrations/0002_question_qno.py deleted file mode 100644 index 8e01c0c..0000000 --- a/blind_coding/main_app/migrations/0002_question_qno.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.7 on 2019-02-28 12:32 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('main_app', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='question', - name='qno', - field=models.IntegerField(default=0), - ), - ] diff --git a/blind_coding/main_app/migrations/0003_auto_20190328_2312.py b/blind_coding/main_app/migrations/0003_auto_20190328_2312.py deleted file mode 100644 index 86d9183..0000000 --- a/blind_coding/main_app/migrations/0003_auto_20190328_2312.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 2.0.13 on 2019-03-28 17:42 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('main_app', '0002_question_qno'), - ] - - operations = [ - migrations.AddField( - model_name='question', - name='samplein', - field=models.CharField(default='', max_length=45000), - ), - migrations.AddField( - model_name='question', - name='sampleout', - field=models.CharField(default='', max_length=45000), - ), - ] diff --git a/blind_coding/main_app/migrations/0004_question_testcaseno.py b/blind_coding/main_app/migrations/0004_question_testcaseno.py deleted file mode 100644 index 7139280..0000000 --- a/blind_coding/main_app/migrations/0004_question_testcaseno.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.13 on 2019-03-28 17:47 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('main_app', '0003_auto_20190328_2312'), - ] - - operations = [ - migrations.AddField( - model_name='question', - name='testcaseno', - field=models.IntegerField(default=0), - ), - ] diff --git a/blind_coding/main_app/migrations/0005_userdata_score.py b/blind_coding/main_app/migrations/0005_userdata_score.py deleted file mode 100644 index 35e682f..0000000 --- a/blind_coding/main_app/migrations/0005_userdata_score.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.13 on 2019-03-28 20:52 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('main_app', '0004_question_testcaseno'), - ] - - operations = [ - migrations.AddField( - model_name='userdata', - name='score', - field=models.IntegerField(default=0), - ), - ] diff --git a/blind_coding/main_app/migrations/0006_question_correctanswered.py b/blind_coding/main_app/migrations/0006_question_correctanswered.py deleted file mode 100644 index 14f6228..0000000 --- a/blind_coding/main_app/migrations/0006_question_correctanswered.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.13 on 2019-03-28 23:13 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('main_app', '0005_userdata_score'), - ] - - operations = [ - migrations.AddField( - model_name='question', - name='correctAnswered', - field=models.IntegerField(default=0), - ), - ] diff --git a/blind_coding/main_app/migrations/0007_auto_20190329_0445.py b/blind_coding/main_app/migrations/0007_auto_20190329_0445.py deleted file mode 100644 index 9ede53a..0000000 --- a/blind_coding/main_app/migrations/0007_auto_20190329_0445.py +++ /dev/null @@ -1,42 +0,0 @@ -# Generated by Django 2.0.13 on 2019-03-28 23:15 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('main_app', '0006_question_correctanswered'), - ] - - operations = [ - migrations.RemoveField( - model_name='question', - name='correctAnswered', - ), - migrations.AddField( - model_name='userdata', - name='correctAnswered0', - field=models.IntegerField(default=0), - ), - migrations.AddField( - model_name='userdata', - name='correctAnswered1', - field=models.IntegerField(default=0), - ), - migrations.AddField( - model_name='userdata', - name='correctAnswered2', - field=models.IntegerField(default=0), - ), - migrations.AddField( - model_name='userdata', - name='correctAnswered3', - field=models.IntegerField(default=0), - ), - migrations.AddField( - model_name='userdata', - name='correctAnswered4', - field=models.IntegerField(default=0), - ), - ] diff --git a/blind_coding/main_app/migrations/0008_auto_20190329_0509.py b/blind_coding/main_app/migrations/0008_auto_20190329_0509.py deleted file mode 100644 index 66741c0..0000000 --- a/blind_coding/main_app/migrations/0008_auto_20190329_0509.py +++ /dev/null @@ -1,38 +0,0 @@ -# Generated by Django 2.0.13 on 2019-03-28 23:39 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('main_app', '0007_auto_20190329_0445'), - ] - - operations = [ - migrations.RemoveField( - model_name='userdata', - name='correctAnswered0', - ), - migrations.RemoveField( - model_name='userdata', - name='correctAnswered1', - ), - migrations.RemoveField( - model_name='userdata', - name='correctAnswered2', - ), - migrations.RemoveField( - model_name='userdata', - name='correctAnswered3', - ), - migrations.RemoveField( - model_name='userdata', - name='correctAnswered4', - ), - migrations.AddField( - model_name='userdata', - name='answer', - field=models.CharField(default='00000', max_length=5), - ), - ] diff --git a/blind_coding/main_app/migrations/0009_auto_20190329_0613.py b/blind_coding/main_app/migrations/0009_auto_20190329_0613.py deleted file mode 100644 index cbca258..0000000 --- a/blind_coding/main_app/migrations/0009_auto_20190329_0613.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.13 on 2019-03-29 00:43 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('main_app', '0008_auto_20190329_0509'), - ] - - operations = [ - migrations.AlterField( - model_name='userdata', - name='answer', - field=models.CharField(default='00000', max_length=10), - ), - ] diff --git a/blind_coding/main_app/migrations/0010_auto_20190329_0616.py b/blind_coding/main_app/migrations/0010_auto_20190329_0616.py deleted file mode 100644 index 4053f76..0000000 --- a/blind_coding/main_app/migrations/0010_auto_20190329_0616.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.13 on 2019-03-29 00:46 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('main_app', '0009_auto_20190329_0613'), - ] - - operations = [ - migrations.RenameField( - model_name='userdata', - old_name='answer', - new_name='answerGiven', - ), - ] diff --git a/blind_coding/main_app/migrations/0011_userdata_timeelapsed.py b/blind_coding/main_app/migrations/0011_userdata_timeelapsed.py deleted file mode 100644 index 19bf0c7..0000000 --- a/blind_coding/main_app/migrations/0011_userdata_timeelapsed.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.13 on 2019-03-29 10:15 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('main_app', '0010_auto_20190329_0616'), - ] - - operations = [ - migrations.AddField( - model_name='userdata', - name='timeElapsed', - field=models.IntegerField(default=0), - ), - ] diff --git a/blind_coding/main_app/migrations/__pycache__/0001_initial.cpython-34.pyc b/blind_coding/main_app/migrations/__pycache__/0001_initial.cpython-34.pyc deleted file mode 100644 index bc2784e5eaf96a17f581230d7752e0abaaca317d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1349 zcmb7E&2G~`5FY>3u@lq(7Rv7h357%H&kZ5elC~52>2WA9UJO)fm#raLEVAp!Ui!0pD1t)(1LaePARqo!h+qZ zb4Hs&)lja)EDPg6R!vpzgh9%)Fo~sdI*GtYzHaHb!81w58V&i`06@@8h)CVk+=vC* z(575Yp38uMKsN_HO_uT&l&}o#3J6E962ymQ7X-zWK~&%r>;nq+L5KMuu7MaQ(9qyS z4iYj6Vrl?R4}miSaCQ_pHwv5|1zsNo-WUM}9%VFj;YE!L|5KwmwBgMG^IJJM4&pZ8 z1hgliO*%|Ldm6-@fwo|h8iA!#2PV{KK-{IC-c#Prpn-eJj(G=_`?iNtcT_nCAx1(f zGZf0_y)0p^6nTb1Rk~@|;c1^8VPAO?(~w8uN8D2WdrX^&M3!%5zSvOKah#}fBxZDCF+*i$$?NK@a#>ECF;!-aj&mNCq*Bh>UK%`V#1^`Z}`?<70g`q diff --git a/blind_coding/main_app/migrations/__pycache__/0001_initial.cpython-36.pyc b/blind_coding/main_app/migrations/__pycache__/0001_initial.cpython-36.pyc deleted file mode 100644 index c86802b191bb5c66361c112e8167e3a0e7b34f49..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1194 zcmZuwy>in)5SC7|Ey<1(zz}{~8dKN_=@^Dda1vl3Fp#8C!OhvbR?g_h=;RR7LYoJn z;x%}N8#)?z1uFJrhu93#+|Ku{R(HGK-fpd|1hNyn{a&%GAJ)R-65ghz9*_YG?AS`| z(6$X`F-x4#N!-vaxf55y>JtlGsC>4dg3hS+$q8%V99r$_FZ$nV+uBoD6f%ueo9Q5t zQ7#IZrAk+m3@}zN2PW>~X%g6`rGAq^E40B18Q7tN?x=!Q+TV`s&?Dvp0|$dq9c+3j z1E`+6Lk2bSHNXS^+$I(fTY)+>O14t6=A5lAv9%?3Wr}&RH zx9#eNm=qZwRTa=2FD+BkIN}=KV||Pep>-d7oyvP0~_dYJfvA zi3{x(cvi@7UrTS0h%+8z8WkrxDCkr^5DGWtPsg$r9QPOSmTq1Ka+Spk{Qf_D%W%2~ zZkbMXC@}`5y<FwL3yw7PSA^pqbT?!Dm$uXgud z=*Hg&iAvXdrNjs3w&rF!w7)~j@0-+h<5^l@g!zp5y%RBq!G4ybjMC@Sjw*~q8fBV6 zUwdUCrj@nc&S7t7cTWe|80SOr#mc*MLTP>@tv9ZbLQgp`CoaWu~XsNpfFxP3iuFY7>ZZ5qo=fYe5 z(e`wGRz+u!rNfzU{@eroQsbF8xBfaivjOj1RGi;4rJ3_Di=3ei@@enktdWmQzf_e> J!(OvJ=MNh@Svddz diff --git a/blind_coding/main_app/migrations/__pycache__/0002_question_qno.cpython-34.pyc b/blind_coding/main_app/migrations/__pycache__/0002_question_qno.cpython-34.pyc deleted file mode 100644 index e7edc1dd662588db0c7266ee99df026117ee726a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 631 zcmY*W!A{&T5S_%?Y!bq)@DI75ZF{S#ib6%<02hRWR*|f*GelkzCmUxEaNT|eKfo{W zDZX;z!Uu3-ob5vEWJWU{`@J{gmvlSXeZ0?m58w&@SpmoUZ00LF=7=4E zBVaxzz%3}5kFf)oj~odDBL^Yi7$}7K7%&2iVFlg_ggeY>!sMxqPdBVKstcuM(Y7|7 zOeUYD(yCWQ#loBzsf(Iyv{;gH8f`G-Vxb#5x>i)79V1;A%c}2qMsSw-ckh6A{{d#P zjpP6)rA?${_+>>Lr&2DKMdg59hSZWq(lbS-^BL1dKM{`{S0`MWp6H%R>V_?wG%fv| z-ve}?_`u*^FAu-v7lt~MA9HWF`7bgzebeR#mC|_FpweZ2#UHoXDY;*%^YjiIcUHN}Ss(55gd2pFJb&LeIX*bZ^)ml4aK@h5eUqwrbFwaXxK3z{agZXn#^NPU*Uj1js55tcqY>^Gaa6 zNr2j6x|u-&=_7~Pqo7Cz8I8#O{QJJQ&swF8RDJIktJUh0)J6|lH9p&p=)!a_wx+Wr zjTPL_0Pob;422+mfs-_veV7*D-%WYnwOE4w^`MNq zAIop(ehytz%V#U%qX-q&*xFyPbSV>X-e44gWGIaydaJ(m3W3 pebf6@5&Jo8l&QNV+)n%_)>H6}-p)FtdY^sXZQ>+|b3yPs@dDo1nz{f0 diff --git a/blind_coding/main_app/migrations/__pycache__/0003_auto_20190328_2312.cpython-34.pyc b/blind_coding/main_app/migrations/__pycache__/0003_auto_20190328_2312.cpython-34.pyc deleted file mode 100644 index 251724d500214d32f1db8af509ef5d0cd5bba0ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 719 zcmaJkA}d%pQ*@*_Ejck@rhD;MA!{Iz_-r?mBg4ASdB4bV8S za-eZx<%07ZT|f^$QqTk8z{Z1}2P+TIhu7)sJ6(j-HE~mw9q%h8wFw%9qSk90+OLGb zDQ&$aBft_69}(b9D2b19`>>f=5=x8&0>C+l05)^L5HJFa0dK$#+#PuT9!~yuxFjW% z;ehJBWulk+LQUB4N;2NI=6054IlCH!whGvlR3ylXV3Ie&g!_o`CtvfXtwklx?4lAi znmLLKKGeMdy2szMTFA1$tiFB$Fwt~a4gFc_e)z-L1=NT%G9eo|7&9?r#5vT0aKfk> zURyTnp=gCfA=j1A9Sspo_!#k-mBgjON|wdB#cVw}`|cFiqb;aU3&w|Du{=9|kS+52EMFYwNA0$= z|B}_D?~qBn$d83;+NC diff --git a/blind_coding/main_app/migrations/__pycache__/0004_question_testcaseno.cpython-34.pyc b/blind_coding/main_app/migrations/__pycache__/0004_question_testcaseno.cpython-34.pyc deleted file mode 100644 index 04855890957d512ef8772a5d0a70ddac10659fb4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 667 zcmZ{iy>8S%5XZ+}pU*a?gYXP)BIk|*5JG{V00n6f&B@Ygb2G7g*lWjY7fE}(1VvgT zUTIq@8Xka(Ss%yIu=b2*_UkwEw|}PhldsWT@x=r94*!gR<5M=XWQY8EPy;j`tUPFZ zSoz?+K_5`SXI>OQ9&7|`1*`;M03Wj14?YN)ZeO_URPv#pRc#kOT=@B z?S)IzcY2_b`f180ZAX8^{RaI5-Y~ge^6Xjh(NJ%Sx7_$m@tVx1q3w!Sb*1sF#Y&gO zrHkcym+Unv4qvNawH|YEJ2m7%hU4z0cmGGoW)gO(h=bS*`I+V~vcSf;QMzo8@p9^7 as(o5K6uFBY@_8FQ-|6wfwP;-1N8&f#K(4X? diff --git a/blind_coding/main_app/migrations/__pycache__/0005_userdata_score.cpython-34.pyc b/blind_coding/main_app/migrations/__pycache__/0005_userdata_score.cpython-34.pyc deleted file mode 100644 index f1c6a863f105a5d85c592135364b4545ed3ff054..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 638 zcmYjPy>8S%5FUGdKHD)>5aJcwL?;oNC_*8L0u-b{G?t~+#xt>evDaqTS0wG_6)1TC zUTIq@8Xka(SszDOduQioXTJHy{*^z=isNt9*8t!L{I??3&v@HcERf#-I)FZaGJrmW zGKAnAhJXSdIVgYvSPR$+CHBBP3@qqi~9kov$YTHSIWv6Z+pdp zzymNI1Km^_Un8FrVYEmxpwp-YGFnrv$)S+7<-KtGD8J-wi z7vaOd@+M|ak-9|Ab)xL4`GBi^ACEW zhRp18*)Y=IA$|vQ$QNeuySzB5K6AUadd~#!t4p$X(=b-&U90h8z*aZajn`$pGxoEn zp1w-OQ+X}-q~*-^XuLQ67x0v9#v&JKlm;_q6UU7iAo z2jG?5Qqk}LRE)E?90g81nz6_J&HR&J`Tgwa`M2_G0Pq9;84>%3Jnb_!$Zr5GKo`I| zfG&h}2*Fzn0R?>FO#u|ZM!;6US^!4yu~_`%gHVJn>zdlAvFWvSan~cYw(?v1k+O5h z)1I;+@Brp90PjJ~Jia@E&B84W(?0=`e9FXNv9eu z)iAh+tJUhcoGcksqms7j4RL+GCaG0NF1eb>`chpq#}7EeP&FQD`8c@XLcZE1M~J5$ zX@n2+_j;t7%)I2XexO@rzk_+i3A6c)Coju$Zqkc3UT|?cIXH3FLEY+bFkBn|hr~Q>#wHhOlm;w0{5q diff --git a/blind_coding/main_app/migrations/__pycache__/0007_auto_20190329_0445.cpython-34.pyc b/blind_coding/main_app/migrations/__pycache__/0007_auto_20190329_0445.cpython-34.pyc deleted file mode 100644 index f3b647080b666db7566cc658abaf29cecd7022ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 985 zcma)5OK%e~5T1Qxv%5_n^uPhc56Gq3CIM80P)iYy13iFxiB?!{JY8+NFYFDdT*Kes z#EDrh%I7kTSqS!H0iM9dBu3s=sQW0++%NNs0@E>QcH=G zmRIUMN)$w`p_5g-L>(?r+Bf!i^Adcp0EaV$Qt+1Rt!tq~cTRIGgzgGF<+Gxd4jsi3 zY>)Jfow&`{7SVGN7INu@0H7nlT+SMqSJbB)!L|S6-OZo#tGccVl`~ z35lK;`H>Sifor9+{hz;Gebo1LB&NK|>K$=n`?d|*;8iCV+HK0B!-p3PJ~BKgL)1<0 EH>I2QMgRZ+ diff --git a/blind_coding/main_app/migrations/__pycache__/0008_auto_20190329_0509.cpython-34.pyc b/blind_coding/main_app/migrations/__pycache__/0008_auto_20190329_0509.cpython-34.pyc deleted file mode 100644 index 9de770351f195e0c807abf73cd93a600d03f62e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 922 zcmaJ=&2G~`5FY=;vE7uWAi)U^oXDkelT?rjp_U-vLJuG=!D6+|Y+VQc;dOxa8eW43 z-~o7jY>JDiwx2(6O9$~*e@8}H11GrK=poBrK5U&5ajz<0PZY{CaLWseNfXFvjw z8Za^-HDP3e@eEBs3qF(60%5?!f|&&)3($sFoyG-igpR5FG>%GM#d#)`ljbNAIo7Vl zXcIV~DZh~spc7C&N`TiPqI?wFhDk#wp}M)ZZMJX^)%gpWy(_LYDD@5)27Y%B~QO7+0tL6M(S~|XRS*?UID=Ia0e diff --git a/blind_coding/main_app/migrations/__pycache__/0009_auto_20190329_0613.cpython-34.pyc b/blind_coding/main_app/migrations/__pycache__/0009_auto_20190329_0613.cpython-34.pyc deleted file mode 100644 index bc3d37d43d55c9a696424ecb777201e1485a06f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 666 zcmZ8f!EV$r5S_%?Y?5v{QoaBwm&)x5#3Fiz&|G-d_vdE$soNRQ~eys?6G@c4v>k30?D! zi~>hMd_;izkP{#E4xpSk5^9VDLcl4g5XvcF1Q-J*fP1h3e*?^wP;f>g+_Ulf9k-2Y zS!f~K)*f)qp9nehjX35<3qC(y2>ysKXi_(w(6UxG8jR{t_R`4EbAfnyA-BFwnpXW;?hSMYlpW2lPs^v-M^a$2wcJUd2@(oqlR(rF?l!R7CoSP8$H`@)Rt0gB8Q#3j%$u3KHn*dL2jrCJyu+aJsSr z(uD`2T|fuM6_~rwC$b9X;nEwWKwEmRg)TfqgQ)Lk_`~Bn6uuz=#y6 zW);Ruwm21(1Zp7bAU&9aYd@gSC!vP%PZtWtn}}F(k!5C`G1lQ?Hcfe(wK{C8-QjGz zwMG4;5)-b(1dTV-m`gDg#!C}fay6m!E#}5kcv~`!lIg}bsCr@L{#)e!KasF*JYFPo zZUW9pa+Vt`Z&VcJ9@LTGjHD5Khp=v^4HhmiwE!>{#ya#bKd5J4f5+j4bXV7@}Tiy z<%9PUeLw-9IVgZU*a+APSP8%Y-e$8OoCuk3lcp+rHB_xOHf&m?+N@n@zhVaGyv-FG z0!P4nOn?VaG9T9tU^8yx@?c| dW|A>AKLzi*+@VLDZ=jnjQ7{s5C`sdE4T diff --git a/blind_coding/main_app/migrations/__pycache__/__init__.cpython-34.pyc b/blind_coding/main_app/migrations/__pycache__/__init__.cpython-34.pyc deleted file mode 100644 index 5cadd583bf1ae0ee93e7f186adacb7fcdbe35c09..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcmaFI!^TZlX-=vg$f9B(W&i;3xGZu2 diff --git a/blind_coding/main_app/migrations/__pycache__/__init__.cpython-36.pyc b/blind_coding/main_app/migrations/__pycache__/__init__.cpython-36.pyc deleted file mode 100644 index e2d02e2e50868069cba5e91fb69f8437fdb9db2d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 163 zcmXr!<>kuM&=ek&P@K*9*(SAc#-er~FMN@iJQ zVqS4ZslH2Uadt_5fxc5tW?qVOeoAIux_%Of9iI&0lIYq;;_lhPbtkwwFB8y48#lo1}-Xl From e893d97526a80077b2bade1e6d1d6b52b28b21f6 Mon Sep 17 00:00:00 2001 From: Harpinder Date: Sat, 4 Jan 2020 00:14:24 +0530 Subject: [PATCH 11/36] Update .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5117cdd..47685f2 100644 --- a/.gitignore +++ b/.gitignore @@ -58,7 +58,6 @@ coverage.xml # Django stuff: *.log local_settings.py -blind_coding/db.sqlite3 db.sqlite3-journal # Flask stuff: From 332ebd720fa083ac661fee03a7e0ea0ee5288083 Mon Sep 17 00:00:00 2001 From: Aarjav Jain Date: Sat, 4 Jan 2020 01:15:37 +0530 Subject: [PATCH 12/36] API key to Backend --- blind_coding/blind_coding/settings.py | 4 +++- blind_coding/main_app/views.py | 4 +++- blind_coding/static/js/app.js | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/blind_coding/blind_coding/settings.py b/blind_coding/blind_coding/settings.py index 7aadd08..7cf4434 100644 --- a/blind_coding/blind_coding/settings.py +++ b/blind_coding/blind_coding/settings.py @@ -42,7 +42,6 @@ 'django.contrib.staticfiles', 'allauth.socialaccount.providers.google', 'main_app.apps.MainAppConfig', - ] MIDDLEWARE = [ @@ -137,3 +136,6 @@ MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(REPOSITORY_ROOT, 'media/') + +clientId: "222a2ef84f6881409d32ae21369d1a32" +clientSecret:"67872757630a355db890ee74b6b20926cb9e025dbb444182df2bd2700fc64af1" diff --git a/blind_coding/main_app/views.py b/blind_coding/main_app/views.py index dca027f..d444821 100644 --- a/blind_coding/main_app/views.py +++ b/blind_coding/main_app/views.py @@ -15,6 +15,7 @@ def index(request): from .models import Userdata,Question from django.contrib.auth import logout import json +import blind_coding.settings as settings from django.contrib.auth.decorators import login_required @@ -51,9 +52,10 @@ def question(request): def runCode(request): postData = json.loads( request.body.decode('utf-8') ) url = 'https://api.jdoodle.com/execute/' -# print(postData) que = Question.objects.get(qno=postData['qNo']) postData['stdin'] = '3'+'\n'+que.test_case1+'\n'+que.test_case2+'\n'+que.test_case3 + postData['clientId'] = settings.clientId + postData['clientSecret'] = settings.clientSecret response = requests.post(url,json=postData) resp = response.json() # resp = json.loads(resp) diff --git a/blind_coding/static/js/app.js b/blind_coding/static/js/app.js index 83db371..20b1b41 100644 --- a/blind_coding/static/js/app.js +++ b/blind_coding/static/js/app.js @@ -123,8 +123,6 @@ const runCode = () => { script : getCode(), language: getLanguage(), versionIndex: getVersion(), - clientId: "222a2ef84f6881409d32ae21369d1a32", - clientSecret:"67872757630a355db890ee74b6b20926cb9e025dbb444182df2bd2700fc64af1", stdin: getCustomInput(), //to give custom input qNo: getQNum(), timeElapsed: start From 08b9f8d7bbcf7099507b1d04e0512e71f7dfd1f0 Mon Sep 17 00:00:00 2001 From: Aarjav Jain Date: Sat, 4 Jan 2020 01:24:19 +0530 Subject: [PATCH 13/36] Fixed app.js --- blind_coding/static/js/app.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/blind_coding/static/js/app.js b/blind_coding/static/js/app.js index 27bcbf5..7f31c56 100644 --- a/blind_coding/static/js/app.js +++ b/blind_coding/static/js/app.js @@ -135,10 +135,13 @@ function runCode(){ console.log(getQNum()) - var program = { - script : getCode(), - language: getLanguage(), - versionIndex: getVersion(), + let program = { + // Code equals script + // script : getCode(), + // language: getLanguage(), + script : prog, + language: lang, + versionIndex: versions[versionNo], stdin: getCustomInput(), //to give custom input qNo: getQNum(), timeElapsed: time From ab7e726cc5298714fe191f4da8cf49d9cc744a51 Mon Sep 17 00:00:00 2001 From: HarpinderJotSingh Date: Sat, 4 Jan 2020 11:34:48 +0530 Subject: [PATCH 14/36] Replaced : by = in blind_coding/settings.py for clientId and clientSecret --- blind_coding/blind_coding/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blind_coding/blind_coding/settings.py b/blind_coding/blind_coding/settings.py index 7cf4434..d4e7522 100644 --- a/blind_coding/blind_coding/settings.py +++ b/blind_coding/blind_coding/settings.py @@ -137,5 +137,5 @@ MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(REPOSITORY_ROOT, 'media/') -clientId: "222a2ef84f6881409d32ae21369d1a32" -clientSecret:"67872757630a355db890ee74b6b20926cb9e025dbb444182df2bd2700fc64af1" +clientId = "222a2ef84f6881409d32ae21369d1a32" +clientSecret = "67872757630a355db890ee74b6b20926cb9e025dbb444182df2bd2700fc64af1" From 890151ba9d86559dd1c6b5bc7913848cad037e8a Mon Sep 17 00:00:00 2001 From: Himanshu Pandey <42613146+coderjedi@users.noreply.github.com> Date: Sat, 4 Jan 2020 13:01:38 +0530 Subject: [PATCH 15/36] Changes made in leaderboard and runCode --- blind_coding/main_app/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blind_coding/main_app/views.py b/blind_coding/main_app/views.py index d74dfa0..b6a7b1e 100644 --- a/blind_coding/main_app/views.py +++ b/blind_coding/main_app/views.py @@ -83,7 +83,8 @@ def runCode(request): currUser.answerGiven="".join(lst) timepenalty=Time_Penalty.objects.get_or_create(player=currUser,question=que) timepenalty.time_penalty=int(postData['timeElapsed'])+20/100*timepenalty.no_wa*que.weight - currUser.score=que.weight-timepenalty.time_penalty + currUser.score+=que.weight + currUser.total_penalty+=timepenalty.time_penalty timepenalty.save() currUser.save() else: @@ -100,7 +101,7 @@ def l_out(request): return render(request,'index.html') def leaderboard(request): - leaderboard = Userdata.objects.order_by('-score') + leaderboard = Userdata.objects.order_by('-score','total_penalty') print(leaderboard) username = [] score = [] From 1856c0338fa08a7d3de26c4f10320613cf310b1f Mon Sep 17 00:00:00 2001 From: Himanshu Pandey <42613146+coderjedi@users.noreply.github.com> Date: Sat, 4 Jan 2020 13:02:25 +0530 Subject: [PATCH 16/36] Updated models --- blind_coding/main_app/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/blind_coding/main_app/models.py b/blind_coding/main_app/models.py index ca64704..1ca74ca 100644 --- a/blind_coding/main_app/models.py +++ b/blind_coding/main_app/models.py @@ -8,6 +8,7 @@ class Userdata(models.Model): score = models.IntegerField(default = 0) answerGiven = models.CharField(max_length = 10, default="00000") timeElapsed = models.IntegerField(default = 0) + total_penalty=models.IntegerField(default = 0) def __str__(self): return str(self.user_id.username) From d63de7d0b1cd1037afc7b8e5af3212b6ae134639 Mon Sep 17 00:00:00 2001 From: HarpinderJotSingh Date: Sat, 4 Jan 2020 13:47:45 +0530 Subject: [PATCH 17/36] Tested leaderboard logic, fixed minor bugs --- blind_coding/db.sqlite3 | Bin 87040 -> 96256 bytes blind_coding/main_app/admin.py | 3 +- .../migrations/0002_auto_20200104_1324.py | 43 +++++++++ .../migrations/0003_auto_20200104_1332.py | 18 ++++ blind_coding/main_app/models.py | 2 +- blind_coding/main_app/views.py | 85 +++++++++--------- 6 files changed, 108 insertions(+), 43 deletions(-) create mode 100644 blind_coding/main_app/migrations/0002_auto_20200104_1324.py create mode 100644 blind_coding/main_app/migrations/0003_auto_20200104_1332.py diff --git a/blind_coding/db.sqlite3 b/blind_coding/db.sqlite3 index b5ab1008fb941247c606ace48d6c2b657030f830..a7cb9a8f8e8154a84dd9f64758a890c3d7b91e2f 100644 GIT binary patch delta 6966 zcmd5>3ve69dA{8R1b{D)lK6lmiVz>NC<)L#aCZPjDFq1-;sXc1Nx+dYN8m`j0fHbw z!nJ8oQq!3xPULff&NRuyW2;TtM3zL?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4tuejen^*SmiEv`DS_+E z@Xui7IuF~aLPk#!d<(yY2KpI2#R7kYuAFLvG03CjOF};&U$Sm~T7GC!rXb%QsM}Fr zQc?n2O7h3WnGUF0soMkJ0de_h*rMWmzRAf+{}iJ@VCrB!ryz$sl@+yYfKqw?fXEIU z6$LM}iGK`&T8ZgYC@>pfBa}+7Mo!6_NQcOq%cu^F*0)`Ds1sAYP$6Em!``BJvLzKt&Lx{8sh~Jx2dg@k^!s7~b*oApNT{1s>S Date: Sat, 4 Jan 2020 18:37:15 +0530 Subject: [PATCH 18/36] Changed compiler api from jdoodle to judge0 --- blind_coding/db.sqlite3 | Bin 96256 -> 96256 bytes blind_coding/main_app/templates/loggedIn.html | 6 +- blind_coding/main_app/views.py | 70 +++++++++++------- blind_coding/static/js/app.js | 35 +++++++-- 4 files changed, 74 insertions(+), 37 deletions(-) diff --git a/blind_coding/db.sqlite3 b/blind_coding/db.sqlite3 index a7cb9a8f8e8154a84dd9f64758a890c3d7b91e2f..4aeb2e1949c2d6ca290694a4babad3bd9a28d90d 100644 GIT binary patch delta 565 zcmZqpz}oPEb%HeGg^4oGj2AX09Mt1CG_o=fcFf-X~pzkWf#8$hx+W z3$q8~watbcJ&fL7CPs_W+mwa% zXl`r_GDF_Tz{o(?z);uFLILhJ6LU)=W0TE(r=;ZTD@`N(bW`0-Q-Y(y%))%K%fc%C z9DU3RoWjg?-NWNO%!1r}vyuYyqr!_kqEezf-6}JKeM+-)Q;QuPGu^{V(n3O9(*08c zi;TUU{R?vgUE=*iLP}i8-|$ zE@oUzYz&M*5X{WM#K{6=b1*W>a58f+gPEKLoIuZWGjakI0Oc9MYB@zXw*NO~Y!!mV zlChqNfuVt=(e}x1jDAXX*yDtOfzi*mMb#0zEF#9X-wI+BWfa8-=4w$^-|4XdjFsCD JWii_E0st}MnUVki delta 704 zcmZ{hzfTik7{~AF73~cMH7F`1B}T^9_kHhIj|3CSwWW~vEl>`6mzYx8(z|O9+5-0O z9AJ>mLF3TB!T~!l>)_zdZXB6doV6gv1-IvUzE7SX-_Oy-$kD~fy9o&2PtHSlviUhV zic&L3oxw_yXb53EK+iLi5$?yJxAf7E!U>!VaO^ECE&38cowmQ%bTUFhvDmAdbqqWDM@f7--%P=*Fe}!mr zxExC}SWc!yf+cb}BTf)O34{|kHFYg3Nm-FaSst)&PvVE+sxP@q3-jroUs)-)9Nkj4 z)VaDN7Jc397~Nn?nfKJ4R;Acf@EWe{>Vbuq4ZWMFTWK$EHn7G@&9+imK^ZKiS)hpJ zR<)dUt#VOI%T6I*$}S`-HN8NL@~h5zx>Hxg3|7kr)N>{B`1(8~O(E^dIw`3jA|dkW z9I~Us52E}T$N%Kd`S1MM;NI8)-#->XSI|S@HW!E3c+9Q{(OVqE044=K#$Sa35`@T~ zVlfsGU>E`jW0BKeA{^iUOKE77l0ry5{g4Ir^zddT90!cPnV!2@{YR{@VKr%(@tJPO zre_3&9POE8(PJbdG1u%deciTlRJ8Oeu{JW|ut#QLTg|sLyH;A=E%hgga2K3@$ALrB zU3XZ{Aau=YS~+IZ&_Hy}b}3nHnXZYBlind Coding
Question 1
- You have C=100,000 cakes, numbered 1 through C. Each cake has an integer height; initially, the height of each cake is 0. There are N operations. In each operation, you are given two integers L and R, and you should increase by 1 the height of each of the cakes L,L+1,…,R. One of these N operations should be removed and the remaining N−1 operations are then performed. Chef wants to remove one operation in such a way that after the remaining N−1 operations are performed, the number of cakes with height exactly K is maximum possible. Since Chef is a bit busy these days, he has asked for your help. You need to find the maximum number of cakes with height exactly K that can be achieved by removing one operation. + Loading.....
@@ -90,12 +90,12 @@
Question 1
diff --git a/blind_coding/main_app/views.py b/blind_coding/main_app/views.py index abbdde8..26cfe1a 100644 --- a/blind_coding/main_app/views.py +++ b/blind_coding/main_app/views.py @@ -1,24 +1,21 @@ from django.shortcuts import render,redirect -import requests - -# Create your views here. -def default(request): - return render(request,'loggedIn.html') - -def index(request): - return render(request,'index.html') -# -#def login(request): -# pass from django.shortcuts import render from django.http import JsonResponse,HttpResponseRedirect,HttpResponse from .models import Userdata,Question,Time_Penalty from django.contrib.auth import logout +from django.contrib.auth.decorators import login_required + import json +import requests +import base64 +import time import blind_coding.settings as settings -from django.contrib.auth.decorators import login_required +def default(request): + return render(request,'loggedIn.html') +def index(request): + return render(request,'index.html') def login(request): # if request.POST: @@ -51,32 +48,53 @@ def question(request): def runCode(request): postData = json.loads( request.body.decode('utf-8') ) - url = 'https://api.jdoodle.com/execute/' - print(postData) + url = 'https://api.judge0.com/submissions?base64_encoded=false&wait=false' que = Question.objects.get(qno=postData['qNo']) - postData['stdin'] = '3'+'\n'+que.test_case1+'\n'+que.test_case2+'\n'+que.test_case3 - postData['clientId'] = settings.clientId - postData['clientSecret'] = settings.clientSecret + stdin = '3'+'\n'+que.test_case1+'\n'+que.test_case2+'\n'+que.test_case3 + # postData['stdin'] = str(base64.b64encode(stdin.encode("utf-8"))) + postData['stdin'] = stdin + # postData['source_code'] = str(base64.b64encode(postData['source_code'].encode('utf-8'))) + print(postData) + response = requests.post(url,json=postData) resp = response.json() -# resp = json.loads(resp) + # resp = json.loads(resp) print('qNo',postData['qNo']) - print('jdoodle response json object: ',resp) - print('jdoodle output response: ',resp['output']) + print('response token: ',resp['token']) + + url2 = 'https://api.judge0.com/submissions/'+resp['token']+'?base64_encoded=false' + time.sleep(1) + resp = requests.get(url2).json() + if 'status' in resp: + if resp['status']['description'] == "Processing": + while resp['status']['description'] == "Processing": + resp = requests.get(url2).json() + print(resp) + # print('exit_code ',resp['exit_code']) + # print('exit_signal ',resp['exit_signal']) + # print( str(base64.b64decode(resp['stderr'].encode('utf-8').strip()), "utf-8") ) + # print('output response: ',resp['stdout']) res = {} #Get current user currUser = Userdata.objects.get(user_id = request.user) - if resp['output'].find('error') != -1: - res['output'] = resp['output'] + if 'error' in resp: + res['stdout'] = 'error' + elif resp['status']['description'] != "Accepted": + if resp['stderr'] is not None: + res['stdout'] = resp['stderr'] + elif resp['compile_output'] is not None: + res['stdout'] = resp['compile_output'] + else: + res['stdout'] = 'error' else: quesNo = postData['qNo'] quesData = Question.objects.get(qno= quesNo) answer = quesData.test_case1_sol+'\n'+quesData.test_case2_sol+'\n'+quesData.test_case3_sol+'\n' print(answer) currUser.timeElapsed += int(postData['timeElapsed']) - if answer == resp['output']: + if answer == resp['stdout']: print('hurray') - res['output'] = 'Correct Answer' + res['stdout'] = 'Correct Answer' print(currUser.answerGiven) lst = list(currUser.answerGiven) print(lst) @@ -96,9 +114,9 @@ def runCode(request): print('hola: ',timepenalty) print('timepenalty_player',timepenalty.player) timepenalty.no_wa+=1 - res['output'] = 'Wrong answer..' + res['stdout'] = 'Wrong answer..' timepenalty.save() - currUser.save() + currUser.save() res['score'] = currUser.score return HttpResponse(json.dumps(res)) diff --git a/blind_coding/static/js/app.js b/blind_coding/static/js/app.js index 7f31c56..8adb818 100644 --- a/blind_coding/static/js/app.js +++ b/blind_coding/static/js/app.js @@ -1,11 +1,12 @@ // var request = require('request'); $(document).ready(function() { + populateLangs(); var inp = document.getElementsByClassName('noselect')[0]; -getQuestion(0); -inp.addEventListener('select', function() { - this.selectionStart = this.selectionEnd; -}, false); + getQuestion(0); + inp.addEventListener('select', function() { + this.selectionStart = this.selectionEnd; + }, false); document.addEventListener('contextmenu', event => event.preventDefault()); var ctrlDown = false, @@ -70,6 +71,23 @@ let qNo = 0; let tc1 = ''; let tc2 = ''; let tc3 = ''; +let languageIDs = JSON.parse("[{\"id\":45,\"name\":\"Assembly (NASM 2.14.02)\"},{\"id\":46,\"name\":\"Bash (5.0.0)\"},{\"id\":47,\"name\":\"Basic (FBC 1.07.1)\"},{\"id\":48,\"name\":\"C (GCC 7.4.0)\"},{\"id\":52,\"name\":\"C++ (GCC 7.4.0)\"},{\"id\":49,\"name\":\"C (GCC 8.3.0)\"},{\"id\":53,\"name\":\"C++ (GCC 8.3.0)\"},{\"id\":50,\"name\":\"C (GCC 9.2.0)\"},{\"id\":54,\"name\":\"C++ (GCC 9.2.0)\"},{\"id\":51,\"name\":\"C# (Mono 6.6.0.161)\"},{\"id\":55,\"name\":\"Common Lisp (SBCL 2.0.0)\"},{\"id\":56,\"name\":\"D (DMD 2.089.1)\"},{\"id\":57,\"name\":\"Elixir (1.9.4)\"},{\"id\":58,\"name\":\"Erlang (OTP 22.2)\"},{\"id\":44,\"name\":\"Executable\"},{\"id\":59,\"name\":\"Fortran (GFortran 9.2.0)\"},{\"id\":60,\"name\":\"Go (1.13.5)\"},{\"id\":61,\"name\":\"Haskell (GHC 8.8.1)\"},{\"id\":62,\"name\":\"Java (OpenJDK 13.0.1)\"},{\"id\":63,\"name\":\"JavaScript (Node.js 12.14.0)\"},{\"id\":64,\"name\":\"Lua (5.3.5)\"},{\"id\":65,\"name\":\"OCaml (4.09.0)\"},{\"id\":66,\"name\":\"Octave (5.1.0)\"},{\"id\":67,\"name\":\"Pascal (FPC 3.0.4)\"},{\"id\":68,\"name\":\"PHP (7.4.1)\"},{\"id\":43,\"name\":\"Plain Text\"},{\"id\":69,\"name\":\"Prolog (GNU Prolog 1.4.5)\"},{\"id\":70,\"name\":\"Python (2.7.17)\"},{\"id\":71,\"name\":\"Python (3.8.1)\"},{\"id\":72,\"name\":\"Ruby (2.7.0)\"},{\"id\":73,\"name\":\"Rust (1.40.0)\"},{\"id\":74,\"name\":\"TypeScript (3.7.4)\"}]"); + +function populateLangs() +{ + console.log('populating languages...'); + let selectField = document.getElementById('langSelect'); + for(element of languageIDs) + { + console.log('adding.. ',element); + var opt = document.createElement("option"); + opt.value= element['id']; + opt.innerHTML = element['name']; // whatever property it has + + // then append it to the select element + selectField.appendChild(opt); + } +} function setCode(prog){ code = prog; @@ -104,7 +122,7 @@ function getCustomInput(){ } function setOutput(outp) { - output = outp['output']; + output = outp['stdout']; } function getOutput(){ return output @@ -128,6 +146,7 @@ function runCode(){ // Get language chosen by the user and store it let lang = document.getElementById("langSelect").value; + console.log('langCode: ', lang); // setLanguage(lang); // console.log('Language: ', getLanguage(), '\nCode: ', getCode()); @@ -139,9 +158,9 @@ function runCode(){ // Code equals script // script : getCode(), // language: getLanguage(), - script : prog, - language: lang, - versionIndex: versions[versionNo], + source_code : prog, + language_id: lang, + // versionIndex: versions[versionNo], stdin: getCustomInput(), //to give custom input qNo: getQNum(), timeElapsed: time From d3046aa82634f57f3c9e91b5654ca4967f987430 Mon Sep 17 00:00:00 2001 From: Paritosh29 Date: Mon, 6 Jan 2020 06:14:17 +0530 Subject: [PATCH 19/36] Leaderboard Animation --- blind_coding/static/css/style-1.css | 7 +------ blind_coding/static/js/app.js | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/blind_coding/static/css/style-1.css b/blind_coding/static/css/style-1.css index 66a7783..525648e 100644 --- a/blind_coding/static/css/style-1.css +++ b/blind_coding/static/css/style-1.css @@ -501,12 +501,7 @@ tr td, tr th { transition-delay: 0s; } -* { - -webkit-transition: 0.25s all ease; - -moz-transition: 0.25s all ease; - -o-transition: 0.25s all ease; - transition: 0.25s all ease; -} + /* Sidenav body */ diff --git a/blind_coding/static/js/app.js b/blind_coding/static/js/app.js index 8adb818..72c519a 100644 --- a/blind_coding/static/js/app.js +++ b/blind_coding/static/js/app.js @@ -41,7 +41,7 @@ $(document).ready(function() { // Display/hide leaderboard let i = 0; $('.leaderboard-icon').click(function() { - $('.leaderboard').fadeToggle(); + $('.leaderboard').fadeToggle(1000, "swing"); if (i === 0) { $('.li').html('cancel'); i = 1 From cc592a9cf7d7b6f500d61ff2f07b9a88ccdc4cf3 Mon Sep 17 00:00:00 2001 From: dmahajan980 Date: Tue, 7 Jan 2020 07:34:07 +0530 Subject: [PATCH 20/36] Saving changes. --- blind_coding/db.sqlite3 | Bin 86016 -> 87040 bytes .../main_app/__pycache__/urls.cpython-36.pyc | Bin 544 -> 632 bytes .../main_app/__pycache__/views.cpython-36.pyc | Bin 2832 -> 3228 bytes blind_coding/static/css/style-1.css | 7 +++++++ 4 files changed, 7 insertions(+) diff --git a/blind_coding/db.sqlite3 b/blind_coding/db.sqlite3 index 6bf83be7d32f9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PY OEBG?DFoFz43M~M5lbnzM diff --git a/blind_coding/main_app/__pycache__/urls.cpython-36.pyc b/blind_coding/main_app/__pycache__/urls.cpython-36.pyc index 303fe7ba3cbd4937b145771c044b24fc98975e2b..9cd36d9f6aa91ffb9e230a302fff010222bade9f 100644 GIT binary patch delta 421 zcmYk2u};G<5QgI>!ENHCEtH78Q>I8|WIxDY^jeFz@VieQV6>(?IHDHWN1#O1K2;e;^@m%kBN3Ux6)4Q+5qDl)q z(*3hdVD3s(El&y%iKeYF}MDB7=8hL5U*l8ZM>MP?&fzmtoD5n4t@gmoM{B>(dlO~rFJ delta 264 zcmeytvVcX|n3tC;Q;#bykCB1lF#{6d06v-@RqQ}I zzqCZZinFjZwYVfRKTrP_2aKu7c#9=3F*kK`Afp7cpQga%c19ycj>)?irA=?KX6B`& zR@`C*n-j&F6Av_{h!g16B5ojYi@UTary#MUB(*57cqK!TFi1jpGB;DGm=KW3!zjYY N!_30W#R!3Xi~w;qKn?%^ diff --git a/blind_coding/main_app/__pycache__/views.cpython-36.pyc b/blind_coding/main_app/__pycache__/views.cpython-36.pyc index 22d1c8144b515da7a7b8e9a077d537328280f760..93c5df8e25d307943c23f4bec9308dab047c4e74 100644 GIT binary patch delta 467 zcmYjNJxc>Y5Z&4P@VppFA;u^qg%Y_!1O;0~#YPas!VmD{%r25c@6NduOxTbjwt|w@ z%EnHxQ2&EJz~Wkef&ai+k>C#R&Ai>W!!UQ_50&Y~V$pwkEF8TS82e)Xjz#qfA$z-@ zelAwT@#g+;FMX=|W|jNWCJbzmm;soEp#GR?Imy4C~lILcGQk*}Q|2wOO} zW;%DP?apP51SKxeFagiKt4v}XUP!FdMY|NH>3Opes%8?;M_CdFkdHKySjku&t5zz5 z0v5@LHKN>0P)IyJZDG|&2gCSG=5E+cQyGig9`r?8Aj3&RvqXW5w)s#vmmxJcO+pm7 zXs}iHpM7#D8U%G;B%kcS delta 70 zcmbOuIYCU>n3tC;Q;#doiHm{ZF#{4{2C^N1xOm+}<#nt~!3>&`8}He3GHHrWp2NL; Oas-bOqs-)L9(e$(rVZZ! diff --git a/blind_coding/static/css/style-1.css b/blind_coding/static/css/style-1.css index 66a7783..2eb930a 100644 --- a/blind_coding/static/css/style-1.css +++ b/blind_coding/static/css/style-1.css @@ -363,6 +363,7 @@ textarea:focus { color: white; font-size: 20px; padding: 10px 25px; + z-index: 50; } .scoreboard > span { @@ -382,6 +383,12 @@ textarea:focus { table { color: white; + border-radius: 20px; + border: 1px solid white; +} + +tbody { + z-index: 20; } tr { From 6e48b467c2c4c20c1a518c663edae053db08baf6 Mon Sep 17 00:00:00 2001 From: dmahajan980 Date: Tue, 7 Jan 2020 13:15:01 +0530 Subject: [PATCH 21/36] Added functionality to show code. --- blind_coding/db.sqlite3 | Bin 96256 -> 96256 bytes .../main_app/__pycache__/urls.cpython-36.pyc | Bin 632 -> 632 bytes .../main_app/__pycache__/views.cpython-36.pyc | Bin 3228 -> 4097 bytes blind_coding/main_app/templates/loggedIn.html | 4 +- blind_coding/static/css/style-1.css | 15 +- blind_coding/static/js/app.js | 134 +++++++++++------- blind_coding/static/main/loggedIn.html | 4 +- 7 files changed, 102 insertions(+), 55 deletions(-) diff --git a/blind_coding/db.sqlite3 b/blind_coding/db.sqlite3 index 4aeb2e1949c2d6ca290694a4babad3bd9a28d90d..6b7e412eadd0d985352277c520bf642d7f382f78 100644 GIT binary patch delta 476 zcmZqpz}oPEb%HeG!-+D^tPdIVWHxL}S+6T$WT0zcsB2)ZU|?irXl`X>p=V-bXl`M$ zSzGVgR6)jT4E&568JPN+m6@`bTp2e`7C0id*^r}?QB#H4moe2a-`vQ=tSZB>yr9g) z*dQ^nxVWews~|TuJuN#gElq-ffkAcRL`4>m;^_$ij0&6Ok3D5%=4Ue4%zlE8X`-XF zoE)+&Mflz9`An(97A|*uccd&Br9DG9<*w-_#?; zFwr#L%&Z)E62&AFd{!9(n2?+C@&&HHzm9@Imt4;Tngqs zP%s&TgUMXa!qmvn*l6?GSF#CM0@2Xi+{n^m`y($#C0QP3hHeHXSEfTi>ej@G)f&y_ m60E+hwT^^>Z+o5}V*{fYW~fw)vieSs4PdO?ekhC4ju!xa-iZ1D delta 571 zcmZqpz}oPEb%HeGg^4oGtQQ#cOcXYztk;z=wA3{;(ls_zFf_I@G`BJ^)U!0SG&3^X ztgUx#syYJ$10UmW2Bv;yWu`19SEheVTbOP#-(mdCq`;iZyq$Rxvj?*Wm1ZUBDW;i5iMdr~xfUr^g=VG61=*%1c@jY5R4dX`lgx?@%(Ie8a|&}) zQ%!P{lMD^aQj-mmiV6!1^Tkz|eHo`G1TZRWmOu8Ck(rOle>3|DJ|;^e10w@n14CUy z3k5?XD+2>76JtGdOG9&GW01M>n9?SCCgzq##wMHnP92l4H+HJXa4!k2@~-go@z3>( zGK;A4PA^CbaJ0~MGzoXk@Gi{t$uBpL_bYVE3JiD3Hpod!uJleVbT5r?D>N*~3yaU! z4L9|wOvyFME^?}f%JeHP@DD9DGfr|dE(*&D@GOnb2nvtS2`nu z&NXs%OLt6{GBQ8}wFx+=4fKr6%`8n!Hm`jpn}8)E%ni&e%}lpH@?unyN`C)fU$D> Jp)5u_UI5)jrIP>v diff --git a/blind_coding/main_app/__pycache__/urls.cpython-36.pyc b/blind_coding/main_app/__pycache__/urls.cpython-36.pyc index 9cd36d9f6aa91ffb9e230a302fff010222bade9f..c686f044646f9a89c8d8c5bed6c9c5206e116a68 100644 GIT binary patch delta 16 Xcmeyt@`Huln3tC;;f3%<_Ch8AErTiqm{IhEX!78$AqY;Xk(j7C}Rk*LxEG2Fiwoa6l57~x1|}) z&a8WSZA;9;LAi>`6^buF6(52toH_M@3l~h~6XZbgdp#>f3Z{UWn(o)#uitz9`u&@m z?RN0yJ6S#^WnVd7s3V8FDAXP z#~VEO#0r;qlef?>^EU6GUlAQX$GgXj&+~;(tRog);ETM6l~umPm(gG3EBpfbHNMI( zqQAub53J3#7dV-rKDR?Z!P;D}4(~_fG?-zOYKosLVD}?TSU#aoQ=)nwG zx6aPKV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1~! zsr$SrO=z6~*Ny3M8MUi8pMG=%hA5!nD`Qa^@1zvxCJ+)XBaJ^*NugCAhh|#kNeVZvjC(4z@w9xYO-BQ9lem&(4{6P0 zveXOwsTEr3kw)WJq*Ed2!5hRZpH{=Ry-nj;___s5_h?gU3p~+UBkv<OTP|M^(Gp|*LjGy&x6J5**VcdzKyTP?TRH<$U2f}z2YBmu`gpq zIE0fF2mxx`JtjQDh}Z!pT02YxI}D?6Icj6h2?@HBc7YNu!Yc=8@=|um=DzMVQtZw5 zYX7k19Cc-TpCU-B`)C@M8{=&}LbBu$ zvzYyi*4AG{sBp^XtV@A1AHIz&~EA!Qj8Zj~$R_(SE2MLe>| z7iG)MQovEG;9C?fuT5EgHU_+Y1Fnj4DT99X9{QzLsu~D5HWJksP$Wtn%2;!*-5Nb- zr^s3O+?NlLNszf7vEP1Y?w!9`JE>pu+C$WUXTTHP<-A4nC+zuK93IEnuQB=+z9*Ey zP+b1WK}-sDJMB;`5-2mTs4NSPFM_w50R8~BP~Aa6y@+$!fOvqiDoZ9Y)gL2DC`ePi zNm*!F=&?SZO5lK!fkmo8o6x+avys^Pj&?Jm*CS$BW zDPtwnFX*quA5YXzX>uDN>V43DkFO%vWw_>$dwBcY0Teco7&=bJv0TGlGY~0kDfg?h zQfb7A%3h)^d(`)_+*XH*>Lt@%uu`B=RAeZ+uO`6-IS`pu&6aKY+*okanW*GsKc4Bc z1|_t;=-z97?^705u`X4m1|*v5DMhu7Ot47S4nyz1Eb{Kk diff --git a/blind_coding/main_app/templates/loggedIn.html b/blind_coding/main_app/templates/loggedIn.html index b50cfd8..93a6273 100644 --- a/blind_coding/main_app/templates/loggedIn.html +++ b/blind_coding/main_app/templates/loggedIn.html @@ -109,7 +109,9 @@
Question 1
- + + +
diff --git a/blind_coding/static/css/style-1.css b/blind_coding/static/css/style-1.css index 66a7783..e095cd9 100644 --- a/blind_coding/static/css/style-1.css +++ b/blind_coding/static/css/style-1.css @@ -178,8 +178,8 @@ nav#header ul a { .options { display: flex; - margin: 8px 0 0 0; - justify-content: space-around; + margin: 15px 0 0 0; + justify-content: center; } button { @@ -287,8 +287,14 @@ textarea:focus { background: black; } -.run,.submit{ +.bttn,.submit, #showCode{ width: 10vw; + background-color: rgba(57, 255, 216, 0.8); + transition: all 100ms ease-in 50ms; +} + +.bttn:nth-child(1) { + margin-right: 3.5vw; } #footer p { @@ -588,7 +594,8 @@ a { #codeInput{ color: black; - caret-color: white; + caret-color: white; + transition: color 100ms ease-out; } ::selection{ diff --git a/blind_coding/static/js/app.js b/blind_coding/static/js/app.js index 8adb818..8fdd4f1 100644 --- a/blind_coding/static/js/app.js +++ b/blind_coding/static/js/app.js @@ -79,7 +79,7 @@ function populateLangs() let selectField = document.getElementById('langSelect'); for(element of languageIDs) { - console.log('adding.. ',element); + // console.log('adding.. ',element); var opt = document.createElement("option"); opt.value= element['id']; opt.innerHTML = element['name']; // whatever property it has @@ -189,53 +189,53 @@ const sendRequest = (method, url, data) => { ourRequest.onload = function() { if (ourRequest.status >= 200 && ourRequest.status < 400) { // console.log('output: '); - console.log('success 200'); - if(url == 'runCode/'){ - console.log('1'); - let recievedData = JSON.parse(ourRequest.responseText); - console.log('receivedData: ', recievedData); - setOutput(recievedData); - document.getElementById("compilerOutput").value = getOutput(); - document.getElementById('score').innerHTML = recievedData['score']; - console.log(recievedData['score']); - if(getOutput() == 'Correct Answer') - { - s = 0; - m = 0; - qNo = (getQNum() + 1) % 5; - console.log(qNo); - document.getElementsByClassName('left')[0].getElementsByTagName('h5')[0] = "Question "+qNo; - document.getElementsByClassName('left')[0].innerHTML = getQuestion(qNo); - console.log("OO"); + // console.log('success 200'); + if(url == 'runCode/'){ + console.log('1'); + let recievedData = JSON.parse(ourRequest.responseText); + console.log('receivedData: ', recievedData); + setOutput(recievedData); + document.getElementById("compilerOutput").value = getOutput(); + document.getElementById('score').innerHTML = recievedData['score']; + console.log(recievedData['score']); + if(getOutput() == 'Correct Answer') + { + s = 0; + m = 0; + qNo = (getQNum() + 1) % 5; + console.log(qNo); + document.getElementsByClassName('left')[0].getElementsByTagName('h5')[0] = "Question "+qNo; + document.getElementsByClassName('left')[0].innerHTML = getQuestion(qNo); + console.log("OO"); + } + increaseTime(); + return recievedData; + } + else{ + console.log('2'); + let recievedData = JSON.parse(ourRequest.responseText); + let inpt = recievedData['sampIn'].split(' '); + let inStr = ''; + for(let i = 0; i < inpt.length;i++) + { + inStr += inpt[i]; + inStr += '\n'; + } + let que = recievedData['question'] + '

'+'Sample Input'+'
'+recievedData['sampTCNum']+'
'+inStr+'

'+'Sample Output'+'
'+recievedData['sampleOut']; + console.log('hi ',recievedData); + document.getElementsByClassName('left')[0].innerHTML=que; + qNo = recievedData['qNo']; + // console.log(qNo); + // console.log(recievedData['userScore']); + document.getElementById('score').innerHTML = recievedData['userScore']; + console.log(recievedData); + return recievedData; } - increaseTime(); - return recievedData; - } - else{ - console.log('2'); - let recievedData = JSON.parse(ourRequest.responseText); - let inpt = recievedData['sampIn'].split(' '); - let inStr = ''; - for(let i = 0; i < inpt.length;i++) - { - inStr += inpt[i]; - inStr += '\n'; - } - let que = recievedData['question'] + '

'+'Sample Input'+'
'+recievedData['sampTCNum']+'
'+inStr+'

'+'Sample Output'+'
'+recievedData['sampleOut']; - console.log('hi ',recievedData); - document.getElementsByClassName('left')[0].innerHTML=que; - qNo = recievedData['qNo']; - console.log(qNo); - console.log(recievedData['userScore']); - document.getElementById('score').innerHTML = recievedData['userScore']; - console.log(recievedData); - return recievedData; - } } else { // Nothing // startClock(); - console.log("OO") + // console.log("OO") increaseTime() } } @@ -243,11 +243,11 @@ const sendRequest = (method, url, data) => { ourRequest.onerror = function() { // Nothing // startClock(); - console.log("OO") + // console.log("OO") increaseTime() } - console.log(JSON.stringify(data)); + // console.log(JSON.stringify(data)); ourRequest.send(JSON.stringify(data)); }; @@ -262,6 +262,8 @@ const getQuestion = queNum => { // let data = { queNum }; // sendRequest('POST', '/question/', data); sendRequest('POST', '/question/', { queNum }); + // console.log(queNum) + // clicks = 0; }; window.onresize = function() { @@ -305,8 +307,8 @@ function closeAbout() { document.addEventListener('DOMContentLoaded', function() { var elems = document.querySelectorAll('select'); - console.log('hikljhg'); -// var instances = M.FormSelect.init(elems, options); + // console.log('hikljhg'); + // var instances = M.FormSelect.init(elems, options); }); // Or with jQuery @@ -421,8 +423,44 @@ function pauseTime() { clearInterval(timerId); } +// Won't allow user to cheat by changing text-color +let codeIntervalId; +let clicks = 0; +const hideCode = () => { + codeIntervalId = setInterval(() => document.getElementById('codeInput').style.color = 'black', 200) +} + +const showCode = () => { + const box = document.getElementById('codeInput') + + if (box.disabled === false) { + // Functionality won't be achieved after two clicks + if (clicks === 2) { + box.disabled = true; + alert('You have used up your time!') + return; + } + else { + // Disable button and show code for 5 seconds + box.disabled = true; + clearInterval(codeIntervalId); + box.style.color = 'white'; + setTimeout(() => { + hideCode() + box.disabled = false; + }, 5000) + } + clicks++; + console.log(clicks) + } +} + +document.getElementById('showCode').addEventListener('click', () => { + showCode() +}) + window.onload = () => { // startClock(); - console.log("OO") increaseTime() + hideCode(); } diff --git a/blind_coding/static/main/loggedIn.html b/blind_coding/static/main/loggedIn.html index 2ce878c..ee48f07 100644 --- a/blind_coding/static/main/loggedIn.html +++ b/blind_coding/static/main/loggedIn.html @@ -32,8 +32,8 @@
- - + +
From 04de859315f9a65dcd0fc91248a5834a7bd91e1b Mon Sep 17 00:00:00 2001 From: HarpinderJotSingh Date: Tue, 7 Jan 2020 19:22:44 +0530 Subject: [PATCH 22/36] Code editor was disabled after two attempts of show code, enabled it back --- blind_coding/static/js/app.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/blind_coding/static/js/app.js b/blind_coding/static/js/app.js index 8fdd4f1..657c40a 100644 --- a/blind_coding/static/js/app.js +++ b/blind_coding/static/js/app.js @@ -431,13 +431,13 @@ const hideCode = () => { } const showCode = () => { - const box = document.getElementById('codeInput') + const box = document.getElementById('codeInput'); if (box.disabled === false) { // Functionality won't be achieved after two clicks - if (clicks === 2) { - box.disabled = true; - alert('You have used up your time!') + if (clicks >= 2) { + // box.disabled = false; + alert('You have used up your time!'); return; } else { @@ -448,10 +448,13 @@ const showCode = () => { setTimeout(() => { hideCode() box.disabled = false; - }, 5000) + }, 5000); } clicks++; - console.log(clicks) + console.log(clicks); + } + else{ + alert('You have used up your time!'); } } From fdb6ceaeb36c5778e92ffce5f9ac89b9a21b5850 Mon Sep 17 00:00:00 2001 From: HarpinderJotSingh Date: Tue, 7 Jan 2020 19:53:16 +0530 Subject: [PATCH 23/36] Changed alerts to sweet alerts - alert msgs with css applied --- blind_coding/main_app/templates/loggedIn.html | 1 + blind_coding/static/js/app.js | 21 ++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/blind_coding/main_app/templates/loggedIn.html b/blind_coding/main_app/templates/loggedIn.html index 93a6273..8652c7a 100644 --- a/blind_coding/main_app/templates/loggedIn.html +++ b/blind_coding/main_app/templates/loggedIn.html @@ -11,6 +11,7 @@ + diff --git a/blind_coding/static/js/app.js b/blind_coding/static/js/app.js index 657c40a..1c44a48 100644 --- a/blind_coding/static/js/app.js +++ b/blind_coding/static/js/app.js @@ -269,7 +269,12 @@ const getQuestion = queNum => { window.onresize = function() { if ((window.outerHeight - window.innerHeight) > 100) { // console was opened (or screen was resized) - alert("Sorry! You will be logged out since you didn't follow the instructions."); + // alert("Sorry! You will be logged out since you didn't follow the instructions."); + Swal.fire( + 'Sorry', + "You will be logged out since you didn't follow the instructions", + 'warning' + ) window.location.href = "/logout" } } @@ -437,7 +442,12 @@ const showCode = () => { // Functionality won't be achieved after two clicks if (clicks >= 2) { // box.disabled = false; - alert('You have used up your time!'); + // alert('You have used up your time!'); + Swal.fire( + 'Sorry..', + 'You have used up your time!', + 'error' + ); return; } else { @@ -454,7 +464,12 @@ const showCode = () => { console.log(clicks); } else{ - alert('You have used up your time!'); + // alert('You have used up your time!'); + Swal.fire( + 'Sorry..', + 'You have used up your time!', + 'warning' + ); } } From a2b928141e47e1d63a757fbac3c4960afb32f892 Mon Sep 17 00:00:00 2001 From: HarpinderJotSingh Date: Tue, 7 Jan 2020 20:49:28 +0530 Subject: [PATCH 24/36] Added instructions, cleared editor after correct answer and logged user out after all correct responses --- README.md | 10 ++++----- blind_coding/main_app/templates/loggedIn.html | 21 ++++++++++-------- blind_coding/main_app/views.py | 4 ++++ blind_coding/static/css/style-1.css | 2 +- blind_coding/static/css/style.css | 2 +- blind_coding/static/js/app.js | 22 ++++++++++++++----- 6 files changed, 39 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index bd66bd0..90be3d0 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ - [X] Timer is not working properly, fix it - [X] When user gets a question correct, automatically redirect to next question - [X] Add a live leaderboard -- [ ] Change frontend -- [ ] Add details in about section -- [ ] Cursor does not goes up in the editor, fix it +- [X] Change frontend - Leaderboard opening animation is inserted, might require to change other background colors and stuff later. +- [X] Add details in about section +- [X] Cursor does not goes up in the editor, fix it - [ ] Do Backend stuff - do not put keys as it is within the files -- [ ] Add feature to show code for sometime, say 5-10 seconds once per question +- [X] Add feature to show code for sometime, say 5-10 seconds once per question - [ ] Disable run button for the time compiler runs the code and returns the result to prevent multiple compiler runs -- [ ] Limit number of runs per question per user +- [X] Limit number of runs per question per user - feature not needed anymore diff --git a/blind_coding/main_app/templates/loggedIn.html b/blind_coding/main_app/templates/loggedIn.html index b50cfd8..4329814 100644 --- a/blind_coding/main_app/templates/loggedIn.html +++ b/blind_coding/main_app/templates/loggedIn.html @@ -60,20 +60,23 @@
-
-
+
+
-

About

-
1. What is Lorem Ipsum?
-

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

-
2. Where does it come from?
-

Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested.

-
+

Instructions

+
- There are five questions of varying difficulties and points associated with them.
Score associated are 20, 30, 40, 50, 60 points respectively.
+
- For every question, the first time you submit the correct answer, you are awarded points corresponding to that question and the time penalty is + also calculated which takes into consideration the time taken until last successful solve together with the number of wrong attempts
+
- Standings will be based on the points scored and in cases of clashes, time penalties are compared and one with lesser time penalty is better ranker
+
- Every time you give a correct answer, the question is automatically changed and code editor is reset.
+
- You have only two attempts throughout the event to see the code you have written. To see the code, press Show Code button near Run button.
+
- Don't try to open up the console or changing the window/tab. You'll be logged out immediately
+
- + + \ No newline at end of file diff --git a/blind_coding/main_app/urls.py b/blind_coding/main_app/urls.py index 1fb8612..fa2b349 100644 --- a/blind_coding/main_app/urls.py +++ b/blind_coding/main_app/urls.py @@ -11,5 +11,7 @@ path('logout/', views.l_out, name='logout'), path('question/', views.question, name='question'), path('main/runCode/', views.runCode, name='runCode'), - path('leaderboard/', views.leaderboard, name='leaderboard') + path('leaderboard/', views.leaderboard, name='leaderboard'), + path('getChancesUsed/', views.getChancesUsed, name='getChancesUsed'), + path('increaseClicks/', views.increaseClicks, name='increaseClicks'), ] diff --git a/blind_coding/main_app/views.py b/blind_coding/main_app/views.py index 3f163a3..e330cac 100644 --- a/blind_coding/main_app/views.py +++ b/blind_coding/main_app/views.py @@ -143,3 +143,18 @@ def leaderboard(request): resp = {'username': username, 'score': score} return HttpResponse(json.dumps(resp), content_type='application/json') + +def getChancesUsed(request): + res={} + res['chancesUsed'] = Userdata.objects.get(user_id = request.user).chancesUsed + return HttpResponse(json.dumps(res)) + +def increaseClicks(request): + data = json.loads( request.body.decode('utf-8') ) + clicks = data['clicks'] + user = Userdata.objects.get(user_id = request.user) + user.chancesUsed = clicks + user.save() + res = {} + res['error'] = 'No Error' + return HttpResponse(json.dumps(res)) \ No newline at end of file diff --git a/blind_coding/static/js/app.js b/blind_coding/static/js/app.js index 3ae6d45..a79f26d 100644 --- a/blind_coding/static/js/app.js +++ b/blind_coding/static/js/app.js @@ -1,20 +1,60 @@ -// var request = require('request'); +let ctrlDown = false; +let ctrlKey = 17, cmdKey = 91, vKey = 86, cKey = 67; +let qNo = 0; +let languageIDs = JSON.parse("[{\"id\":45,\"name\":\"Assembly (NASM 2.14.02)\"},{\"id\":46,\"name\":\"Bash (5.0.0)\"},{\"id\":47,\"name\":\"Basic (FBC 1.07.1)\"},{\"id\":48,\"name\":\"C (GCC 7.4.0)\"},{\"id\":52,\"name\":\"C++ (GCC 7.4.0)\"},{\"id\":49,\"name\":\"C (GCC 8.3.0)\"},{\"id\":53,\"name\":\"C++ (GCC 8.3.0)\"},{\"id\":50,\"name\":\"C (GCC 9.2.0)\"},{\"id\":54,\"name\":\"C++ (GCC 9.2.0)\"},{\"id\":51,\"name\":\"C# (Mono 6.6.0.161)\"},{\"id\":55,\"name\":\"Common Lisp (SBCL 2.0.0)\"},{\"id\":56,\"name\":\"D (DMD 2.089.1)\"},{\"id\":57,\"name\":\"Elixir (1.9.4)\"},{\"id\":58,\"name\":\"Erlang (OTP 22.2)\"},{\"id\":44,\"name\":\"Executable\"},{\"id\":59,\"name\":\"Fortran (GFortran 9.2.0)\"},{\"id\":60,\"name\":\"Go (1.13.5)\"},{\"id\":61,\"name\":\"Haskell (GHC 8.8.1)\"},{\"id\":62,\"name\":\"Java (OpenJDK 13.0.1)\"},{\"id\":63,\"name\":\"JavaScript (Node.js 12.14.0)\"},{\"id\":64,\"name\":\"Lua (5.3.5)\"},{\"id\":65,\"name\":\"OCaml (4.09.0)\"},{\"id\":66,\"name\":\"Octave (5.1.0)\"},{\"id\":67,\"name\":\"Pascal (FPC 3.0.4)\"},{\"id\":68,\"name\":\"PHP (7.4.1)\"},{\"id\":43,\"name\":\"Plain Text\"},{\"id\":69,\"name\":\"Prolog (GNU Prolog 1.4.5)\"},{\"id\":70,\"name\":\"Python (2.7.17)\"},{\"id\":71,\"name\":\"Python (3.8.1)\"},{\"id\":72,\"name\":\"Ruby (2.7.0)\"},{\"id\":73,\"name\":\"Rust (1.40.0)\"},{\"id\":74,\"name\":\"TypeScript (3.7.4)\"}]"); +let timerCont = document.getElementById('timer'); +let s = 0, m = 0; +let timerId; +const _totalNumQues = 5; $(document).ready(function() { populateLangs(); - var inp = document.getElementsByClassName('noselect')[0]; getQuestion(0); + disableCopyPaste(); + leaderbInit(); + increaseTime(); + hideCode(); + addResizeEvent(); + showBtnInit(); + sideNavInit(); +}); + +function showBtnInit(){ + document.getElementById('showCode').addEventListener('click', () => { + showCode() + }); +} + +function addResizeEvent(){ + window.onresize = function() { + if ((window.outerHeight - window.innerHeight) > 100) { + logout('screen-resize') + } + } +} + +function leaderbInit(){ + let i = 0; + $('.leaderboard-icon').click(function() { + $('.leaderboard').fadeToggle(650, "swing"); + if (i === 0) { + $('.li').html('cancel'); + i = 1 + getLeaderboard(); + // insert_chart + } + else { + $('.li').html('insert_chart') + i = 0; + } + }); +} +function disableCopyPaste(){ + var inp = document.getElementsByClassName('noselect')[0]; inp.addEventListener('select', function() { this.selectionStart = this.selectionEnd; }, false); - - document.addEventListener('contextmenu', event => event.preventDefault()); - var ctrlDown = false, - ctrlKey = 17, - cmdKey = 91, - vKey = 86, - cKey = 67; - + document.addEventListener('contextmenu', event => event.preventDefault()); $(document).keydown(function(e) { // console.log('Key pressed: ', e.keyCode); if (e.keyCode == ctrlKey || e.keyCode == cmdKey) ctrlDown = true; @@ -37,139 +77,113 @@ $(document).ready(function() { return false; } }); - - // Display/hide leaderboard - let i = 0; - $('.leaderboard-icon').click(function() { - $('.leaderboard').fadeToggle(650, "swing"); - if (i === 0) { - $('.li').html('cancel'); - i = 1 - getLeaderboard(); - // insert_chart - } - else { - $('.li').html('insert_chart') - i = 0; - } - }) -}); - -const languages = ['c','java','cpp','cpp14','python2','python3']; -const versions = ['0','1','2']; -let code = ` -#include -int main(){ - printf("Hello World num entered is :"); - return 0; -}`; -let langNo = 0; -let versionNo = 0; -let input = '1'; -let output = ''; -let qNo = 0; -let tc1 = ''; -let tc2 = ''; -let tc3 = ''; -let languageIDs = JSON.parse("[{\"id\":45,\"name\":\"Assembly (NASM 2.14.02)\"},{\"id\":46,\"name\":\"Bash (5.0.0)\"},{\"id\":47,\"name\":\"Basic (FBC 1.07.1)\"},{\"id\":48,\"name\":\"C (GCC 7.4.0)\"},{\"id\":52,\"name\":\"C++ (GCC 7.4.0)\"},{\"id\":49,\"name\":\"C (GCC 8.3.0)\"},{\"id\":53,\"name\":\"C++ (GCC 8.3.0)\"},{\"id\":50,\"name\":\"C (GCC 9.2.0)\"},{\"id\":54,\"name\":\"C++ (GCC 9.2.0)\"},{\"id\":51,\"name\":\"C# (Mono 6.6.0.161)\"},{\"id\":55,\"name\":\"Common Lisp (SBCL 2.0.0)\"},{\"id\":56,\"name\":\"D (DMD 2.089.1)\"},{\"id\":57,\"name\":\"Elixir (1.9.4)\"},{\"id\":58,\"name\":\"Erlang (OTP 22.2)\"},{\"id\":44,\"name\":\"Executable\"},{\"id\":59,\"name\":\"Fortran (GFortran 9.2.0)\"},{\"id\":60,\"name\":\"Go (1.13.5)\"},{\"id\":61,\"name\":\"Haskell (GHC 8.8.1)\"},{\"id\":62,\"name\":\"Java (OpenJDK 13.0.1)\"},{\"id\":63,\"name\":\"JavaScript (Node.js 12.14.0)\"},{\"id\":64,\"name\":\"Lua (5.3.5)\"},{\"id\":65,\"name\":\"OCaml (4.09.0)\"},{\"id\":66,\"name\":\"Octave (5.1.0)\"},{\"id\":67,\"name\":\"Pascal (FPC 3.0.4)\"},{\"id\":68,\"name\":\"PHP (7.4.1)\"},{\"id\":43,\"name\":\"Plain Text\"},{\"id\":69,\"name\":\"Prolog (GNU Prolog 1.4.5)\"},{\"id\":70,\"name\":\"Python (2.7.17)\"},{\"id\":71,\"name\":\"Python (3.8.1)\"},{\"id\":72,\"name\":\"Ruby (2.7.0)\"},{\"id\":73,\"name\":\"Rust (1.40.0)\"},{\"id\":74,\"name\":\"TypeScript (3.7.4)\"}]"); +} function populateLangs() { console.log('populating languages...'); + let selectField = document.getElementById('langSelect'); for(element of languageIDs) { - // console.log('adding.. ',element); var opt = document.createElement("option"); opt.value= element['id']; - opt.innerHTML = element['name']; // whatever property it has - - // then append it to the select element + opt.innerHTML = element['name']; selectField.appendChild(opt); } } -function setCode(prog){ - code = prog; +function logout(reason){ + if(reason == 'Finished'){ + Swal.fire( + 'Congratulations', + 'You have successfully attempted all the questions', + 'success' + ); + } + else if(reason == 'screen-resize'){ + Swal.fire( + 'Sorry', + "You will be logged out since you didn't follow the instructions", + 'error' + ); + } + window.location.href = "/logout"; } -function getCode(){ - return code; +function resetTime(){ + s = 0; + m = 0; } -function setLanguage(langNum){ - langNo = langNum; +function setOutput(outp) { + document.getElementById("compilerOutput").value = outp; } -function getLanguage(){ - return langNo -}; - -function setVersion(vrsn){ - versionNo = vrsn; +function setScore(score){ + document.getElementById('score').innerHTML = score; } -function getVersion(){ - return versions[versionNo] +function getOutput(){ + return document.getElementById("compilerOutput").value; } -function setCustomInput(inp){ - input = inp; +function increaseQNum(){ + qNo = (getQNum() + 1) % _totalNumQues; } -function getCustomInput(){ - return input +function getQNum() { + return qNo; } -function setOutput(outp) { - output = outp['stdout']; -} -function getOutput(){ - return output +function getCode(){ + return document.getElementById("codeInput").value; } -function getQNum() { - return qNo; +function getLanguage(){ + return document.getElementById("langSelect").value; } -// Get the various inputs and send it to server function runCode(){ - // Pause, send time or store time - // stopClock(); pauseTime(); - console.log(`Time elapsed is: ${m} minutes and ${s} seconds`); - - // Get code entered by the user and store it - let prog = document.getElementById("codeInput").value; - // setCode(prog); - // Get language chosen by the user and store it - let lang = document.getElementById("langSelect").value; - console.log('langCode: ', lang); - // setLanguage(lang); + let prog = getCode(); - // console.log('Language: ', getLanguage(), '\nCode: ', getCode()); - let time = m * 60 + s; + let lang = getLanguage(); - console.log(getQNum()) + let time = m * 60 + s; let program = { - // Code equals script - // script : getCode(), - // language: getLanguage(), source_code : prog, language_id: lang, - // versionIndex: versions[versionNo], - stdin: getCustomInput(), //to give custom input qNo: getQNum(), timeElapsed: time }; - // Send the code to jdoodle url with all other required parameters - // For all test cases backend checks the output and returns no of test cases cleared - // let resp = sendRequest('POST', 'runCode/', program); - sendRequest('POST', 'runCode/', program); + sendRequest('POST', 'runCode/', program).then( + function(response){ + response = JSON.parse(response); + console.log('Compiler Call Response: ', response); + setOutput(response['stdout']); + setScore(response['score']); + if(getOutput() == 'Correct Answer') + { + if(response['completedGame'] == 'true'){ + logout('Finished'); + } + resetTime(); + increaseQNum(); + getQuestion(qNo); + } + increaseTime(); + } + ).catch( + function(error){ + increaseTime(); + console.error(error); + } + ); } function getCookie(name) { @@ -177,133 +191,69 @@ function getCookie(name) { return v ? v[2] : null; } +function sendRequest(type, url, data){ + let request = new XMLHttpRequest(); + let csrftoken = getCookie("csrftoken"); + return new Promise(function(resolve, reject){ + request.onreadystatechange = () => { + if (request.readyState !== 4) return; + // Process the response + if (request.status >= 200 && request.status < 300) { + // If successful + resolve(request.responseText); + } else { + // If failed + reject({ + status: request.status, + statusText: request.statusText + }); + } + }; + // Setup our HTTP request + request.open(type || "GET", url, true); + // Add csrf token + request.setRequestHeader("X-CSRFToken", csrftoken); + // Send the request + request.send(JSON.stringify(data)); + }); + +} -const sendRequest = (method, url, data) => { - let csrf_token = getCookie('csrftoken'); - let ourRequest = new XMLHttpRequest(); - - ourRequest.open(method, url, true); - ourRequest.setRequestHeader("Content-type", "application/json"); - ourRequest.setRequestHeader("X-CSRFToken", csrf_token); - - ourRequest.onload = function() { - if (ourRequest.status >= 200 && ourRequest.status < 400) { - // console.log('output: '); - // console.log('success 200'); - if(url == 'runCode/'){ - console.log('1'); - let recievedData = JSON.parse(ourRequest.responseText); - console.log('receivedData: ', recievedData); - setOutput(recievedData); - document.getElementById("compilerOutput").value = getOutput(); - document.getElementById('score').innerHTML = recievedData['score']; - console.log(recievedData['score']); - if(getOutput() == 'Correct Answer') - { - Swal.fire( - 'Congratulations', - 'You have successfully attempted all the questions', - 'success' - ); - window.location.href = "/logout"; - s = 0; - m = 0; - qNo = (getQNum() + 1) % 5; - console.log(qNo); - document.getElementsByClassName('left')[0].getElementsByTagName('h5')[0] = "Question "+qNo; - document.getElementsByClassName('left')[0].innerHTML = getQuestion(qNo); - console.log("OO"); - } - increaseTime(); - return recievedData; - } - else{ - console.log('2'); - let recievedData = JSON.parse(ourRequest.responseText); - let inpt = recievedData['sampIn'].split(' '); +function getQuestion(queNum){ + + sendRequest('POST', '/question/', { queNum }).then( + function(response){ + response = JSON.parse(response); + let inpt = response['sampIn'].split(' '); let inStr = ''; for(let i = 0; i < inpt.length;i++) { inStr += inpt[i]; inStr += '\n'; } - let que = recievedData['question'] + '

'+'Sample Input'+'
'+recievedData['sampTCNum']+'
'+inStr+'

'+'Sample Output'+'
'+recievedData['sampleOut']; - console.log('hi ',recievedData); - document.getElementsByClassName('left')[0].innerHTML=que; - qNo = recievedData['qNo']; - // console.log(qNo); - // console.log(recievedData['userScore']); - document.getElementById('score').innerHTML = recievedData['userScore']; - console.log(recievedData); - return recievedData; - } - - } else { - // Nothing - // startClock(); - // console.log("OO") - increaseTime() + let que = response['question'] + '

'+'Sample Input'+'
'+response['sampTCNum']+'
'+inStr+'

'+'Sample Output'+'
'+response['sampleOut']; + document.getElementsByClassName('left')[0].innerHTML=que; + qNo = response['qNo']; + document.getElementById('score').innerHTML = response['userScore']; } - } - - ourRequest.onerror = function() { - // Nothing - // startClock(); - // console.log("OO") - increaseTime() - } - - // console.log(JSON.stringify(data)); - ourRequest.send(JSON.stringify(data)); -}; - - -const getQuestion = queNum => { - // start = 0; - s = 0; - m = 0; - // // startClock(); - // console.log("OO") - // increaseTime() - // let data = { queNum }; - // sendRequest('POST', '/question/', data); - sendRequest('POST', '/question/', { queNum }); - // console.log(queNum) - // clicks = 0; -}; - -window.onresize = function() { - if ((window.outerHeight - window.innerHeight) > 100) { - // console was opened (or screen was resized) - // alert("Sorry! You will be logged out since you didn't follow the instructions."); - Swal.fire( - 'Sorry', - "You will be logged out since you didn't follow the instructions", - 'warning' - ) - window.location.href = "/logout" + ).catch( + function(error){ + increaseTime(); + console.error(error); } -} - -function getCookie(name) { - var v = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)'); - return v ? v[2] : null; + ); } function login() { - var csrf_token = getCookie('csrftoken'); - var ourRequest = new XMLHttpRequest(); - ourRequest.open("POST","login/", true); - ourRequest.setRequestHeader("X-CSRFToken", csrf_token); - ourRequest.setRequestHeader("Content-type", "application/json"); - ourRequest.onload = function() { - if (ourRequest.status >= 200 && ourRequest.status < 400) { ; } - else {} - } - ourRequest.onerror = function() { - // Nothing - } - ourRequest.send(); + sendRequest('POST', 'login/', '').then( + function(resp){ + console.log(resp); + } + ).catch( + function(error){ + console.error(error); + } + ); } function showInstructions() { @@ -318,16 +268,8 @@ function closeInstructions() { document.addEventListener('DOMContentLoaded', function() { var elems = document.querySelectorAll('select'); - // console.log('hikljhg'); - // var instances = M.FormSelect.init(elems, options); - }); - - // Or with jQuery - - $(document).ready(function(){ - $('select').formSelect(); - }); - +}); + $(document).delegate('#codeInput', 'keydown', function(e) { var keyCode = e.keyCode || e.which; @@ -347,60 +289,28 @@ document.addEventListener('DOMContentLoaded', function() { } }); -let hamburger = document.querySelector(".hamburger"); -const title = document.querySelector('.title') - -// Side-nav event handler -hamburger.onclick = function(e) { - e.preventDefault; - if (hamburger.classList.contains("active")) { - hamburger.classList.remove("active"); - hamburger.style.transform = 'translateX(0)'; - document.getElementById('sidenav').style.transform = 'translateX(-100%)'; - title.style.left = 'calc(3vh + 50px)' - } - else { - hamburger.classList.add("active"); - hamburger.style.transform = 'translateX(21vw)'; - document.getElementById('sidenav').style.transform = 'translateX(0)'; - title.style.left = '3vh' +function sideNavInit(){ + let hamburger = document.querySelector(".hamburger"); + const title = document.querySelector('.title') + + // Side-nav event handler + hamburger.onclick = function(e) { + e.preventDefault; + if (hamburger.classList.contains("active")) { + hamburger.classList.remove("active"); + hamburger.style.transform = 'translateX(0)'; + document.getElementById('sidenav').style.transform = 'translateX(-100%)'; + title.style.left = 'calc(3vh + 50px)' + } + else { + hamburger.classList.add("active"); + hamburger.style.transform = 'translateX(21vw)'; + document.getElementById('sidenav').style.transform = 'translateX(0)'; + title.style.left = '3vh' + } } } -// function Submit() { - -// } - -// let start = 0; -// let timerInterval; -let timerCont = document.getElementById('timer'); -// function increaseTime() -// function startClock() { -// timerInterval = setInterval(function() { -// start++; -// if(start >= 60) { -// if(start%60>=10) { -// timerCont.innerHTML = "0" + Number(Math.floor(start/60)) + ':' + Number(start%60); -// } else { -// timerCont.innerHTML = "0" + Number(Math.floor(start/60)) + ':0' + Number(start%60); -// } -// } else if(start < 60 && start >= 10){ -// timerCont.innerHTML = '00:' + Number(start); -// } else if(start < 10) { -// timerCont.innerHTML = '00:0' + Number(start%60); -// } -// }, 1000); -// } - -// function stopClock() { -// clearInterval(timerInterval); -// } - -// Seconds = s -// Minutes = m -// Run time function -let s = 0, m = 0; -let timerId; function increaseTime() { timerId = setInterval(function() { if (s > 59){ @@ -438,53 +348,73 @@ function pauseTime() { let codeIntervalId; let clicks = 0; const hideCode = () => { - codeIntervalId = setInterval(() => document.getElementById('codeInput').style.color = 'black', 200) + codeIntervalId = setInterval(() => document.getElementById('codeInput').style.color = 'black', 200); } -const showCode = () => { - const box = document.getElementById('codeInput'); - - if (box.disabled === false) { - // Functionality won't be achieved after two clicks - if (clicks >= 2) { - // box.disabled = false; - // alert('You have used up your time!'); - Swal.fire( - 'Sorry..', - 'You have used up your time!', - 'error' - ); - return; +function increaseClicks(){ + pauseTime(); + let data = { + 'clicks' : clicks+1 + }; + sendRequest('POST', '/increaseClicks/', data).then( + function(response){ + increaseTime(); } - else { - // Disable button and show code for 5 seconds - box.disabled = true; - clearInterval(codeIntervalId); - box.style.color = 'white'; - setTimeout(() => { - hideCode() - box.disabled = false; - }, 5000); + ).catch( + function(error){ + increaseTime(); + console.error(error); } - clicks++; - console.log(clicks); - } - else{ - // alert('You have used up your time!'); - Swal.fire( - 'Sorry..', - 'You have used up your time!', - 'warning' - ); - } + ); } -document.getElementById('showCode').addEventListener('click', () => { - showCode() -}) - -window.onload = () => { - // startClock(); - increaseTime() - hideCode(); +const showCode = () => { + pauseTime(); + sendRequest('GET', '/getChancesUsed/', null).then( + function(response){ + response = JSON.parse(response); + clicks = response['chancesUsed']; + const box = document.getElementById('codeInput'); + if (box.disabled === false) { + // Functionality won't be achieved after two clicks + if (clicks >= 2) { + // box.disabled = false; + // alert('You have used up your time!'); + Swal.fire( + 'Sorry..', + 'You have used up your time!', + 'error' + ); + return; + } + else { + // Disable button and show code for 5 seconds + box.disabled = true; + clearInterval(codeIntervalId); + box.style.color = 'white'; + setTimeout(() => { + hideCode() + box.disabled = false; + }, 5000); + } + increaseClicks(); + } + else{ + // alert('You have used up your time!'); + Swal.fire( + 'Sorry..', + 'You have used up your time!', + 'error' + ); + } + } + ).catch( + function(error){ + increaseTime(); + console.error(error); + } + ); } +$(document).ready(function(){ + $('select').formSelect(); +}); \ No newline at end of file From 21ac1a6760b833bc6bdc99364b44dfcad6a5371d Mon Sep 17 00:00:00 2001 From: HarpinderJotSingh Date: Sat, 11 Jan 2020 16:46:46 +0530 Subject: [PATCH 26/36] Disabled run button for the time the run result does not comes --- blind_coding/main_app/templates/loggedIn.html | 2 +- blind_coding/static/js/app.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/blind_coding/main_app/templates/loggedIn.html b/blind_coding/main_app/templates/loggedIn.html index 724b4e2..aee43be 100644 --- a/blind_coding/main_app/templates/loggedIn.html +++ b/blind_coding/main_app/templates/loggedIn.html @@ -113,7 +113,7 @@
Question 1
- +
diff --git a/blind_coding/static/js/app.js b/blind_coding/static/js/app.js index a79f26d..016394d 100644 --- a/blind_coding/static/js/app.js +++ b/blind_coding/static/js/app.js @@ -144,7 +144,16 @@ function getLanguage(){ return document.getElementById("langSelect").value; } +function disableRun(){ + document.getElementById('runBtn').disabled = true; +} + +function enableRun(){ + document.getElementById('runBtn').disabled = false; +} + function runCode(){ + disableRun(); pauseTime(); console.log(`Time elapsed is: ${m} minutes and ${s} seconds`); @@ -177,10 +186,12 @@ function runCode(){ getQuestion(qNo); } increaseTime(); + enableRun(); } ).catch( function(error){ increaseTime(); + enableRun(); console.error(error); } ); From 08cc372f460209f41aeac881da54ec1417af2c85 Mon Sep 17 00:00:00 2001 From: HarpinderJotSingh Date: Sat, 11 Jan 2020 16:46:46 +0530 Subject: [PATCH 27/36] Disabled run button for the time the run result does not comes --- README.md | 5 +++-- blind_coding/main_app/templates/loggedIn.html | 2 +- blind_coding/static/js/app.js | 11 +++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 90be3d0..efa262b 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ - [X] Change frontend - Leaderboard opening animation is inserted, might require to change other background colors and stuff later. - [X] Add details in about section - [X] Cursor does not goes up in the editor, fix it -- [ ] Do Backend stuff - do not put keys as it is within the files +- [X] Do Backend stuff - do not put keys as it is within the files - [X] Add feature to show code for sometime, say 5-10 seconds once per question -- [ ] Disable run button for the time compiler runs the code and returns the result to prevent multiple compiler runs +- [X] Disable run button for the time compiler runs the code and returns the result to prevent multiple compiler runs - [X] Limit number of runs per question per user - feature not needed anymore +- [ ] Add Rank of the player to the leaderboard diff --git a/blind_coding/main_app/templates/loggedIn.html b/blind_coding/main_app/templates/loggedIn.html index 724b4e2..aee43be 100644 --- a/blind_coding/main_app/templates/loggedIn.html +++ b/blind_coding/main_app/templates/loggedIn.html @@ -113,7 +113,7 @@
Question 1
- +
diff --git a/blind_coding/static/js/app.js b/blind_coding/static/js/app.js index a79f26d..016394d 100644 --- a/blind_coding/static/js/app.js +++ b/blind_coding/static/js/app.js @@ -144,7 +144,16 @@ function getLanguage(){ return document.getElementById("langSelect").value; } +function disableRun(){ + document.getElementById('runBtn').disabled = true; +} + +function enableRun(){ + document.getElementById('runBtn').disabled = false; +} + function runCode(){ + disableRun(); pauseTime(); console.log(`Time elapsed is: ${m} minutes and ${s} seconds`); @@ -177,10 +186,12 @@ function runCode(){ getQuestion(qNo); } increaseTime(); + enableRun(); } ).catch( function(error){ increaseTime(); + enableRun(); console.error(error); } ); From e26d01c14fcdbcf04283aaf362bd3c0167536399 Mon Sep 17 00:00:00 2001 From: Aarjav Jain Date: Sat, 11 Jan 2020 16:57:28 +0530 Subject: [PATCH 28/36] LeaderBoard Rank Back --- blind_coding/main_app/views.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/blind_coding/main_app/views.py b/blind_coding/main_app/views.py index e330cac..239491d 100644 --- a/blind_coding/main_app/views.py +++ b/blind_coding/main_app/views.py @@ -139,9 +139,15 @@ def leaderboard(request): score.append(leaderboard[i].score) except: pass + + curr_user = Userdata.objects.get(user_id=request.user) + curr_score = curr_user.score + rank = 1 + for player in leaderboard: + if curr_score < player.score: + rank += 1 - resp = {'username': username, 'score': score} - + resp = {'username': username, 'score': score, 'rank': rank} return HttpResponse(json.dumps(resp), content_type='application/json') def getChancesUsed(request): From 31a92e9404cb3aa09c54dbefe115b193a0a26d6d Mon Sep 17 00:00:00 2001 From: HarpinderJotSingh Date: Sat, 11 Jan 2020 17:29:05 +0530 Subject: [PATCH 29/36] Rank functionality done --- blind_coding/main_app/templates/loggedIn.html | 6 ++++++ blind_coding/main_app/views.py | 4 +++- blind_coding/static/css/style-1.css | 5 +++++ blind_coding/static/js/script.js | 2 +- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/blind_coding/main_app/templates/loggedIn.html b/blind_coding/main_app/templates/loggedIn.html index aee43be..c0dc2c5 100644 --- a/blind_coding/main_app/templates/loggedIn.html +++ b/blind_coding/main_app/templates/loggedIn.html @@ -143,6 +143,12 @@
Question 1
+ + + + 1 + +