Fixing a little things
Took 6 hours 23 minutes
This commit is contained in:
parent
a1b0f7d681
commit
f6d2e3a62a
24
.idea/workspace.xml
generated
24
.idea/workspace.xml
generated
@ -22,8 +22,10 @@
|
|||||||
<list default="true" id="fc13552d-b118-4828-b78f-fc8714e0cfdc" name="Default Changelist" comment="">
|
<list default="true" id="fc13552d-b118-4828-b78f-fc8714e0cfdc" name="Default Changelist" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/config.inc.php" beforeDir="false" afterPath="$PROJECT_DIR$/config.inc.php" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/config.inc.php" beforeDir="false" afterPath="$PROJECT_DIR$/config.inc.php" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/controller/DefaultController.class.inc.php" beforeDir="false" afterPath="$PROJECT_DIR$/controller/DefaultController.class.inc.php" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/controller/FaqController.class.inc.php" beforeDir="false" afterPath="$PROJECT_DIR$/controller/FaqController.class.inc.php" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/templates/faq.tmpl.html" beforeDir="false" afterPath="$PROJECT_DIR$/templates/faq.tmpl.html" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/templates/faq.tmpl.html" beforeDir="false" afterPath="$PROJECT_DIR$/templates/faq.tmpl.html" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/vendor/js/faq.js" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/js/faq.js" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/templates/test.tmpl.html" beforeDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@ -34,7 +36,7 @@
|
|||||||
<execution />
|
<execution />
|
||||||
</component>
|
</component>
|
||||||
<component name="DarkyenusTimeTracker">
|
<component name="DarkyenusTimeTracker">
|
||||||
<option name="totalTimeSeconds" value="93926" />
|
<option name="totalTimeSeconds" value="117043" />
|
||||||
<option name="gitIntegration" value="true" />
|
<option name="gitIntegration" value="true" />
|
||||||
<option name="naggedAbout" value="1" />
|
<option name="naggedAbout" value="1" />
|
||||||
</component>
|
</component>
|
||||||
@ -78,7 +80,7 @@
|
|||||||
<option name="number" value="Default" />
|
<option name="number" value="Default" />
|
||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1601618466935</updated>
|
<updated>1601618466935</updated>
|
||||||
<workItem from="1601618467981" duration="30879000" />
|
<workItem from="1601618467981" duration="33029000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="Initial commit">
|
<task id="LOCAL-00001" summary="Initial commit">
|
||||||
<created>1601618764031</created>
|
<created>1601618764031</created>
|
||||||
@ -122,7 +124,14 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1601724201344</updated>
|
<updated>1601724201344</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="7" />
|
<task id="LOCAL-00007" summary="Final upload, should be running now">
|
||||||
|
<created>1601724613157</created>
|
||||||
|
<option name="number" value="00007" />
|
||||||
|
<option name="presentableId" value="LOCAL-00007" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1601724613157</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="8" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
@ -145,7 +154,8 @@
|
|||||||
<MESSAGE value="Almost done, just the answer system and query is missing" />
|
<MESSAGE value="Almost done, just the answer system and query is missing" />
|
||||||
<MESSAGE value="Almost done, finish line!" />
|
<MESSAGE value="Almost done, finish line!" />
|
||||||
<MESSAGE value="Fixing a bug where the answer is posted directly" />
|
<MESSAGE value="Fixing a bug where the answer is posted directly" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="Fixing a bug where the answer is posted directly" />
|
<MESSAGE value="Final upload, should be running now" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="Final upload, should be running now" />
|
||||||
</component>
|
</component>
|
||||||
<component name="WindowStateProjectService">
|
<component name="WindowStateProjectService">
|
||||||
<state x="728" y="326" width="800" height="683" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1601632929047">
|
<state x="728" y="326" width="800" height="683" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1601632929047">
|
||||||
@ -184,10 +194,10 @@
|
|||||||
<screen x="0" y="34" width="1920" height="1046" />
|
<screen x="0" y="34" width="1920" height="1046" />
|
||||||
</state>
|
</state>
|
||||||
<state x="441" y="192" width="1037" height="736" key="SettingsEditor/0.34.1920.1046@0.34.1920.1046" timestamp="1601632853044" />
|
<state x="441" y="192" width="1037" height="736" key="SettingsEditor/0.34.1920.1046@0.34.1920.1046" timestamp="1601632853044" />
|
||||||
<state x="555" y="292" width="800" height="535" key="Vcs.Push.Dialog.v2" timestamp="1601724202405">
|
<state x="555" y="292" width="800" height="535" key="Vcs.Push.Dialog.v2" timestamp="1601724614655">
|
||||||
<screen x="0" y="34" width="1920" height="1046" />
|
<screen x="0" y="34" width="1920" height="1046" />
|
||||||
</state>
|
</state>
|
||||||
<state x="555" y="292" width="800" height="535" key="Vcs.Push.Dialog.v2/0.34.1920.1046@0.34.1920.1046" timestamp="1601724202405" />
|
<state x="555" y="292" width="800" height="535" key="Vcs.Push.Dialog.v2/0.34.1920.1046@0.34.1920.1046" timestamp="1601724614655" />
|
||||||
<state x="809" y="122" width="639" height="876" key="com.intellij.database.view.ui.AbstractDbRefactoringDialog" timestamp="1601632983240">
|
<state x="809" y="122" width="639" height="876" key="com.intellij.database.view.ui.AbstractDbRefactoringDialog" timestamp="1601632983240">
|
||||||
<screen x="0" y="34" width="1920" height="1046" />
|
<screen x="0" y="34" width="1920" height="1046" />
|
||||||
</state>
|
</state>
|
||||||
|
@ -7,4 +7,5 @@ define( 'MYSQL_PASS', 'RnKVJHcUBIIu1XM2' );
|
|||||||
define( 'MYSQL_DB', 'online-faq' );
|
define( 'MYSQL_DB', 'online-faq' );
|
||||||
|
|
||||||
define( 'CODE_LENGTH', 4 );
|
define( 'CODE_LENGTH', 4 );
|
||||||
define( 'WASTED_TIME', '26hrs and 3mins' );
|
define( 'SHARE_URL_PREFIX', 'https://faq.hw-table.de/?code=' );
|
||||||
|
define( 'WASTED_TIME', '32hrs and 32mins' );
|
||||||
|
@ -16,6 +16,13 @@ class DefaultController
|
|||||||
$view = new Template( 'start' );
|
$view = new Template( 'start' );
|
||||||
$Request = new Request();
|
$Request = new Request();
|
||||||
|
|
||||||
|
$room_code = mb_strtoupper( $Request->getVar( 'code', null, 'GET' ) );
|
||||||
|
if( !empty( $room_code ) )
|
||||||
|
{
|
||||||
|
// Redirect to Join
|
||||||
|
header( 'Location: ?a=joinFAQ&code=' . $room_code );
|
||||||
|
}
|
||||||
|
|
||||||
$view->set_placeholder( 'max_len', CODE_LENGTH );
|
$view->set_placeholder( 'max_len', CODE_LENGTH );
|
||||||
$view->set_placeholder( 'wasted_time', WASTED_TIME );
|
$view->set_placeholder( 'wasted_time', WASTED_TIME );
|
||||||
$reason = $Request->getVar( 'rsn', false, 'GET' );
|
$reason = $Request->getVar( 'rsn', false, 'GET' );
|
||||||
@ -43,6 +50,10 @@ class DefaultController
|
|||||||
$view->set_placeholder( 'max_len', CODE_LENGTH );
|
$view->set_placeholder( 'max_len', CODE_LENGTH );
|
||||||
$view->set_placeholder( 'wasted_time', WASTED_TIME );
|
$view->set_placeholder( 'wasted_time', WASTED_TIME );
|
||||||
$room_code = mb_strtoupper( $Request->getVar( 'code', null, 'POST' ) );
|
$room_code = mb_strtoupper( $Request->getVar( 'code', null, 'POST' ) );
|
||||||
|
if( empty( $room_code ) )
|
||||||
|
{
|
||||||
|
$room_code = mb_strtoupper( $Request->getVar( 'code', null, 'GET' ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if( empty( $room_code ) && !isset( $room_code ) )
|
if( empty( $room_code ) && !isset( $room_code ) )
|
||||||
|
@ -11,6 +11,7 @@ class FaqController extends DefaultController
|
|||||||
|
|
||||||
$view->set_placeholder( 'room_name', $room['name'] );
|
$view->set_placeholder( 'room_name', $room['name'] );
|
||||||
$view->set_placeholder( 'room_code', $room['code'] );
|
$view->set_placeholder( 'room_code', $room['code'] );
|
||||||
|
$view->set_placeholder( 'share_url', SHARE_URL_PREFIX . $room['code'] );
|
||||||
$view->set_placeholder( 'wasted_time', WASTED_TIME );
|
$view->set_placeholder( 'wasted_time', WASTED_TIME );
|
||||||
|
|
||||||
return $view->getHtml();
|
return $view->getHtml();
|
||||||
|
@ -45,11 +45,11 @@
|
|||||||
<a class="nav-link" href="?c=default">Start</a>
|
<a class="nav-link" href="?c=default">Start</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
<a class="nav-link" href="#">This FAQ</a>
|
<a class="nav-link" href="[[SHARE_URL]]">This FAQ</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<form class="form-inline mt-2 mt-md-0">
|
<form class="form-inline mt-2 mt-md-0" action="?c=default&a=JoinFAQ" method="post">
|
||||||
<input class="form-control mr-sm-2" type="text" placeholder="FAQ-Code" aria-label="Join">
|
<input class="form-control mr-sm-2" type="text" maxlength="[[MAX_LEN]]" name="code" placeholder="FAQ-Code" aria-label="Join">
|
||||||
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Join FAQ</button>
|
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Join FAQ</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -150,13 +150,19 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<h1 class="mt-5">Online-FAQ</h1>
|
<h1 class="mt-5">Online-FAQ</h1>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg>">
|
<div class="col-lg-6 col-sm-12 col-md-6 float-left">
|
||||||
<p class="lead">Room <span class="text-info">[[ROOM_NAME]]</span> -
|
<p class="lead">Room <span class="text-info">[[ROOM_NAME]]</span> -
|
||||||
Code <span class="text-info">[[ROOM_CODE]]</span></p>
|
Code <span class="text-info">[[ROOM_CODE]]</span></p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-lg-6 col-sm-12 col-md-6">
|
||||||
|
<label class="float-right col-form-label">
|
||||||
|
Share-URL
|
||||||
|
<input type="text" class="disabled form-control" disabled value="[[SHARE_URL]]" size="28%">
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="col-lg">
|
<div class="col-lg-12">
|
||||||
<button type="button" class="btn btn-primary float-right" data-toggle="modal" data-target="#askQuestionModal">Ask a question</button>
|
<button type="button" class="btn btn-primary float-right" data-toggle="modal" data-target="#askQuestionModal">Ask a question</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,76 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en" class="h-100">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
||||||
<meta name="description" content="">
|
|
||||||
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
|
|
||||||
<meta name="generator" content="Jekyll v3.8.5">
|
|
||||||
<title>Sticky Footer Navbar Template · Bootstrap</title>
|
|
||||||
|
|
||||||
<!-- Bootstrap core CSS -->
|
|
||||||
<link href="vendor/css/bootstrap.min.css" rel="stylesheet"">
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.bd-placeholder-img {
|
|
||||||
font-size: 1.125rem;
|
|
||||||
text-anchor: middle;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
.bd-placeholder-img-lg {
|
|
||||||
font-size: 3.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<!-- Custom styles for this template -->
|
|
||||||
<link href="vendor/css/sticky-footer-navbar.css" rel="stylesheet">
|
|
||||||
</head>
|
|
||||||
<body class="d-flex flex-column h-100">
|
|
||||||
<header>
|
|
||||||
<!-- Fixed navbar -->
|
|
||||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
|
||||||
<a class="navbar-brand" href="#">Online-FAQ</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
<div class="collapse navbar-collapse" id="navbarCollapse">
|
|
||||||
<ul class="navbar-nav mr-auto">
|
|
||||||
<li class="nav-item active">
|
|
||||||
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="#">Create new FAQ</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<form class="form-inline mt-2 mt-md-0">
|
|
||||||
<input class="form-control mr-sm-2" type="text" placeholder="FAQ-Code" aria-label="Join">
|
|
||||||
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Join FAQ</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<!-- Begin page content -->
|
|
||||||
<main role="main" class="flex-shrink-0">
|
|
||||||
<div class="container">
|
|
||||||
<h1 class="mt-5">Online-FAQ</h1>
|
|
||||||
<p class="lead">Collect your database of questions and have them answered directly by your teacher.</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer class="footer mt-auto py-3">
|
|
||||||
<div class="container">
|
|
||||||
<span class="text-muted">Online-FAQ<br>Programmed by Tobias Hopp</span>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
<script src="vendor/js/jquery-slim.min.js"></script>
|
|
||||||
<script src="vendor/js/bootstrap.bundle.min.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
x
Reference in New Issue
Block a user