This commit is contained in:
2020-04-19 11:42:30 -04:00
parent 61d47f14de
commit 3b65cc6784
6 changed files with 121 additions and 33 deletions
+85 -2
View File
@@ -431,21 +431,45 @@ class Member extends Member_Controller {
case "room":
$this->roomPage();
break;
case "grading":
$this->roomGrading();
break;
}
}
}
private function studentPage() {
$data = [];
// $data = $this->getMemberCarpoolReport($member_id, $data);
$mysql = "SELECT * FROM members_subscribers WHERE member_id = " . $_SESSION["member_id"];
$query = $this->db->query($mysql);
$data['subscriber_data'] = $query->result_array();
$this->load->view('member/rooms/view_student', $data);
}
private function roomPage() {
$this->load->library('table');
$this->table->set_template($this->template);
$data = [];
$member_id = $_SESSION["member_id"];
$q = "SELECT room_name,'<button type=\"button\" onclick=\"ViewRoom('||id||', '||room_id||');\" class=\"btn btn-primary btn-sm\">View</button>' AS action FROM members_rooms WHERE member_id = " . $_SESSION["member_id"] . " AND status = 1 ORDER by id DESC";
//e cho $q;
$query = $this->db->query($q);
$this->table->set_heading('Room Name', array('data' => '', 'style' => 'width:90px'));
$data['room_table'] = $this->table->generate($query);
// $data = $this->getMemberSubscribersReport($member_id, $data);
$this->load->view('member/rooms/view_rooms', $data);
}
private function roomGrading() {
$data = [];
$member_id = $_SESSION["member_id"];
$data = $this->getMemberSubscribersReport($member_id, $data);
$this->load->view('member/rooms/view_rooms', $data);
$this->load->view('member/rooms/view_grading', $data);
}
private function getMemberSubscribersReport($member_id, &$data) {
@@ -461,4 +485,63 @@ class Member extends Member_Controller {
return $data;
}
public function addNewSubscriber() {
if ($_GET) {
$firstname = $data['firstname'] = trim($this->input->get('firstname'));
$lastname = $data['lastname'] = trim($this->input->get('lastname'));
$email = $data['email'] = trim($this->input->get('email'));
// echo "Ameye Here " . rand(100, 888) . $firstname;
$sub_id = rand(100000000, 9999999999);
$values = [
"member_id" => "" . $_SESSION["member_id"] . "",
"firstname" => pg_escape_string($firstname),
"lastname" => pg_escape_string($lastname),
"email" => pg_escape_string($email),
"username" => pg_escape_string($email),
"sub_id" => $sub_id,
"status" => "1"
];
if ($firstname != '' && $lastname != '' && $email != '') {
$values = array_filter($values, 'strlen');
$q = "INSERT INTO members_subscribers ";
$q .= " (" . implode(", ", array_keys($values)) . ")";
$q .= " VALUES ('" . implode("', '", $values) . "') ";
$this->db->query($q);
} else {
echo "All fields ar required";
}
}
}
public function addNewRoom() {
if ($_GET) {
$room_name = $data['room_name'] = trim($this->input->get('room_name'));
$room_id = rand(100000000, 9999999999);
$values = [
"member_id" => "" . $_SESSION["member_id"] . "",
"room_name" => pg_escape_string($room_name),
"room_id" => $room_id,
"status" => "1"
];
if ($room_name != '') {
$values = array_filter($values, 'strlen');
$q = "INSERT INTO members_rooms ";
$q .= " (" . implode(", ", array_keys($values)) . ")";
$q .= " VALUES ('" . implode("', '", $values) . "') ";
$this->db->query($q);
echo "Room Added";
} else {
echo "All fields ar required";
}
}
}
}
+1 -1
View File
@@ -71,7 +71,7 @@ $next_page = isset($next_page) ? $next_page : 0;
<div class="collapse-margin search-content">
<div class="card-header" id="headingFour" role="button" data-toggle="collapse" data-target="#collapseFour" aria-expanded="false" aria-controls="collapseFour">
<span class="lead collapse-title collapsed">
How to Add New
How to Add New Student/subscriber
</span>
</div>
<div id="collapseFour" class="collapse" aria-labelledby="headingFour" data-parent="#accordionExample">
+27 -6
View File
@@ -26,17 +26,38 @@
On the Registration/Login page...As a first time user, you click on the Register button and fill out the quick form to have Dashboard all set.
Returning users, login in with your registered email and password and voila! Your Dashboard!
</p>
<p> The Default cards have a Menu, Overview and Introductory video on Coregrade Works!
The Default card has a menu option with a feature to Add New Coregrade Card which enables you to create your very first Card.
<p> As a first-time user, The platform comes with a default card.
You can go ahead to create your very own Learning boards by creating your Cards.
</p>
<p>Once your Card is created, it appears on My Board Page then you go to configure Tab, this helps to add more Cards to your Board, however, referred to as Pages
Once your New Page (using Configure Tab) is created for The NEW CARD (appears on My Board). It shows on both My Board and configure TAB page.
However, on this Configure Tab, you can view the list of Pages (CARDs) created(BOARD)right there, you can go directly to the Page, Share your Page if completed and desired and Delete once all studied </p>
<p>HOW DO I CREATE MY CARDS
Click on the Default Page to start, then go to the Menu Option and click on ADD NEW COREGRADE CARD and fill in the Title and Description column and ADD PAGE. VIOLA! CARD CREATED! </p>
<p>The "Manage" feature is imbedded after your Card is created and configured; it helps you determine how you want to go about your learning...Manage makes you itemize a particular Learning card into simplification...What you want to do relating to the Card you created such as; I want to upload XYZ video to urge my learning, What to study first, Task to do and which is completed Task.</p>
<p>The Default cards have a Menu, Overview and Introductory video on how Coregrade Works!</p>
<p>
The Menu Option
The menu has a list of functions to make it all personal.
They include the ability to create a Fresh New card on your Board,
sharing your creative Card with a friend like a study buddy and things you plan to learn.
</p>
<p>
Once, Card is created, it appears on My Board Page then you go to configure Tab, this helps to Add more Cards to your Board, however, referred to as Pages.
<p>
HOW TO ADD TO MY CARDS
There are a few ways to do these; one way is to go to the Configure Tab, there appear Two columns-- ADD NEW PAGE AND MY PAGES. Move to the Add New Page Section and fill in the requirements, there, you have it! NEW CARD ADDED.
</p>
<p>
Once the NEW CARD is added, you have access to Manage your Page.
HOW TO MANAGE MY CARD
Select your Card, toggle between the added features - Adding Notes to Card, video uploads, Action Item; listing what to study first, Todo Task on that particular Card, Forum; for more comprehension as it seems, not leaving out where Resources and Research; where learning materials are gathered from for easy referencing.
Your Learning, Your Dashboard, Your Pattern. You craft What you want to learn and how you want to.
</p>
<p>
HOW TO SHARE MY PAGE
The sharing Feature is in the configure Tab; My pages list, select the Page you desire to share, and there is a command to share your Page. Once clicked, a prompt window page will display, and there you follow on how you want it shared either privately or publicly. However, public Page share does have an expiration.
</p>
<fieldset class="form-label-group">
<input type="text" class="form-control" id="user-email" placeholder="Email" required>
@@ -0,0 +1 @@
grading
@@ -1,6 +1,3 @@
<?
//print_r($page_card);
?>
<!-- BEGIN: Content-->
<div class="app-content content">
@@ -15,7 +12,7 @@
<div class="row">
<div class="col-xl-4 col-md-12 col-sm-12">
<div class="col-xl-3 col-md-12 col-sm-12">
<!-- Basic Tables start -->
<div class="row" id="basic-table">
@@ -31,20 +28,14 @@
<tbody>
<tr>
<td><a href="#" onclick="viewRoom('student');" >Student / Subscribers</a> </td>
</tr>
<tr>
<td><a href="#" onclick="viewRoom('room');" >Group / Classroom</a> </td>
</tr>
<!-- tr>
<td><a href="#" onclick="viewRoom('');" >Clementine Bauch</a> </td>
</tr -->
<tr>
<td><a href="#" onclick="viewRoom('grading');" >Grades</a> </td>
</tr>
</tbody>
</table>
</div>
@@ -53,16 +44,8 @@
</div>
</div>
<!-- Basic Tables end -->
</div>
<div class="col-xl-8 col-md-6 col-sm-12">
<div class="col-xl-9 col-md-6 col-sm-12">
<div class="card">
<div class="card-content">
@@ -96,7 +79,7 @@
<script type="text/javascript">
<!--
function viewRoom( page_id ) {
function viewRoom(page_id) {
$('#share_detail').html('Processing...');
$('#acc' + page_id).prop('disabled', true);
@@ -17,7 +17,7 @@ $menu_items = array(
<meta name="author" content="PIXINVENT">
<title>CoreGrade</title>
<link rel="apple-touch-icon" href="/assets2/images/ico/apple-icon-120.png">
<link rel="shortcut icon" type="image/x-icon" href="/assets2/images/ico/favicon.ico">
<link rel="shortcut icon" type="image/png" href="/assets/img/coregrade.ico">
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600" rel="stylesheet">
<meta http-equiv="refresh" content="9600;url=/auth?action=go_logout">