Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test creation page #17

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add all basic user files
merge login page commits

update login.html page layout

add id for inputCheckBox

add id for inputCheckBox

Wrapper added

Halfway thro

Revert "Halfway thro"

This reverts commit 4dcf506.

Worked on GUI
  • Loading branch information
harshnarang8 committed Sep 1, 2016
commit 667b23118058ad7ef84f1af2708f940bf6e31687
62 changes: 62 additions & 0 deletions Client/admin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<html>
<head>
<title>Current Test</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<style type="text/css">
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
.footer-para {
margin: 20px 0;
}
</style>
</head>
<body>
<div class="page-header">
<center><h1>TechTests</h1></center>
</div>
<div class="container">
<div class="row">
<div class="col-sm-2">
<div class="list-group">
<a href="#" class="list-group-item">Online Tests <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item active">Current Test <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Results <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Profile <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Preferences <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
</div>
<div class="list-group">
<a href="#" class="list-group-item">Online Tests <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item active">Current Test <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Results <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Profile <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Preferences <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
</div>
</div>
<div class="col-sm-8">

</div>
</dvi>
</div>
<script>
jQuery(document).ready(function($) {
$(".clickable-row").click(function() {
window.document.location = $(this).data("href");
});
});
</script>
</body>
</html>
103 changes: 103 additions & 0 deletions Client/createTest.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<html>
<head>
<title>Current Test</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<style type="text/css" href="css/main.css"></style>
<script src="js/main.js"></script>
</head>
<body>
<div class="page-header">
<center><h1>TechTests</h1></center>
</div>
<div class="container">
<div class="row">
<div class="col-sm-2">
<div class="list-group">
<a href="#" class="list-group-item">Online Tests <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item active">Current Test <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Results <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Profile <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Preferences <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
</div>
</div>
<div class="col-sm-8">
<p>
<ul class="nav nav-tabs">
<li class="active"><a href="#" class="CreationNav">Editing Mode</a></li>
<li><a href="#" class="CreationNav">Final View Mode</a></li>
<li><a href="#" class="CreationNav">Statistics</a></li>
<li><a href="#" class="CreationNav">Preferences</a></li>
</ul>
</p>
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
<div class="well well-lg" id="currentQuestion">
<form class="form-horizontal">
<div class="row">
<div class="col-sm-9">
<div class="form-group">
<label for="currentInputQuestion" class="sr-only">Type Your Question</label>
<input type="text" id="currentInputQuestion" class="form-control" placeholder="Type Your Question">
</div>
</div>
<div class="col-sm-3">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown"><span id="currentChoice">Single Correct</span>
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#" onclick="choosePara()">Paragraph</a></li>
<li><a href="#" onclick="chooseMCQ()">Single Correct</a></li>
<li><a href="#" onclick="chooseMulti()">Multiple Correct</a></li>
</ul>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-9 collapse" id="ParagraphTypeDiv">
<div class="panel panel-default">
<div class="panel-body">
Subjective Answer.
</div>
</div>
</div>
<div class="col-sm-9 collapse in" id="OptionsDiv">
<div class="panel panel-default">
<div class="panel-body">
<div class="container-fluid" id="OptHolder">
</div>
</div>
<div class="panel-footer">
<button class="btn btn-default" id="btnAddOption" type="button">Add Option</button>
<button class="btn btn-default" id="btnClearOption" type="button">Clear Options</button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-9">
</div>
<div class="col-sm-3">
<button class="btn btn-primary" type="button" id="AddQuestionToList">Include Question</button>
</div>
</div>
</form>
</div>
<div class="list-group" id="preparedQuestions">
<a href="#" class="list-group-item">First item</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
</script>
</body>
</html>
15 changes: 15 additions & 0 deletions Client/css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
.footer-para {
margin: 20px 0;
}
58 changes: 58 additions & 0 deletions Client/currentTest.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<html>
<head>
<title>Current Test</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<style type="text/css">
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
.footer-para {
margin: 20px 0;
}
</style>
</head>
<body>
<div class="page-header">
<center><h1>TechTests</h1></center>
</div>
<div class="container">
<div class="row">
<div class="col-sm-2">
<div class="list-group">
<a href="#" class="list-group-item">Online Tests <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item active">Current Test <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Results <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Profile <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Preferences <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
</div>
</div>
<div class="col-sm-8">
<h3>Test name: Hello World</h3>
<p>
<span class="question"></span>
</p>
</div>
</dvi>
</div>
<script>
jQuery(document).ready(function($) {
$(".clickable-row").click(function() {
window.document.location = $(this).data("href");
});
});
</script>
</body>
</html>
13 changes: 13 additions & 0 deletions Client/js/include.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="page-header">
<center><h1>TechTests</h1></center>
</div>
<div class="container">
<div class="row">
<div class="col-sm-2">
<div class="list-group">
<a href="#" class="list-group-item">Online Tests <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item active">Current Test <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Results <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Profile <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Preferences <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
</div>
64 changes: 64 additions & 0 deletions Client/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
var noOfOptions = 0;
var qnType = 0;
// zero represents para type
// one represents single choice type
// two repesents multi choice type
jQuery(document).ready(function($) {
$(".clickable-row").click(function() {
window.document.location = $(this).data("href");
});
$(".CreationNav").on('click',function(e) {
$(e.target).parent.addClass('active');
});
});
jQuery(document).ready(function($) {
$("#btnAddOption").click(function() {
// adding an option
noOfOptions += 1;
var sa1 = $('<div>').addClass('row').attr('id','Opt'+noOfOptions).css({'margin-top':'15px'});
var sa2 = $('<div>').addClass('col-sm-1').html(noOfOptions+'.');
var sa3 = $('<div>').addClass('col-sm-9');
var sa4 = $('<input>').addClass('form-control').attr({placeholder:'Option',id:('currentInput'+noOfOptions),type:'text'});
var sa5 = $('<div>').addClass('col-sm-1');
var sa6 = $('<button>').addClass('btn btn-default').attr('type','button').on('click',function(e){
$(e.target).parents('.row')[0].remove();
});
var sa7 = $('<span>').addClass('glyphicon glyphicon-remove');
sa6.append(sa7);
sa5.append(sa6);
sa3.append(sa4);
sa1.append(sa2).append(sa3);
sa1.append(sa5);
$('#OptHolder').append(sa1);
});
$("#btnClearOption").click(function($) {
noOfOptions = 0;
document.getElementById("OptHolder").innerHTML = "";
})
$("#AddQuestionToList").click(function() {
});
});


