Method to determine the number of questions in an exam
up vote
0
down vote
favorite
I am doing a program to perform tests, however I have to fulfil a requirement: that the teacher can determine the amount of questions that each test will have. Currently each exam consists of 10 questions but I have no idea what to do or what method to modify to meet this requirement. Any ideas?
Here are my methods for the creation of exams:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
#txt_question
height: 184px;
width: 472px;
.answerBox
width: 400px;
#btn_next0
margin-left: 11px;
</style>
</head>
<body style="height: 500px">
<form id="form1" runat="server">
<div>
Título del Examen:
<asp:TextBox ID="txt_title" runat="server"> </asp:TextBox><br />
<textarea id="txt_question"></textarea> <br />
<div id="here_radios">
<input id="rb_answer0" type="radio" name="answerBtn" value="0" class="answerBtn" /> <input id="txt_answer0" type="text" class="answerBox" /> <br />
<input id="rb_answer1" type="radio" name="answerBtn" value="1" class="answerBtn" /> <input id="txt_answer1" type="text" class="answerBox" /> <br />
<input id="rb_answer2" type="radio" name="answerBtn" value="2" class="answerBtn" /> <input id="txt_answer2" type="text" class="answerBox" /> <br />
</div>
<input id="btn_back" type="button" value="Pregunta Anterior" onclick="goBack()" />
<input id="btn_next" type="button" value="Siguiente Pregunta" onclick="saveJson()" /><input id="btn_cant" type="button" value="Cantidad preguntas" onclick="saveJson()" /><br />
<asp:Button ID="btn_finish" runat="server" Text="Terminar" OnClientClick="cstest()" OnClick="btn_finish_Click" />
</div>
<asp:HiddenField ID="hf_hook" runat="server" />
</form>
<%-- CLIENT CODE --%>
<script>
var exam = ;
var index = 0;
function saveJson()
var data =
var gotAnswers = ;
var radios = here_radios.getElementsByClassName("answerBtn");
var boxes = here_radios.getElementsByClassName("answerBox");
data["pregunta"] = txt_question.value;
data["correcta"] = "0";
for (var i = 0; i < radios.length; i++)
gotAnswers.push(boxes[i].value);
if (radios[i].checked)
data["correcta"] = radios[i].value;
boxes[i].value = "";
data["respuestas"] = gotAnswers;
txt_question.value = "";
exam[index] = data;
index++;
if (typeof exam[index] !== 'undefined')
populate(index);
function goBack()
if (index > 0)
index--;
populate(index);
function populate(index)
var radios = here_radios.getElementsByClassName("answerBtn");
var boxes = here_radios.getElementsByClassName("answerBox");
txt_question.value = exam[index].pregunta;
for (var i = 0; i < exam[index].respuestas.length; i++)
boxes[i].value = exam[index].respuestas[i];
radios[i].checked = (exam[index].correcta == i);
function cstest()
saveJson();
var data = ;
exam.forEach(function(e)
data.push(JSON.stringify(e));
);
hf_hook.value = data.join("▄");
</script>
</body>
</html>
Thank u so much for your help or ideas!
javascript html
|
show 3 more comments
up vote
0
down vote
favorite
I am doing a program to perform tests, however I have to fulfil a requirement: that the teacher can determine the amount of questions that each test will have. Currently each exam consists of 10 questions but I have no idea what to do or what method to modify to meet this requirement. Any ideas?
Here are my methods for the creation of exams:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
#txt_question
height: 184px;
width: 472px;
.answerBox
width: 400px;
#btn_next0
margin-left: 11px;
</style>
</head>
<body style="height: 500px">
<form id="form1" runat="server">
<div>
Título del Examen:
<asp:TextBox ID="txt_title" runat="server"> </asp:TextBox><br />
<textarea id="txt_question"></textarea> <br />
<div id="here_radios">
<input id="rb_answer0" type="radio" name="answerBtn" value="0" class="answerBtn" /> <input id="txt_answer0" type="text" class="answerBox" /> <br />
<input id="rb_answer1" type="radio" name="answerBtn" value="1" class="answerBtn" /> <input id="txt_answer1" type="text" class="answerBox" /> <br />
<input id="rb_answer2" type="radio" name="answerBtn" value="2" class="answerBtn" /> <input id="txt_answer2" type="text" class="answerBox" /> <br />
</div>
<input id="btn_back" type="button" value="Pregunta Anterior" onclick="goBack()" />
<input id="btn_next" type="button" value="Siguiente Pregunta" onclick="saveJson()" /><input id="btn_cant" type="button" value="Cantidad preguntas" onclick="saveJson()" /><br />
<asp:Button ID="btn_finish" runat="server" Text="Terminar" OnClientClick="cstest()" OnClick="btn_finish_Click" />
</div>
<asp:HiddenField ID="hf_hook" runat="server" />
</form>
<%-- CLIENT CODE --%>
<script>
var exam = ;
var index = 0;
function saveJson()
var data =
var gotAnswers = ;
var radios = here_radios.getElementsByClassName("answerBtn");
var boxes = here_radios.getElementsByClassName("answerBox");
data["pregunta"] = txt_question.value;
data["correcta"] = "0";
for (var i = 0; i < radios.length; i++)
gotAnswers.push(boxes[i].value);
if (radios[i].checked)
data["correcta"] = radios[i].value;
boxes[i].value = "";
data["respuestas"] = gotAnswers;
txt_question.value = "";
exam[index] = data;
index++;
if (typeof exam[index] !== 'undefined')
populate(index);
function goBack()
if (index > 0)
index--;
populate(index);
function populate(index)
var radios = here_radios.getElementsByClassName("answerBtn");
var boxes = here_radios.getElementsByClassName("answerBox");
txt_question.value = exam[index].pregunta;
for (var i = 0; i < exam[index].respuestas.length; i++)
boxes[i].value = exam[index].respuestas[i];
radios[i].checked = (exam[index].correcta == i);
function cstest()
saveJson();
var data = ;
exam.forEach(function(e)
data.push(JSON.stringify(e));
);
hf_hook.value = data.join("▄");
</script>
</body>
</html>
Thank u so much for your help or ideas!
javascript html
2
I don't know C# but this really looks like Javascript?
– CertainPerformance
Nov 12 at 2:02
If your question relates in some way to C#, please indicate clearly how it does. In the meantime I've removed your C# tag since it doesn't make any sense for your question.
– John
Nov 12 at 2:04
10 * exam.length seems right, but maybe too obvious? What's the core problem?
– Jim B.
Nov 12 at 2:09
My problem is that by default the teacher can create 10 questions, however I need that in some way that is defined by the same teacher, if he wants a test to be 5 questions, 7, 9, etc.so do it
– Alvaro Quirós Perez
Nov 12 at 2:16
How do you currently determine how many questions you have?
– John
Nov 12 at 2:32
|
show 3 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am doing a program to perform tests, however I have to fulfil a requirement: that the teacher can determine the amount of questions that each test will have. Currently each exam consists of 10 questions but I have no idea what to do or what method to modify to meet this requirement. Any ideas?
Here are my methods for the creation of exams:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
#txt_question
height: 184px;
width: 472px;
.answerBox
width: 400px;
#btn_next0
margin-left: 11px;
</style>
</head>
<body style="height: 500px">
<form id="form1" runat="server">
<div>
Título del Examen:
<asp:TextBox ID="txt_title" runat="server"> </asp:TextBox><br />
<textarea id="txt_question"></textarea> <br />
<div id="here_radios">
<input id="rb_answer0" type="radio" name="answerBtn" value="0" class="answerBtn" /> <input id="txt_answer0" type="text" class="answerBox" /> <br />
<input id="rb_answer1" type="radio" name="answerBtn" value="1" class="answerBtn" /> <input id="txt_answer1" type="text" class="answerBox" /> <br />
<input id="rb_answer2" type="radio" name="answerBtn" value="2" class="answerBtn" /> <input id="txt_answer2" type="text" class="answerBox" /> <br />
</div>
<input id="btn_back" type="button" value="Pregunta Anterior" onclick="goBack()" />
<input id="btn_next" type="button" value="Siguiente Pregunta" onclick="saveJson()" /><input id="btn_cant" type="button" value="Cantidad preguntas" onclick="saveJson()" /><br />
<asp:Button ID="btn_finish" runat="server" Text="Terminar" OnClientClick="cstest()" OnClick="btn_finish_Click" />
</div>
<asp:HiddenField ID="hf_hook" runat="server" />
</form>
<%-- CLIENT CODE --%>
<script>
var exam = ;
var index = 0;
function saveJson()
var data =
var gotAnswers = ;
var radios = here_radios.getElementsByClassName("answerBtn");
var boxes = here_radios.getElementsByClassName("answerBox");
data["pregunta"] = txt_question.value;
data["correcta"] = "0";
for (var i = 0; i < radios.length; i++)
gotAnswers.push(boxes[i].value);
if (radios[i].checked)
data["correcta"] = radios[i].value;
boxes[i].value = "";
data["respuestas"] = gotAnswers;
txt_question.value = "";
exam[index] = data;
index++;
if (typeof exam[index] !== 'undefined')
populate(index);
function goBack()
if (index > 0)
index--;
populate(index);
function populate(index)
var radios = here_radios.getElementsByClassName("answerBtn");
var boxes = here_radios.getElementsByClassName("answerBox");
txt_question.value = exam[index].pregunta;
for (var i = 0; i < exam[index].respuestas.length; i++)
boxes[i].value = exam[index].respuestas[i];
radios[i].checked = (exam[index].correcta == i);
function cstest()
saveJson();
var data = ;
exam.forEach(function(e)
data.push(JSON.stringify(e));
);
hf_hook.value = data.join("▄");
</script>
</body>
</html>
Thank u so much for your help or ideas!
javascript html
I am doing a program to perform tests, however I have to fulfil a requirement: that the teacher can determine the amount of questions that each test will have. Currently each exam consists of 10 questions but I have no idea what to do or what method to modify to meet this requirement. Any ideas?
Here are my methods for the creation of exams:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
#txt_question
height: 184px;
width: 472px;
.answerBox
width: 400px;
#btn_next0
margin-left: 11px;
</style>
</head>
<body style="height: 500px">
<form id="form1" runat="server">
<div>
Título del Examen:
<asp:TextBox ID="txt_title" runat="server"> </asp:TextBox><br />
<textarea id="txt_question"></textarea> <br />
<div id="here_radios">
<input id="rb_answer0" type="radio" name="answerBtn" value="0" class="answerBtn" /> <input id="txt_answer0" type="text" class="answerBox" /> <br />
<input id="rb_answer1" type="radio" name="answerBtn" value="1" class="answerBtn" /> <input id="txt_answer1" type="text" class="answerBox" /> <br />
<input id="rb_answer2" type="radio" name="answerBtn" value="2" class="answerBtn" /> <input id="txt_answer2" type="text" class="answerBox" /> <br />
</div>
<input id="btn_back" type="button" value="Pregunta Anterior" onclick="goBack()" />
<input id="btn_next" type="button" value="Siguiente Pregunta" onclick="saveJson()" /><input id="btn_cant" type="button" value="Cantidad preguntas" onclick="saveJson()" /><br />
<asp:Button ID="btn_finish" runat="server" Text="Terminar" OnClientClick="cstest()" OnClick="btn_finish_Click" />
</div>
<asp:HiddenField ID="hf_hook" runat="server" />
</form>
<%-- CLIENT CODE --%>
<script>
var exam = ;
var index = 0;
function saveJson()
var data =
var gotAnswers = ;
var radios = here_radios.getElementsByClassName("answerBtn");
var boxes = here_radios.getElementsByClassName("answerBox");
data["pregunta"] = txt_question.value;
data["correcta"] = "0";
for (var i = 0; i < radios.length; i++)
gotAnswers.push(boxes[i].value);
if (radios[i].checked)
data["correcta"] = radios[i].value;
boxes[i].value = "";
data["respuestas"] = gotAnswers;
txt_question.value = "";
exam[index] = data;
index++;
if (typeof exam[index] !== 'undefined')
populate(index);
function goBack()
if (index > 0)
index--;
populate(index);
function populate(index)
var radios = here_radios.getElementsByClassName("answerBtn");
var boxes = here_radios.getElementsByClassName("answerBox");
txt_question.value = exam[index].pregunta;
for (var i = 0; i < exam[index].respuestas.length; i++)
boxes[i].value = exam[index].respuestas[i];
radios[i].checked = (exam[index].correcta == i);
function cstest()
saveJson();
var data = ;
exam.forEach(function(e)
data.push(JSON.stringify(e));
);
hf_hook.value = data.join("▄");
</script>
</body>
</html>
Thank u so much for your help or ideas!
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
#txt_question
height: 184px;
width: 472px;
.answerBox
width: 400px;
#btn_next0
margin-left: 11px;
</style>
</head>
<body style="height: 500px">
<form id="form1" runat="server">
<div>
Título del Examen:
<asp:TextBox ID="txt_title" runat="server"> </asp:TextBox><br />
<textarea id="txt_question"></textarea> <br />
<div id="here_radios">
<input id="rb_answer0" type="radio" name="answerBtn" value="0" class="answerBtn" /> <input id="txt_answer0" type="text" class="answerBox" /> <br />
<input id="rb_answer1" type="radio" name="answerBtn" value="1" class="answerBtn" /> <input id="txt_answer1" type="text" class="answerBox" /> <br />
<input id="rb_answer2" type="radio" name="answerBtn" value="2" class="answerBtn" /> <input id="txt_answer2" type="text" class="answerBox" /> <br />
</div>
<input id="btn_back" type="button" value="Pregunta Anterior" onclick="goBack()" />
<input id="btn_next" type="button" value="Siguiente Pregunta" onclick="saveJson()" /><input id="btn_cant" type="button" value="Cantidad preguntas" onclick="saveJson()" /><br />
<asp:Button ID="btn_finish" runat="server" Text="Terminar" OnClientClick="cstest()" OnClick="btn_finish_Click" />
</div>
<asp:HiddenField ID="hf_hook" runat="server" />
</form>
<%-- CLIENT CODE --%>
<script>
var exam = ;
var index = 0;
function saveJson()
var data =
var gotAnswers = ;
var radios = here_radios.getElementsByClassName("answerBtn");
var boxes = here_radios.getElementsByClassName("answerBox");
data["pregunta"] = txt_question.value;
data["correcta"] = "0";
for (var i = 0; i < radios.length; i++)
gotAnswers.push(boxes[i].value);
if (radios[i].checked)
data["correcta"] = radios[i].value;
boxes[i].value = "";
data["respuestas"] = gotAnswers;
txt_question.value = "";
exam[index] = data;
index++;
if (typeof exam[index] !== 'undefined')
populate(index);
function goBack()
if (index > 0)
index--;
populate(index);
function populate(index)
var radios = here_radios.getElementsByClassName("answerBtn");
var boxes = here_radios.getElementsByClassName("answerBox");
txt_question.value = exam[index].pregunta;
for (var i = 0; i < exam[index].respuestas.length; i++)
boxes[i].value = exam[index].respuestas[i];
radios[i].checked = (exam[index].correcta == i);
function cstest()
saveJson();
var data = ;
exam.forEach(function(e)
data.push(JSON.stringify(e));
);
hf_hook.value = data.join("▄");
</script>
</body>
</html>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
#txt_question
height: 184px;
width: 472px;
.answerBox
width: 400px;
#btn_next0
margin-left: 11px;
</style>
</head>
<body style="height: 500px">
<form id="form1" runat="server">
<div>
Título del Examen:
<asp:TextBox ID="txt_title" runat="server"> </asp:TextBox><br />
<textarea id="txt_question"></textarea> <br />
<div id="here_radios">
<input id="rb_answer0" type="radio" name="answerBtn" value="0" class="answerBtn" /> <input id="txt_answer0" type="text" class="answerBox" /> <br />
<input id="rb_answer1" type="radio" name="answerBtn" value="1" class="answerBtn" /> <input id="txt_answer1" type="text" class="answerBox" /> <br />
<input id="rb_answer2" type="radio" name="answerBtn" value="2" class="answerBtn" /> <input id="txt_answer2" type="text" class="answerBox" /> <br />
</div>
<input id="btn_back" type="button" value="Pregunta Anterior" onclick="goBack()" />
<input id="btn_next" type="button" value="Siguiente Pregunta" onclick="saveJson()" /><input id="btn_cant" type="button" value="Cantidad preguntas" onclick="saveJson()" /><br />
<asp:Button ID="btn_finish" runat="server" Text="Terminar" OnClientClick="cstest()" OnClick="btn_finish_Click" />
</div>
<asp:HiddenField ID="hf_hook" runat="server" />
</form>
<%-- CLIENT CODE --%>
<script>
var exam = ;
var index = 0;
function saveJson()
var data =
var gotAnswers = ;
var radios = here_radios.getElementsByClassName("answerBtn");
var boxes = here_radios.getElementsByClassName("answerBox");
data["pregunta"] = txt_question.value;
data["correcta"] = "0";
for (var i = 0; i < radios.length; i++)
gotAnswers.push(boxes[i].value);
if (radios[i].checked)
data["correcta"] = radios[i].value;
boxes[i].value = "";
data["respuestas"] = gotAnswers;
txt_question.value = "";
exam[index] = data;
index++;
if (typeof exam[index] !== 'undefined')
populate(index);
function goBack()
if (index > 0)
index--;
populate(index);
function populate(index)
var radios = here_radios.getElementsByClassName("answerBtn");
var boxes = here_radios.getElementsByClassName("answerBox");
txt_question.value = exam[index].pregunta;
for (var i = 0; i < exam[index].respuestas.length; i++)
boxes[i].value = exam[index].respuestas[i];
radios[i].checked = (exam[index].correcta == i);
function cstest()
saveJson();
var data = ;
exam.forEach(function(e)
data.push(JSON.stringify(e));
);
hf_hook.value = data.join("▄");
</script>
</body>
</html>
javascript html
javascript html
edited Nov 12 at 4:50
Adriano
1,28111123
1,28111123
asked Nov 12 at 2:00
Alvaro Quirós Perez
11
11
2
I don't know C# but this really looks like Javascript?
– CertainPerformance
Nov 12 at 2:02
If your question relates in some way to C#, please indicate clearly how it does. In the meantime I've removed your C# tag since it doesn't make any sense for your question.
– John
Nov 12 at 2:04
10 * exam.length seems right, but maybe too obvious? What's the core problem?
– Jim B.
Nov 12 at 2:09
My problem is that by default the teacher can create 10 questions, however I need that in some way that is defined by the same teacher, if he wants a test to be 5 questions, 7, 9, etc.so do it
– Alvaro Quirós Perez
Nov 12 at 2:16
How do you currently determine how many questions you have?
– John
Nov 12 at 2:32
|
show 3 more comments
2
I don't know C# but this really looks like Javascript?
– CertainPerformance
Nov 12 at 2:02
If your question relates in some way to C#, please indicate clearly how it does. In the meantime I've removed your C# tag since it doesn't make any sense for your question.
– John
Nov 12 at 2:04
10 * exam.length seems right, but maybe too obvious? What's the core problem?
– Jim B.
Nov 12 at 2:09
My problem is that by default the teacher can create 10 questions, however I need that in some way that is defined by the same teacher, if he wants a test to be 5 questions, 7, 9, etc.so do it
– Alvaro Quirós Perez
Nov 12 at 2:16
How do you currently determine how many questions you have?
– John
Nov 12 at 2:32
2
2
I don't know C# but this really looks like Javascript?
– CertainPerformance
Nov 12 at 2:02
I don't know C# but this really looks like Javascript?
– CertainPerformance
Nov 12 at 2:02
If your question relates in some way to C#, please indicate clearly how it does. In the meantime I've removed your C# tag since it doesn't make any sense for your question.
– John
Nov 12 at 2:04
If your question relates in some way to C#, please indicate clearly how it does. In the meantime I've removed your C# tag since it doesn't make any sense for your question.
– John
Nov 12 at 2:04
10 * exam.length seems right, but maybe too obvious? What's the core problem?
– Jim B.
Nov 12 at 2:09
10 * exam.length seems right, but maybe too obvious? What's the core problem?
– Jim B.
Nov 12 at 2:09
My problem is that by default the teacher can create 10 questions, however I need that in some way that is defined by the same teacher, if he wants a test to be 5 questions, 7, 9, etc.so do it
– Alvaro Quirós Perez
Nov 12 at 2:16
My problem is that by default the teacher can create 10 questions, however I need that in some way that is defined by the same teacher, if he wants a test to be 5 questions, 7, 9, etc.so do it
– Alvaro Quirós Perez
Nov 12 at 2:16
How do you currently determine how many questions you have?
– John
Nov 12 at 2:32
How do you currently determine how many questions you have?
– John
Nov 12 at 2:32
|
show 3 more comments
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53255126%2fmethod-to-determine-the-number-of-questions-in-an-exam%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53255126%2fmethod-to-determine-the-number-of-questions-in-an-exam%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
I don't know C# but this really looks like Javascript?
– CertainPerformance
Nov 12 at 2:02
If your question relates in some way to C#, please indicate clearly how it does. In the meantime I've removed your C# tag since it doesn't make any sense for your question.
– John
Nov 12 at 2:04
10 * exam.length seems right, but maybe too obvious? What's the core problem?
– Jim B.
Nov 12 at 2:09
My problem is that by default the teacher can create 10 questions, however I need that in some way that is defined by the same teacher, if he wants a test to be 5 questions, 7, 9, etc.so do it
– Alvaro Quirós Perez
Nov 12 at 2:16
How do you currently determine how many questions you have?
– John
Nov 12 at 2:32