前端考试系统
求一个前端考试系统,前端用vue,后端用python-flask或者node.js.实现一个在线考试的功能。有参考的资源可以发一下。很急,跪求0.o{:1_889:} 可以去github上面看看,很多。 钉钉有免费的呀,公众号小程序也有,不需要自己开发吧 有那么多开源的你不去找,你来这找?而且悬赏也不发 本帖最后由 c4647 于 2023-12-18 13:14 编辑
WTS在线答題平台- 免费版/开源版http://wts.wcpknow.com/
需要自己部署 这是一场战争 发表于 2023-12-18 11:09
钉钉有免费的呀,公众号小程序也有,不需要自己开发吧
那些都是有限制的嘛,需要充钱的。开源的自己搞定维护就简单了 自己刷题这种吗?
https://m.bilibili.com/video/BV1Mu4y1k79a?buvid=XX85E838539534AD650323D79CEE8DA100517&is_story_h5=false&mid=FSMZLyVVbtrPTKay0%2Fc9Fg%3D%3D&p=1&plat_id=116&share_from=ugc&share_medium=android&share_plat=android&share_session_id=bdbc4c31-8ee6-4295-95ae-20815b796a74&share_source=COPY&share_tag=s_i×tamp=1693979787&unique_k=xk20VTP&up_id=634143044&share_times=1 zpy2 发表于 2023-12-19 08:14
自己刷题这种吗?
https://m.bilibili.com/video/BV1Mu4y1k79a?buvid=XX85E838539534AD650323D79CEE8DA100 ...
老哥可以分享下自测题PHP部分的源码吗 忆白学渣 发表于 2023-12-19 08:58
老哥可以分享下自测题PHP部分的源码吗
<?php
if(php_sapi_name()!="cli"){
require $_SERVER["DOCUMENT_ROOT"].'/pdo/eh/a17/visit_log/log_visit.php';
?>
<?php
// Step 1: Connect to the SQLite database
$db = new PDO('sqlite:'.$_SERVER["DOCUMENT_ROOT"].'/db');
// Step 2: Retrieve data from the database table
$query = "SELECT question, correct_answer, option_a, option_b, option_c, option_d FROM questionnaire";
$statement = $db->query($query);
$questions = $statement->fetchAll(PDO::FETCH_ASSOC);
// Step 3: Generate the HTML form dynamically
echo '<form action="process_form.php" method="POST">';
foreach ($questions as $question) {
echo '<p>' . $question['question'] . '</p>';
$correctAnswers = explode(',', $question['correct_answer']);
if(empty($question['option_a'])){
echo '<textarea name="' . $question['question'] . '" ></textarea><br>';
continue;
}
if (count($correctAnswers) > 1) {
// Multiple correct answers, use checkboxes
echo '<input type="checkbox" name="' . $question['question'] . '[]" value="A">' . $question['option_a'] . '<br>';
echo '<input type="checkbox" name="' . $question['question'] . '[]" value="B">' . $question['option_b'] . '<br>';
echo '<input type="checkbox" name="' . $question['question'] . '[]" value="C">' . $question['option_c'] . '<br>';
echo '<input type="checkbox" name="' . $question['question'] . '[]" value="D">' . $question['option_d'] . '<br><br>';
} else {
// Single correct answer, use radio buttons
for($i=0;$i<4;$i++){
if(!empty($question['option_'.chr(ord('a')+$i)] )){
echo '<input type="radio" name="' . $question['question'] . '" value="'.chr(ord("A")+$i).'">' . $question['option_'.chr(ord('a')+$i)] . '<br>';
}
}
/*
echo '<input type="radio" name="' . $question['question'] . '" value="A">' . $question['option_a'] . '<br>';
echo '<input type="radio" name="' . $question['question'] . '" value="B">' . $question['option_b'] . '<br>';
echo '<input type="radio" name="' . $question['question'] . '" value="C">' . $question['option_c'] . '<br>';
echo '<input type="radio" name="' . $question['question'] . '" value="D">' . $question['option_d'] . '<br><br>';
*/
}
}
echo '<input type="submit" value="Submit">';
echo '</form>';
// Step 4: Process form submission in "process_form.php" file
// You need to handle the form submission and check the answers against the correct answers stored in the database.
?>
页:
[1]