123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- <!DOCTYPE html>
- <html>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link rel="stylesheet" type="text/css" href="css/style.css">
- <head>
- <title>An African Language Short Story Competition</title>
- </head>
- <?php include 'submitdatabaseinfo.php';?>
- <body>
- <ul>
- <li><a id="home" href="index.php">Home</a></li>
- <li><a id="original" href="submit.php">Original Story Submission</a></li>
- <li><a id="translation" href="submittranslation.php">Translated Story Submission</a></li>
- <li><a id="stories" href="displaystories.php">Submitted Stories</a></li>
- <li><a id="evaluate" class="active" href="#">Evaluate</a></li>
- <li><a id="statistics" href="submissionstatistics.php">Submissions per Language</a></li>
- <li><a id="contact" href="contact.php">Contact</a></li>
- <li><a id="resources" href="resources.php">Resources</a></li>
- <li><a id="flyers" href="flyers.php">Flyers</a></li>
- <li><a id="faq" href="faq.php">Frequently Asked Questions</a></li>
- <li><a id="privacy" href="privacy.php">Privacy</a></li>
- </ul>
- <header>
- <h1>Tuvute Pamoja
- <a href="https://deeplearningindaba.com">
- <img src="images/deeplearningindaba.svg" alt="Deeplearning Indaba" style="height:60px">
- </a></h1>
- </header>
- <h1 id="title">An African Language Short Story Competition</h1>
- <section>
- <h3 id="descriptiontitle">Story Evaluation</h3>
- <div>
- <p id="descriptiontext1">
- If you have made a submission of an original story or a translation, you can evaluate
- stories in languages in which you have made a submission. Your evaluation will help
- other story writers and translators improve their work. Stories with the highest
- scores will win prizes. A prize of $40 will be given to the author of the best
- original short story in each language. A prize of $40 will be given to the translator
- of the best translated short story in each language. A prize of $40 will be given
- to the author of the best translated short story in each language. Please evaluate
- stories will based on a 5 point scale (5 excellent, 4 very good, 3 good, 2 average,
- 1 improvement needed) on:</p>
- <ol type="a">
- <li id="descriptiontext2">Grammar and spelling</li><br>
- <li id="descriptiontext3">Theme and plot</li><br>
- <li id="descriptiontext4">Style</li><br>
- <li id="descriptiontext5">Cultural relevance</li><br>
- <li id="descriptiontext6">Overall impression</li><br>
- </ol>
- <p id="descriptiontext7">The average score will be used
- to rank stories, in case of a tie, the organizing committee
- will randomly choose one story to receive a prize.</p>
- </div>
- </section>
- <section>
- <div>
- <label id="votecode" for="votecode">Please enter the voting code you received by email
- </label><br>
- <input type="votecode" id="votecodeinput" name="votecodeinput" style="width:375px"><br>
- <p>
- <button id="submitvotecode" name="submitvotecode" onclick="checkvotecode()" >Submit vote code
- </button>
- </p>
- </div>
- <div id="story">
- </div>
- <div>
- <h3 id="evaluationscaletitle"> Evaluation scale</h3>
- <ol>
- <li id="evaluation1">Improvement needed</li><br>
- <li id="evaluation2">Average</li><br>
- <li id="evaluation3">Good</li><br>
- <li id="evaluation4">Very good</li><br>
- <li id="evaluation5">Excellent</li><br>
- </ol>
- </div>
- <div id="storyevaluation">
- <table id="storiestoevaluate" ></table>
- </div>
- <div id="submissionresponse">
- </div>
- </section>
- <section>
- <div id="keyboarddiv">
- <?php// include "softkeyboard.php" ;?>
- </div>
- </section>
- </body>
- <?php include 'footer.php';?>
- <script>
- function evaluatestory(id) {
- var comment = document.getElementById(id+"C").value;
- var grammarandspelling = document.getElementById(id+"GandS").value;
- var themeandplot = document.getElementById(id+"TandP").value;
- var style = document.getElementById(id+"S").value;
- var culturalrelevance = document.getElementById(id+"CR").value;
- var overallimpression = document.getElementById(id+"OI").value;
- var voterid = document.getElementById(id+"voterid").value;
- if ( (grammarandspelling === "" ) ||
- (themeandplot === "" ) ||
- (style === "" ) ||
- (culturalrelevance === "" ) ||
- (overallimpression === "" ) ||
- (grammarandspelling < 1 ) ||
- (themeandplot < 1 ) ||
- (style < 1 ) ||
- (culturalrelevance < 1 ) ||
- (overallimpression < 1 ) ||
- (grammarandspelling > 5 ) ||
- (themeandplot > 5 ) ||
- (style > 5 ) ||
- (culturalrelevance > 5 ) ||
- (overallimpression > 5 )
- )
- {
- document.getElementById(id+"evalresult").innerHTML = "Please fill all 5 numeric fields with a number between 1 and 5";
- }else{
- document.getElementById(id+"evalresult").innerHTML = "";
- //use ajax to store scores in database
-
- var xmlhttp = new XMLHttpRequest();
- xmlhttp.onreadystatechange = function() {
- if (this.readyState == 4 && this.status == 200) {
- document.getElementById(id+"evalresult").innerHTML = this.responseText;
- }
- };
- xmlhttp.open("POST","submitevaluation.php",true);
- xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- xmlhttp.send("comment="+comment+"&grammarandspelling="+grammarandspelling+"&themeandplot="+themeandplot+"&style="+style+"&culturalrelevance="+culturalrelevance+"&overallimpression="+overallimpression+"&id="+id+"&voterid="+voterid);
-
- }
-
- }
- </script>
- <script>
- function checkvotecode() {
- var votecode = document.getElementById("votecodeinput").value;
- //use ajax to check languages can evaluate stories in
- var xmlhttp = new XMLHttpRequest();
- xmlhttp.onreadystatechange = function() {
- if (this.readyState == 4 && this.status == 200) {
- document.getElementById("storiestoevaluate").innerHTML = this.responseText;
- }
- };
- xmlhttp.open("POST","votecode.php",true);
- xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- xmlhttp.send("code="+votecode);
- }
- </script>
- <script>
- function addcharacter(id)
- {
- var charin = document.getElementById(id).value;
- //var id = event.srcElement.id;
- console.log(id);
- console.log(charin);
- var text = document.getElementById("draftcomment").value;
- var input = document.getElementById("draftcomment");
- var cursorpos = input.selectionStart;
- // A slow but reliable entry method
- var start = text.substring(0,cursorpos);
- var end = text.substring(cursorpos,text.length);
- if (charin==="")
- {
- var character="";
- }else if (id==="Backspace") {
- var character="";
- var start = start.substring(0,start.length-1);
- }else if ((id==="Enter")||(id==="Tab")){
- var character = charin;
- }else{
- var character = String.fromCharCode(charin);
- }
- document.getElementById("draftcomment").value = start + character + end;
- }
- function shiftwrap()
- {
- var value = document.getElementById("keyboardtype").value;
- shift(value);
- }
- function changecasewrap()
- {
- var value = document.getElementById("keyboardtype").value;
- changecase(value);
- }
- function altgrwrap()
- {
- var value = document.getElementById("keyboardtype").value;
- altgr(value);
- }
- function keyboardwrap()
- {
- var value = document.getElementById("keyboardtype").value;
- keyboard(value);
- if(value==="ara") {
- document.getElementById("draftcomment").dir="rtl";
- }else{
- document.getElementById("draftcomment").dir="ltr";
- }
- }
- function getstory(storyid) {
- //use ajax to get story from database
- var xmlhttp = new XMLHttpRequest();
- xmlhttp.onreadystatechange = function() {
- if (this.readyState == 4 && this.status == 200) {
- document.getElementById("story").innerHTML = this.responseText;
- }
- };
- xmlhttp.open("GET","getstory.php?primarykey="+storyid,true);
- xmlhttp.send();
- }
- </script>
- <script type="text/javascript" src="js/afrikaanskeys.js"></script>
- <script type="text/javascript" src="js/akankeys.js"></script>
- <script type="text/javascript" src="js/amharickeys.js"></script>
- <script type="text/javascript" src="js/arabickeys.js"></script>
- <script type="text/javascript" src="js/bembakeys.js"></script>
- <script type="text/javascript" src="js/camerooniankeys.js"></script>
- <script type="text/javascript" src="js/dagbanikeys.js"></script>
- <script type="text/javascript" src="js/englishkeys.js"></script>
- <script type="text/javascript" src="js/ewekeys.js"></script>
- <script type="text/javascript" src="js/gakeys.js"></script>
- <script type="text/javascript" src="js/hausakeys.js"></script>
- <script type="text/javascript" src="js/igbokeys.js"></script>
- <script type="text/javascript" src="js/kikuyukeys.js"></script>
- <script type="text/javascript" src="js/lingalakeys.js"></script>
- <script type="text/javascript" src="js/lugandakeys.js"></script>
- <script type="text/javascript" src="js/malikeys.js"></script>
- <script type="text/javascript" src="js/sesothokeys.js"></script>
- <script type="text/javascript" src="js/togokeys.js"></script>
- <script type="text/javascript" src="js/wolofkeys.js"></script>
- <script type="text/javascript" src="js/yorubakeys.js"></script>
- <script type="text/javascript" src="js/keyboard.js"></script>
- </html>
|