function removeElement(elem_id, $) {
$(elem_id).remove();
}

function choosePara() {
document.getElementById("currentChoice").innerHTML = "Paragraph";
document.getElementById("ParagraphTypeDiv").className = "col-sm-9 collapse in";
document.getElementById("OptionsDiv").className = "col-sm-9 collapse";
qnType = 0;
}
function chooseMCQ() {
document.getElementById("currentChoice").innerHTML = "Single Correct";
document.getElementById("ParagraphTypeDiv").className = "col-sm-9 collapse";
document.getElementById("OptionsDiv").className = "col-sm-9 collapse in";
qnType = 1;
}
function chooseMulti() {
document.getElementById("currentChoice").innerHTML = "Multiple Correct";
document.getElementById("ParagraphTypeDiv").className = "col-sm-9 collapse";
document.getElementById("OptionsDiv").className = "col-sm-9 collapse in";
qnType = 2;
}
54 changes: 54 additions & 0 deletions Client/preferences.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<html>
<head>
<title>My Results</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<style type="text/css">
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
.footer-para {
margin: 20px 0;
}
</style>
</head>
<body>
<div class="page-header">
<center><h1>TechTests</h1></center>
</div>
<div class="container">
<div class="row">
<div class="col-sm-2">
<div class="list-group">
<a href="#" class="list-group-item">Online Tests <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Current Test <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Results <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item">Profile <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
<a href="#" class="list-group-item active">Preferences <span class="glyphicon glyphicon-chevron-right pull-right"></span></a>
</div>
</div>
<div class="col-sm-8">
</div>
</div>
</div>
<script>
jQuery(document).ready(function($) {
$(".clickable-row").click(function() {
window.document.location = $(this).data("href");
});
});
</script>
</body>
</html>
Loading