commit

parent f8f6dc82
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/../../../../:\Project 2\20_21-j09\.idea/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="1a1b2fc9-e664-4b80-be31-181ccebefc6b" name="Default Changelist" comment="" />
<list default="true" id="ca44b582-c7f1-4175-9f9c-f75324e8a7b5" name="Default Changelist" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ComposerSettings" doNotAsk="true" notifyAboutMissingVendor="false" synchronizationState="SYNCHRONIZE">
<component name="ComposerSettings" doNotAsk="true" synchronizationState="SYNCHRONIZE">
<pharConfigPath>$PROJECT_DIR$/Core/composer.json</pharConfigPath>
<execution />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1oWtJvtQpBvUxAtaOzVAcRrQtYq" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectId" id="1oWxfXxQHHsYWE98DOnMGGxo6zc" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
......@@ -24,43 +23,28 @@
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../Project 3/20_21-j09" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.selected.package.eslint" value="(autodetect)" />
<property name="nodejs_package_manager_path" value="yarn" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="1a1b2fc9-e664-4b80-be31-181ccebefc6b" name="Default Changelist" comment="" />
<created>1613414107534</created>
<changelist id="ca44b582-c7f1-4175-9f9c-f75324e8a7b5" name="Default Changelist" comment="" />
<created>1613416252047</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1613414107534</updated>
<workItem from="1613414111905" duration="2105000" />
<workItem from="1620655555354" duration="2608000" />
<workItem from="1620716105732" duration="1197000" />
<workItem from="1621334448092" duration="13000" />
<workItem from="1621595064868" duration="16000" />
<workItem from="1621887354021" duration="132000" />
<workItem from="1621887808551" duration="54000" />
<workItem from="1621887964286" duration="8000" />
<workItem from="1621888304268" duration="14000" />
<workItem from="1621926006496" duration="33000" />
<workItem from="1621926410717" duration="8000" />
<workItem from="1624999179156" duration="360000" />
<workItem from="1624999713528" duration="30000" />
<workItem from="1625431857632" duration="186000" />
<workItem from="1625432234857" duration="334000" />
<workItem from="1625686864504" duration="999000" />
<workItem from="1625689044297" duration="15000" />
<workItem from="1625689100430" duration="17000" />
<workItem from="1625777539136" duration="790000" />
<workItem from="1625827836141" duration="891000" />
<workItem from="1625830603744" duration="3518000" />
<workItem from="1625842021461" duration="100000" />
<workItem from="1625843876090" duration="350000" />
<updated>1613416252047</updated>
<workItem from="1613416253568" duration="644000" />
<workItem from="1620655471394" duration="78000" />
<workItem from="1620658961232" duration="2268000" />
<workItem from="1620716053981" duration="45000" />
<workItem from="1625685698788" duration="1170000" />
<workItem from="1625828729836" duration="1870000" />
<workItem from="1625853862622" duration="964000" />
<workItem from="1625855719201" duration="892000" />
</task>
<servers />
</component>
......
APP_NAME=Lumen
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_TIMEZONE=UTC
LOG_CHANNEL=stack
LOG_SLACK_WEBHOOK_URL=
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Activities;
use App\Models\Feedback;
use App\Models\ResultSummary;
use DB;
use Log;
class ActivitiesController extends Controller {
public function getActivities($id) {
try {
$activities = Feedback::Where('parent_id',$id)->get();
return response()->json([ 'activities' => $activities], 200);
} catch ( \Exception $e ) {
Log::error( $e );
return response()->json( ['message' => $e->getmessage()], 500 );
}
}
public function getMarks($id) {
try {
$summary = ResultSummary::Where('student_id',$id)->get();
return response()->json([ 'summary' => $summary], 200);
} catch ( \Exception $e ) {
Log::error( $e );
return response()->json( ['message' => $e->getmessage()], 500 );
}
}
public function create( Request $request ) {
try {
DB::beginTransaction();
$activities = new Feedback();
$activities->name = $request->name;
$activities->parent_id = $request->parent_id;
$activities->feedback = $request->feedback;
$activities->subject = $request->subject;
$activities->date = $request->date;
$activities->time = $request->time;
$activities->save();
DB::commit();
return response()->json([ 'activities' => $activities, 'message' => 'saved' ], 200 );
} catch (\Exception $e) {
DB::rollBack();
Log::error($e);
return response()->json([ 'message' => $e->getmessage() ], 500);
}
}
}
......@@ -2,10 +2,7 @@
namespace App\Http\Controllers;
use App\Models\Activity;
use App\Models\Feedback;
use App\Models\Admin;
use App\Models\Parents;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
......@@ -21,26 +18,10 @@ class CommonController extends Controller
//
}
public function getActivityCount() {
return response()->json( ['activityCount'=> Activity::count()] );
}
public function getCommentCount() {
return response()->json( ['commentCount'=> Feedback::count()] );
}
public function login(Request $request) {
$user = Admin::Where('username',$request->email)
$user = Parents::Where('email',$request->email)
->Where('password',$request->password)->first();
return response()->json( ['user'=> $user],200 );
}
public function getActivityChatData() {
$counts = DB::table('activities')
->select(DB::raw('count(student_id) as count, type'))
->groupBy('type')
->get();
return response()->json( ['counts' => $counts] );
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Conversations;
use App\Models\Parents;
use App\Models\ConversationGroups;
use DB;
use Log;
class ConversationsController extends Controller {
public function create( Request $request ) {
try {
DB::beginTransaction();
if ( $request->conversation_group_id == null ) {
$conversation_groups = new ConversationGroups();
$conversation_groups->sender_id = $request->sender_id;
$conversation_groups->receiver_id = $request->receiver_id;
$conversation_groups->is_archive = 0;
$conversation_groups->save();
$conversation_groups_id = $conversation_groups->id;
}
$conversations = new Conversations();
$conversations->conversation_group_id = $request->conversation_group_id == null ? $conversation_groups->id : $request->conversation_group_id;
$conversations->sender_id = $request->sender_id;
$conversations->receiver_id = $request->receiver_id;
$conversations->message = $request->message;
$conversations->is_read = 0;
$conversations->save();
DB::commit();
return response()->json([ 'conversations' => $conversations, 'message' => 'saved', 'status'=>200 ], 200 );
} catch (\Exception $e) {
DB::rollBack();
Log::error($e);
return response()->json([ 'message' => $e->getmessage(), 'status'=>500 ], 500);
}
}
public function getChatById( $id ) {
try {
$conversations = Conversations::with('sender')->Where( 'conversation_group_id', $id )->get();
return response()->json([ 'conversations' => $conversations], 200);
} catch ( \Exception $e ) {
Log::error( $e );
return response()->json( ['message' => $e->getmessage()], 500 );
}
}
public function feedbacks( $id ) {
try {
$conversations = DB::table('conversations')
->select(DB::raw('count(id) as count, sentimental as type'))
->groupBy('sentimental')
->Where('conversation_group_id',$id)
->get();
return response()->json([ 'results' => $conversations], 200);
} catch ( \Exception $e ) {
Log::error( $e );
return response()->json( ['message' => $e->getmessage()], 500 );
}
}
public function item_create( Request $request ) {
try {
DB::beginTransaction();
$item = new Item();
$item->name = $request->name;
$item->type = $request->type;
$item->qty = $request->qty;
$item->save();
DB::commit();
// return response()->json([ 'conversations' => $conversations, 'message' => 'saved', 'status'=>200 ], 200 );
} catch (\Exception $e) {
DB::rollBack();
Log::error($e);
// return response()->json([ 'message' => $e->getmessage(), 'status'=>500 ], 500);
}
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Quiz;
use App\Models\QuizRecord;
use App\Models\ResultSummary;
use App\Models\ActivityMaster;
use App\Models\User;
use DB;
use Log;
class QuizController extends Controller {
/**
* Get all students
*/
public function get_all() {
try {
$quiz_records = QuizRecord::get() ;
return response()->json([ 'quiz_records' => $quiz_records], 200);
} catch ( \Exception $e ) {
Log::error( $e );
return response()->json( ['message' => $e->getmessage()], 500 );
}
}
public function getActivityMaster() {
try {
$data = ActivityMaster::get() ;
return response()->json( $data, 200);
} catch ( \Exception $e ) {
return response()->json( ['message' => $e->getmessage()], 500 );
}
}
public function getActivityMasterById($id) {
try {
$data = ActivityMaster::Where('activity_id',$id)->first();
return response()->json( $data, 200);
} catch ( \Exception $e ) {
return response()->json( ['message' => $e->getmessage()], 500 );
}
}
// /**
// * Get all students count
// */
// public function get_count() {
// try {
// $quiz_counts = QuizRecord::count() ;
// return response()->json([ 'quiz_counts' => $quiz_counts], 200);
// } catch ( \Exception $e ) {
// Log::error( $e );
// return response()->json( ['message' => $e->getmessage()], 500 );
// }
// }
/**
* Get student by gender
*/
public function search( Request $request ) {
$search = $request->search;
// $Students = Quiz::where('name','LIKE',"%{$search}%")
// ->orWhere('rollno', 'LIKE',"%{$search}%")
// ->orWhere('branch', 'LIKE',"%{$search}%")
// ->orWhere('phno', 'LIKE',"%{$search}%")
// ->orWhere('username', 'LIKE',"%{$search}%")
// ->get();
// return response()->json( $Quiz );
}
public function get_players_count() {
try {
$players_count = User::count() ;
return response()->json([ 'players_count' => $players_count], 200);
} catch ( \Exception $e ) {
Log::error( $e );
return response()->json( ['message' => $e->getmessage()], 500 );
}
}
public function get_quiz_count() {
try {
$quiz_count = User::count() ;
return response()->json([ 'quiz_count' => $quiz_count], 200);
} catch ( \Exception $e ) {
Log::error( $e );
return response()->json( ['message' => $e->getmessage()], 500 );
}
}
public function get_avg_time() {
try {
$QuizRecord = QuizRecord::get();
$QuizRecordCount = QuizRecord::count();
$duration = 0;
$avg_time = 0;
foreach ($QuizRecord as $item) {
$duration += $item->duration;
}
$avg_time = $duration/$QuizRecordCount;
return response()->json([ 'avg_time' => $avg_time], 200);
} catch ( \Exception $e ) {
Log::error( $e );
return response()->json( ['message' => $e->getmessage()], 500 );
}
return response()->json( $players_count );
}
public function help_needed_students() {
$help_needed_students = [
0 => [
'name' => 'Dilhara',
'marks' => 15
],
1 => [
'name' => 'Chamath',
'marks' => 23
],
];
return response()->json( $help_needed_students );
}
public function difficult_quiz() {
$difficult_quiz = [
0 => [
'quiz' => 'What is this?',
],
1 => [
'quiz' => 'When it happened?',
],
];
return response()->json( $difficult_quiz );
}
public function getCompletedStudents($id) {
$count = DB::table('tbl_student')
->leftJoin('activities', 'tbl_student.student_id', '=', 'activities.student_id')
->select(DB::raw('count(activities.student_id)*100/count(tbl_student.student_id) as count'))
->Where('activities.activity_id',$id)
->first();
return response()->json( ['count'=>$count] );
}
public function getRankings($id) {
$ranking = DB::table('tbl_result_summary')
->select(DB::raw('count(student_id) as count, grade'))
->groupBy('grade')
->Where('activity_id',$id)
->get();
return response()->json( $ranking );
}
public function getLowStudents($id) {
$students = ResultSummary::with('info')
->Where('marks' ,'<=', '30')
->Where('activity_id',$id)
->get();
return response()->json( ['students' => $students] );
}
public function getDiffQuiz( $id ) {
try {
$quiz = DB::table('tbl_question')
->join('tbl_result', function($join)
{
$join->on('tbl_question.question_id', '=', 'tbl_result.question_id');
$join->on('tbl_result.user_answer', '!=', 'tbl_result.right_answer');
})
->select('tbl_question.*')
->Where('activity_id', $id)->distinct()->get();
return response()->json([ 'quiz' => $quiz], 200);
} catch ( \Exception $e ) {
return response()->json( ['message' => $e->getmessage()], 500 );
}
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\QuizRecord;
use App\Models\Students;
use App\Models\User;
use DB;
use Log;
class QuizRecordController extends Controller {
public function quiz_records(Request $request) {
try {
$quiz_records = QuizRecord::where('date',$request->date)->get();
return response()->json([ 'quiz_records' => $quiz_records], 200);
} catch ( \Exception $e ) {
Log::error( $e );
return response()->json( ['message' => $e->getmessage()], 500 );
}
}
public function get_user_info( $id ) {
try {
$user = Students::where('student_id', $id)->first();
return response()->json([ 'user' => $user], 200);
} catch ( \Exception $e ) {
Log::error( $e );
return response()->json( ['message' => $e->getmessage()], 500 );
}
}
public function get_avg_time() {
try {
$QuizRecord = QuizRecord::get();
$QuizRecordCount = QuizRecord::count();
$duration = 0;
$avg_time = 0;
foreach ($QuizRecord as $item) {
$duration += $item->duration;
}
$avg_time = $duration/$QuizRecordCount;
response()->json( $avg_time );
// return response()->json([ 'avg_time' => $avg_time], 200);
} catch ( \Exception $e ) {
Log::error( $e );
return response()->json( ['message' => $e->getmessage()], 500 );
}
//return response()->json( $players_count );
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Students;
use App\Models\Prediction;
use App\Models\ResultSummary;
use Illuminate\Support\Facades\DB;
class StudentsController extends Controller {
/**
* Get all students
*/
public function get_all() {
try {
$students = Students::all();
return response()->json([ 'students' => $students], 200);
} catch ( \Exception $e ) {
//Log::error( $e );
return response()->json( ['message' => $e->getmessage()], 500 );
}
}
/**
* Get student by id
*/
public function get_by_id( $id ) {
return response()->json( Students::where('student_id' , $id)->first());
}
/**
* Get all students count
*/
public function get_count() {
return response()->json( Students::count() );
}
/**
* Get student by gender
*/
public function search( Request $request ) {
$search = $request->search;
$Students = Students::where('name','LIKE',"%{$search}%")
->orWhere('rollno', 'LIKE',"%{$search}%")
->orWhere('branch', 'LIKE',"%{$search}%")
->orWhere('phno', 'LIKE',"%{$search}%")
->orWhere('username', 'LIKE',"%{$search}%")
->get();
return response()->json( $Students );
}
public function get_attendance($sId) {
$counts = DB::select(DB::raw('select count(attendanceid) as count from attendance where MONTH(date) = month(CURRENT_DATE) and student_id = '.$sId));
return response()->json($counts);
}
public function get_works($id) {
$works = ResultSummary::Where('student_id',$id)->orderByDesc('added_date')->first();
return response()->json( $works );
}
public function get_last_performamce($sId) {
// $performance = [
// 0 => [
// 'subject' => 'English',
// 'marks' => 80
// ],
// 1 => [
// 'subject' => 'ICT',
// 'marks' => 90
// ],
// ];
$performance = DB::table('activities')
->select(DB::raw('count(marks) as marks, type as subject'))
->groupBy('type')
->Where('student_id',$sId)
->get();
return response()->json( $performance );
}
public function getPredictedData( $id ) {
return response()->json( ['result' => Prediction::where('student_id' , $id)->get()]);
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\StudyMeterials;
use DB;
use Log;
class StudyMeterialsController extends Controller {
public function lessons($type) {
try {
if ($type == 0) {
$lessons = StudyMeterials::where('subject','Mathematics')->get();
}else{
$lessons = StudyMeterials::where('subject','Science')->get();
}
return response()->json([ 'lessons' => $lessons], 200);
} catch ( \Exception $e ) {
Log::error( $e );
return response()->json([ 'message' => $e->getmessage()], 500 );
}
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Conversations;
use App\Models\ConversationGroups;
use DB;
use Log;
class VideoController extends Controller {
public function get_video( ) {
$video_url = "https://www.youtube.com/embed/nJqjQt_ySr0";
return response()->json( $video_url );
}
}
......@@ -4,14 +4,11 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Activity extends Model {
class Activities extends Model {
protected $table = 'activities';
protected $fillable = [
'activity_id',
'student_id',
'level',
'type',
'user_id',
'content',
'date_time',
];
......
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ActivityMaster extends Model {
protected $table = 'activity_master';
protected $fillable = [
'activity_id',
'activity_title',
'subject',
'no_of_students',
'avg_time',
'no_of_quiz'
];
public $timestamps = false;
}
......@@ -4,11 +4,13 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Prediction extends Model {
class ConversationGroups extends Model {
protected $table = 'student_prediction';
protected $table = 'conversation_groups';
protected $fillable = [
'student_id', 'actual', 'predicted'
'sender_id',
'receiver_id',
'is_archive',
];
public $timestamps = false;
public $timestamps = true;
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Conversations extends Model {
protected $table = 'conversations';
protected $fillable = [
'conversation_group_id',
'sender_id',
'receiver_id',
'message',
'is_read',
'sentimental',
];
public $timestamps = true;
public function sender()
{
return $this->belongsTo('App\Models\Parents', 'sender_id', 'parent_id');
}
}
......@@ -13,7 +13,10 @@ class Feedback extends Model {
'subject',
'feedback',
'date',
'time',
'time'
];
public $timestamps = false;
}
......@@ -4,21 +4,19 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class History extends Model {
class Parents extends Model {
protected $table = 'history';
protected $table = 'tbl_parent';
protected $fillable = [
'parent_id',
'student_id',
'first_name',
'last_name',
'email',
'username',
'eid',
'score',
'score',
'level',
'correct',
'wrong',
'date',
'timestamp',
'status',
'score_updated'
'contact',
'address',
'gender'
];
public $timestamps = false;
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Quiz extends Model {
protected $table = 'quiz';
protected $fillable = [
];
public $timestamps = false;
}
......@@ -9,11 +9,12 @@ class QuizRecord extends Model {
protected $table = 'quizrecord';
protected $fillable = [
'recid',
'rollno',
'rollnum',
'duration',
'endtime',
'date',
'url'
'url',
'type'
];
public $timestamps = false;
}
......@@ -16,9 +16,4 @@ class ResultSummary extends Model {
'subject',
];
public $timestamps = false;
public function info()
{
return $this->belongsTo('App\Models\Students', 'student_id', 'student_id');
}
}
......@@ -4,13 +4,13 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Admin extends Model {
class StudyMeterials extends Model {
protected $table = 'admin';
protected $table = 'lessons';
protected $fillable = [
'id',
'username',
'password'
'subject',
'topic',
'content'
];
public $timestamps = false;
}
......@@ -19,7 +19,7 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac
* @var array
*/
protected $fillable = [
'name', 'email', 'rollno', 'branch','gender','phno','username'
'name', 'email',
];
/**
......
<?php
if (!function_exists('public_path')) {
/**
* Get the path to the public folder.
*
* @param string $path
* @return string
*/
function public_path($path = '')
{
return env('PUBLIC_PATH', base_path('public')) . ($path ? '/' . $path : $path);
}
}
\ No newline at end of file
......@@ -18,7 +18,10 @@
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"files": [
"app/helpers.php"
]
},
"autoload-dev": {
"classmap": [
......
......@@ -8,26 +8,26 @@
"packages": [
{
"name": "brick/math",
"version": "0.9.2",
"version": "0.9.1",
"source": {
"type": "git",
"url": "https://github.com/brick/math.git",
"reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0"
"reference": "283a40c901101e66de7061bd359252c013dcc43c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/brick/math/zipball/dff976c2f3487d42c1db75a3b180e2b9f0e72ce0",
"reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0",
"url": "https://api.github.com/repos/brick/math/zipball/283a40c901101e66de7061bd359252c013dcc43c",
"reference": "283a40c901101e66de7061bd359252c013dcc43c",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": "^7.1 || ^8.0"
"php": "^7.1|^8.0"
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.2",
"phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0",
"vimeo/psalm": "4.3.2"
"phpunit/phpunit": "^7.5.15|^8.5",
"vimeo/psalm": "^3.5"
},
"type": "library",
"autoload": {
......@@ -52,7 +52,7 @@
],
"support": {
"issues": "https://github.com/brick/math/issues",
"source": "https://github.com/brick/math/tree/0.9.2"
"source": "https://github.com/brick/math/tree/master"
},
"funding": [
{
......@@ -60,7 +60,7 @@
"type": "tidelift"
}
],
"time": "2021-01-20T22:51:39+00:00"
"time": "2020-08-18T23:57:15+00:00"
},
{
"name": "doctrine/inflector",
......@@ -434,7 +434,7 @@
},
{
"name": "illuminate/auth",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/auth.git",
......@@ -491,7 +491,7 @@
},
{
"name": "illuminate/broadcasting",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/broadcasting.git",
......@@ -547,7 +547,7 @@
},
{
"name": "illuminate/bus",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/bus.git",
......@@ -600,16 +600,16 @@
},
{
"name": "illuminate/cache",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/cache.git",
"reference": "62933606323b1c6197b7e012ef3d1a3c179f97bb"
"reference": "35dcb2c593ce95c85456da7b3a13e36ff460f535"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/cache/zipball/62933606323b1c6197b7e012ef3d1a3c179f97bb",
"reference": "62933606323b1c6197b7e012ef3d1a3c179f97bb",
"url": "https://api.github.com/repos/illuminate/cache/zipball/35dcb2c593ce95c85456da7b3a13e36ff460f535",
"reference": "35dcb2c593ce95c85456da7b3a13e36ff460f535",
"shasum": ""
},
"require": {
......@@ -653,20 +653,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-01-20T14:18:13+00:00"
"time": "2020-12-26T15:57:28+00:00"
},
{
"name": "illuminate/collections",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/collections.git",
"reference": "3c968b76c395c4ac94d378d4bdeea1af0e8ad44c"
"reference": "c9227225ac1cc298bee78973477bf9c4692e8f83"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/collections/zipball/3c968b76c395c4ac94d378d4bdeea1af0e8ad44c",
"reference": "3c968b76c395c4ac94d378d4bdeea1af0e8ad44c",
"url": "https://api.github.com/repos/illuminate/collections/zipball/c9227225ac1cc298bee78973477bf9c4692e8f83",
"reference": "c9227225ac1cc298bee78973477bf9c4692e8f83",
"shasum": ""
},
"require": {
......@@ -707,11 +707,11 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-01-20T14:16:15+00:00"
"time": "2021-01-15T13:51:46+00:00"
},
{
"name": "illuminate/config",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/config.git",
......@@ -759,7 +759,7 @@
},
{
"name": "illuminate/console",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/console.git",
......@@ -819,7 +819,7 @@
},
{
"name": "illuminate/container",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/container.git",
......@@ -870,16 +870,16 @@
},
{
"name": "illuminate/contracts",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/contracts.git",
"reference": "b91459a9a0bd0de204c3cae6859ebd02dbcee6c6"
"reference": "073109b521aec104f11c5cf5aded97aa0e63f313"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/b91459a9a0bd0de204c3cae6859ebd02dbcee6c6",
"reference": "b91459a9a0bd0de204c3cae6859ebd02dbcee6c6",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/073109b521aec104f11c5cf5aded97aa0e63f313",
"reference": "073109b521aec104f11c5cf5aded97aa0e63f313",
"shasum": ""
},
"require": {
......@@ -914,20 +914,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-01-20T14:18:13+00:00"
"time": "2020-12-18T14:24:20+00:00"
},
{
"name": "illuminate/database",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/database.git",
"reference": "49d9fb12529d9dfee26d98f9331c59791b3f55e9"
"reference": "e0380e1c08aa19baeccae297a2ab958538379d94"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/database/zipball/49d9fb12529d9dfee26d98f9331c59791b3f55e9",
"reference": "49d9fb12529d9dfee26d98f9331c59791b3f55e9",
"url": "https://api.github.com/repos/illuminate/database/zipball/e0380e1c08aa19baeccae297a2ab958538379d94",
"reference": "e0380e1c08aa19baeccae297a2ab958538379d94",
"shasum": ""
},
"require": {
......@@ -982,11 +982,11 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-01-21T14:09:58+00:00"
"time": "2021-01-15T13:33:06+00:00"
},
{
"name": "illuminate/encryption",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/encryption.git",
......@@ -1037,7 +1037,7 @@
},
{
"name": "illuminate/events",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/events.git",
......@@ -1092,7 +1092,7 @@
},
{
"name": "illuminate/filesystem",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/filesystem.git",
......@@ -1154,7 +1154,7 @@
},
{
"name": "illuminate/hashing",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/hashing.git",
......@@ -1202,16 +1202,16 @@
},
{
"name": "illuminate/http",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/http.git",
"reference": "7a52828aca24963676016bf217fecf14301b199d"
"reference": "49b0fbe16708eeea63ce5f71e63ff6e6a695dfc0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/http/zipball/7a52828aca24963676016bf217fecf14301b199d",
"reference": "7a52828aca24963676016bf217fecf14301b199d",
"url": "https://api.github.com/repos/illuminate/http/zipball/49b0fbe16708eeea63ce5f71e63ff6e6a695dfc0",
"reference": "49b0fbe16708eeea63ce5f71e63ff6e6a695dfc0",
"shasum": ""
},
"require": {
......@@ -1256,11 +1256,11 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-01-21T14:09:58+00:00"
"time": "2021-01-05T16:41:31+00:00"
},
{
"name": "illuminate/log",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/log.git",
......@@ -1309,7 +1309,7 @@
},
{
"name": "illuminate/macroable",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/macroable.git",
......@@ -1355,7 +1355,7 @@
},
{
"name": "illuminate/pagination",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/pagination.git",
......@@ -1405,7 +1405,7 @@
},
{
"name": "illuminate/pipeline",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/pipeline.git",
......@@ -1453,16 +1453,16 @@
},
{
"name": "illuminate/queue",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/queue.git",
"reference": "7e6479f3d3db7e8a8473960cce21f82733d768dd"
"reference": "f279735995904e6e24153b47a67973177ed9babb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/queue/zipball/7e6479f3d3db7e8a8473960cce21f82733d768dd",
"reference": "7e6479f3d3db7e8a8473960cce21f82733d768dd",
"url": "https://api.github.com/repos/illuminate/queue/zipball/f279735995904e6e24153b47a67973177ed9babb",
"reference": "f279735995904e6e24153b47a67973177ed9babb",
"shasum": ""
},
"require": {
......@@ -1514,11 +1514,11 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-01-21T14:18:59+00:00"
"time": "2021-01-16T16:54:56+00:00"
},
{
"name": "illuminate/session",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/session.git",
......@@ -1574,7 +1574,7 @@
},
{
"name": "illuminate/support",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/support.git",
......@@ -1641,7 +1641,7 @@
},
{
"name": "illuminate/testing",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/testing.git",
......@@ -1698,7 +1698,7 @@
},
{
"name": "illuminate/translation",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/translation.git",
......@@ -1750,7 +1750,7 @@
},
{
"name": "illuminate/validation",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/validation.git",
......@@ -1809,7 +1809,7 @@
},
{
"name": "illuminate/view",
"version": "v8.24.0",
"version": "v8.23.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/view.git",
......@@ -2537,16 +2537,16 @@
},
{
"name": "ramsey/collection",
"version": "1.1.3",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/ramsey/collection.git",
"reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1"
"reference": "24d93aefb2cd786b7edd9f45b554aea20b28b9b1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ramsey/collection/zipball/28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1",
"reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1",
"url": "https://api.github.com/repos/ramsey/collection/zipball/24d93aefb2cd786b7edd9f45b554aea20b28b9b1",
"reference": "24d93aefb2cd786b7edd9f45b554aea20b28b9b1",
"shasum": ""
},
"require": {
......@@ -2556,19 +2556,19 @@
"captainhook/captainhook": "^5.3",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"ergebnis/composer-normalize": "^2.6",
"fakerphp/faker": "^1.5",
"fzaninotto/faker": "^1.5",
"hamcrest/hamcrest-php": "^2",
"jangregor/phpstan-prophecy": "^0.8",
"jangregor/phpstan-prophecy": "^0.6",
"mockery/mockery": "^1.3",
"phpstan/extension-installer": "^1",
"phpstan/phpstan": "^0.12.32",
"phpstan/phpstan-mockery": "^0.12.5",
"phpstan/phpstan-phpunit": "^0.12.11",
"phpunit/phpunit": "^8.5 || ^9",
"phpunit/phpunit": "^8.5",
"psy/psysh": "^0.10.4",
"slevomat/coding-standard": "^6.3",
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.4"
"vimeo/psalm": "^3.12.2"
},
"type": "library",
"autoload": {
......@@ -2598,19 +2598,15 @@
],
"support": {
"issues": "https://github.com/ramsey/collection/issues",
"source": "https://github.com/ramsey/collection/tree/1.1.3"
"source": "https://github.com/ramsey/collection/tree/1.1.1"
},
"funding": [
{
"url": "https://github.com/ramsey",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/ramsey/collection",
"type": "tidelift"
}
],
"time": "2021-01-21T17:40:04+00:00"
"time": "2020-09-10T20:58:17+00:00"
},
{
"name": "ramsey/uuid",
......@@ -4640,16 +4636,16 @@
},
{
"name": "vlucas/phpdotenv",
"version": "v5.3.0",
"version": "v5.2.0",
"source": {
"type": "git",
"url": "https://github.com/vlucas/phpdotenv.git",
"reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56"
"reference": "fba64139db67123c7a57072e5f8d3db10d160b66"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/b3eac5c7ac896e52deab4a99068e3f4ab12d9e56",
"reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56",
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/fba64139db67123c7a57072e5f8d3db10d160b66",
"reference": "fba64139db67123c7a57072e5f8d3db10d160b66",
"shasum": ""
},
"require": {
......@@ -4664,7 +4660,7 @@
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4.1",
"ext-filter": "*",
"phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5.1"
"phpunit/phpunit": "^7.5.20 || ^8.5.2 || ^9.0"
},
"suggest": {
"ext-filter": "Required to use the boolean validator."
......@@ -4672,7 +4668,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.3-dev"
"dev-master": "5.2-dev"
}
},
"autoload": {
......@@ -4704,7 +4700,7 @@
],
"support": {
"issues": "https://github.com/vlucas/phpdotenv/issues",
"source": "https://github.com/vlucas/phpdotenv/tree/v5.3.0"
"source": "https://github.com/vlucas/phpdotenv/tree/v5.2.0"
},
"funding": [
{
......@@ -4716,7 +4712,7 @@
"type": "tidelift"
}
],
"time": "2021-01-20T15:23:13+00:00"
"time": "2020-09-14T15:57:31+00:00"
},
{
"name": "voku/portable-ascii",
......@@ -4797,12 +4793,12 @@
"version": "1.9.1",
"source": {
"type": "git",
"url": "https://github.com/webmozarts/assert.git",
"url": "https://github.com/webmozart/assert.git",
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
"url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
"shasum": ""
},
......@@ -4840,8 +4836,8 @@
"validate"
],
"support": {
"issues": "https://github.com/webmozarts/assert/issues",
"source": "https://github.com/webmozarts/assert/tree/1.9.1"
"issues": "https://github.com/webmozart/assert/issues",
"source": "https://github.com/webmozart/assert/tree/master"
},
"time": "2020-07-08T17:02:28+00:00"
}
......
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 09, 2021 at 05:12 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `inteljr`
--
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
CREATE TABLE `admin` (
`id` int(100) NOT NULL,
`username` varchar(50) NOT NULL,
`password` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `admin`
--
INSERT INTO `admin` (`id`, `username`, `password`) VALUES
(1, 'inteljr', '1111');
-- --------------------------------------------------------
--
-- Table structure for table `answer`
--
CREATE TABLE `answer` (
`id` int(100) NOT NULL,
`qid` text NOT NULL,
`ansid` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `answer`
--
INSERT INTO `answer` (`id`, `qid`, `ansid`) VALUES
(4, '5b85857d00f34', '5b85857d0ab77'),
(5, '5b85857d333f0', '5b85857d391b2'),
(6, '5b85857d59559', '5b85857d69efd'),
(7, '5b85857d917d6', '5b85857d97980'),
(8, '5b85857db810f', '5b85857dbd701');
-- --------------------------------------------------------
--
-- Table structure for table `conversations`
--
CREATE TABLE `conversations` (
`id` int(11) NOT NULL,
`conversation_group_id` int(11) NOT NULL,
`sender_id` int(11) NOT NULL,
`receiver_id` int(11) NOT NULL,
`message` text NOT NULL,
`is_read` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `conversation_groups`
--
CREATE TABLE `conversation_groups` (
`id` int(11) NOT NULL,
`sender_id` int(11) NOT NULL,
`receiver_id` int(11) NOT NULL,
`is_archive` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `feedback`
--
CREATE TABLE `feedback` (
`id` text NOT NULL,
`name` varchar(50) NOT NULL,
`username` varchar(50) NOT NULL,
`subject` varchar(500) NOT NULL,
`feedback` varchar(500) NOT NULL,
`date` date NOT NULL,
`time` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `feedback`
--
INSERT INTO `feedback` (`id`, `name`, `username`, `subject`, `feedback`, `date`, `time`) VALUES
('5b86784504039', 'pravin', 'fyvgh@vgyvy.in', 'ytiu', 'yty', '2018-08-29', '03:41:09pm');
-- --------------------------------------------------------
--
-- Table structure for table `history`
--
CREATE TABLE `history` (
`id` int(100) NOT NULL,
`username` varchar(50) NOT NULL,
`eid` text NOT NULL,
`score` int(11) NOT NULL,
`level` int(11) NOT NULL,
`correct` int(11) NOT NULL,
`wrong` int(11) NOT NULL,
`date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`timestamp` bigint(50) NOT NULL,
`status` varchar(40) NOT NULL,
`score_updated` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `history`
--
INSERT INTO `history` (`id`, `username`, `eid`, `score`, `level`, `correct`, `wrong`, `date`, `timestamp`, `status`, `score_updated`) VALUES
(1, 'pravin', '5b85847bbe794', 3, 5, 2, 3, '2030-08-29 10:37:59', 1535538968, 'finished', 'true'),
(2, 'sampath', '5b85847bbe794', 11, 5, 4, 1, '2030-08-29 10:39:42', 1535539122, 'finished', 'true');
-- --------------------------------------------------------
--
-- Table structure for table `options`
--
CREATE TABLE `options` (
`id` int(100) NOT NULL,
`qid` varchar(50) NOT NULL,
`option` varchar(5000) NOT NULL,
`optionid` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `options`
--
INSERT INTO `options` (`id`, `qid`, `option`, `optionid`) VALUES
(13, '5b85857d00f34', ' Hello World!Hello World!', '5b85857d0ab77'),
(14, '5b85857d00f34', ' Hello World! * 2', '5b85857d0af5f'),
(15, '5b85857d00f34', 'Hello World!', '5b85857d0b347'),
(16, '5b85857d00f34', 'None of the above.', '5b85857d0b72f'),
(17, '5b85857d333f0', '( \'abcd\', 786 , 2.23, \'john\', 70.2 )', '5b85857d389e2'),
(18, '5b85857d333f0', 'abcd', '5b85857d38dca'),
(19, '5b85857d333f0', '(786, 2.23)', '5b85857d391b2'),
(20, '5b85857d333f0', 'None of the above.', '5b85857d3959a'),
(21, '5b85857d59559', 'int(x [,base])', '5b85857d69b15'),
(22, '5b85857d59559', 'long(x [,base] )', '5b85857d69efd'),
(23, '5b85857d59559', 'float(x)', '5b85857d6a2e5'),
(24, '5b85857d59559', 'str(x)', '5b85857d6a6cd'),
(25, '5b85857d917d6', 'unichr(x)', '5b85857d97980'),
(26, '5b85857d917d6', 'ord(x)', '5b85857d97d68'),
(27, '5b85857d917d6', 'hex(x)', '5b85857d98150'),
(28, '5b85857d917d6', 'oct(x)', '5b85857d98538'),
(29, '5b85857db810f', 'choice(seq)', '5b85857dbd701'),
(30, '5b85857db810f', 'randrange ([start,] stop [,step])', '5b85857dbdae9'),
(31, '5b85857db810f', 'random()', '5b85857dbded1'),
(32, '5b85857db810f', 'seed([x])', '5b85857dbe2b9');
-- --------------------------------------------------------
--
-- Table structure for table `questions`
--
CREATE TABLE `questions` (
`id` int(100) NOT NULL,
`eid` text NOT NULL,
`qid` text NOT NULL,
`qns` text NOT NULL,
`choice` int(10) NOT NULL,
`sn` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `questions`
--
INSERT INTO `questions` (`id`, `eid`, `qid`, `qns`, `choice`, `sn`) VALUES
(4, '5b85847bbe794', '5b85857d00f34', 'What is the output of print str * 2 if str = \'Hello World!\'?', 4, 1),
(5, '5b85847bbe794', '5b85857d333f0', 'What is the output of print tuple[1:3] if tuple = ( \'abcd\', 786 , 2.23, \'john\', 70.2 )?', 4, 2),
(6, '5b85847bbe794', '5b85857d59559', 'Which of the following function convert a string to a long in python?', 4, 3),
(7, '5b85847bbe794', '5b85857d917d6', 'Which of the following function convert an integer to an unicode character in python?', 4, 4),
(8, '5b85847bbe794', '5b85857db810f', 'Which of the following function returns a random item from a list, tuple, or string?', 4, 5);
-- --------------------------------------------------------
--
-- Table structure for table `quiz`
--
CREATE TABLE `quiz` (
`id` int(100) NOT NULL,
`eid` text NOT NULL,
`title` varchar(100) NOT NULL,
`correct` int(11) NOT NULL,
`wrong` int(11) NOT NULL,
`total` int(11) NOT NULL,
`time` bigint(20) NOT NULL,
`date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`status` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `quiz`
--
INSERT INTO `quiz` (`id`, `eid`, `title`, `correct`, `wrong`, `total`, `time`, `date`, `status`) VALUES
(2, '5b85847bbe794', 'sample', 3, 1, 5, 2, '2030-08-29 10:40:38', 'enabled');
-- --------------------------------------------------------
--
-- Table structure for table `rank`
--
CREATE TABLE `rank` (
`id` int(100) NOT NULL,
`username` varchar(50) NOT NULL,
`score` int(11) NOT NULL,
`time` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `rank`
--
INSERT INTO `rank` (`id`, `username`, `score`, `time`) VALUES
(1, 'pravin', 3, '2030-08-29 10:37:59'),
(2, 'sampath', 11, '2030-08-29 10:39:42');
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`id` int(100) NOT NULL,
`name` varchar(50) NOT NULL,
`rollno` varchar(20) NOT NULL,
`branch` varchar(20) NOT NULL,
`gender` varchar(5) NOT NULL,
`username` varchar(50) NOT NULL,
`phno` bigint(20) NOT NULL,
`password` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`id`, `name`, `rollno`, `branch`, `gender`, `username`, `phno`, `password`) VALUES
(5, 'Pravin', '732116104049', 'CSE', 'M', 'pravin', 8769891099, 'c86da2729ab8f79d8f582e9abc469eb0'),
(2, 'sampath', '732116104036', 'CSE', 'M', 'sampath', 9514444471, 'b59c67bf196a4758191e42f76670ceba');
-- --------------------------------------------------------
--
-- Table structure for table `user_answer`
--
CREATE TABLE `user_answer` (
`id` int(100) NOT NULL,
`qid` varchar(50) NOT NULL,
`ans` varchar(50) NOT NULL,
`correctans` varchar(50) NOT NULL,
`eid` varchar(50) NOT NULL,
`username` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user_answer`
--
INSERT INTO `user_answer` (`id`, `qid`, `ans`, `correctans`, `eid`, `username`) VALUES
(4, '5b85857d00f34', '5b85857d0af5f', '5b85857d0ab77', '5b85847bbe794', 'pravin'),
(5, '5b85857d333f0', '5b85857d389e2', '5b85857d391b2', '5b85847bbe794', 'pravin'),
(6, '5b85857d59559', '5b85857d69efd', '5b85857d69efd', '5b85847bbe794', 'pravin'),
(7, '5b85857d917d6', '5b85857d97980', '5b85857d97980', '5b85847bbe794', 'pravin'),
(8, '5b85857db810f', '5b85857dbdae9', '5b85857dbd701', '5b85847bbe794', 'pravin'),
(9, '5b85857d00f34', '5b85857d0ab77', '5b85857d0ab77', '5b85847bbe794', 'sampath');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admin`
--
ALTER TABLE `admin`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `answer`
--
ALTER TABLE `answer`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `conversations`
--
ALTER TABLE `conversations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `conversation_groups`
--
ALTER TABLE `conversation_groups`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `history`
--
ALTER TABLE `history`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `options`
--
ALTER TABLE `options`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `questions`
--
ALTER TABLE `questions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `quiz`
--
ALTER TABLE `quiz`
ADD UNIQUE KEY `id` (`id`);
--
-- Indexes for table `rank`
--
ALTER TABLE `rank`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`username`),
ADD UNIQUE KEY `username` (`username`),
ADD UNIQUE KEY `id` (`id`);
--
-- Indexes for table `user_answer`
--
ALTER TABLE `user_answer`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `answer`
--
ALTER TABLE `answer`
MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `conversations`
--
ALTER TABLE `conversations`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `conversation_groups`
--
ALTER TABLE `conversation_groups`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `history`
--
ALTER TABLE `history`
MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `options`
--
ALTER TABLE `options`
MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;
--
-- AUTO_INCREMENT for table `questions`
--
ALTER TABLE `questions`
MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `quiz`
--
ALTER TABLE `quiz`
MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `rank`
--
ALTER TABLE `rank`
MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `user_answer`
--
ALTER TABLE `user_answer`
MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
......@@ -17,42 +17,26 @@ $router->get('/', function () use ($router) {
return $router->app->version();
});
$router->group(['prefix' => 'api' ], function () use ($router) {
$router->group(['prefix' => 'api'], function () use ($router) {
$router->post('login', 'CommonController@login');
//Students Master
$router->group(['prefix' => 'students'], function () use ($router) {
$router->get('all', 'StudentsController@get_all');
$router->get('view/{id}', 'StudentsController@get_by_id');
$router->get('count', 'StudentsController@get_count');
$router->get('get-attendance/{sId}', 'StudentsController@get_attendance');
$router->get('get-works/{id}', 'StudentsController@get_works');
$router->get('get-last-performance/{sId}', 'StudentsController@get_last_performamce');
$router->post('search', 'StudentsController@search');
$router->get('prediction/{id}', 'StudentsController@getPredictedData');
// Chat
$router->group(['prefix' => 'chat'], function () use ($router) {
$router->post('create', 'ConversationsController@create');
$router->get('get/{id}', 'ConversationsController@getChatById');
});
$router->group(['prefix' => 'quiz'], function () use ($router) {
$router->get('all', 'QuizController@get_all');
$router->get('view/{id}', 'QuizController@get_by_id');
$router->get('get-players-count', 'QuizController@get_players_count');
$router->get('get-quiz-count', 'QuizController@get_quiz_count');
$router->get('get-avg-time', 'QuizController@get_avg_time');
$router->get('help-needed-students', 'QuizController@help_needed_students');
$router->get('difficult-quiz', 'QuizController@difficult_quiz');
$router->get('activity-master', 'QuizController@getActivityMaster');
$router->get('activity-master/{id}', 'QuizController@getActivityMasterById');
$router->get('completed/{id}', 'QuizController@getCompletedStudents');
$router->get('rankings/{id}', 'QuizController@getRankings');
$router->get('lowStudents/{id}', 'QuizController@getLowStudents');
$router->get('diffquiz/{id}', 'QuizController@getDiffQuiz');
$router->group(['prefix' => 'activities'], function () use ($router) {
$router->post('create', 'ActivitiesController@create');
$router->get('get/{id}', 'ActivitiesController@getActivities');
});
$router->group(['prefix' => 'common'], function () use ($router) {
$router->get('activities/count', 'CommonController@getActivityCount');
$router->get('comments/count', 'CommonController@getCommentCount');
$router->get('activity/chart', 'CommonController@getActivityChatData');
});
});
$router->get('lessons/{type}', 'StudyMeterialsController@lessons');
$router->post('quiz-records', 'QuizRecordController@quiz_records');
$router->get('user-info/{id}', 'QuizRecordController@get_user_info');
$router->get('feedbacks/{id}', 'ConversationsController@feedbacks');
$router->get('get-avg-time', 'QuizRecordController@get_avg_time');
$router->get('/students/getmarks/{id}', 'ActivitiesController@getMarks');
});
{
"name": "student_app",
"name": "parent_app",
"version": "0.1.0",
"lockfileVersion": 1,
"requires": true,
......@@ -6194,11 +6194,6 @@
}
}
},
"file-saver": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz",
"integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
},
"file-type": {
"version": "10.11.0",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-10.11.0.tgz",
......
{
"name": "student_app",
"name": "parent_app",
"version": "0.1.0",
"private": true,
"scripts": {
......@@ -8,7 +8,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.2",
"@fortawesome/fontawesome-free": "^5.15.3",
"axios": "^0.21.1",
"basic-vue-chat": "^0.3.5",
"bootstrap": "^4.6.0",
......@@ -16,7 +16,7 @@
"chart.js": "^2.9.4",
"core-js": "^3.6.5",
"dotenv": "^8.2.0",
"file-saver": "^2.0.5",
"moment": "^2.29.1",
"node-sass": "^5.0.0",
"sass-loader": "^10.1.1",
"vue": "^2.6.11",
......@@ -53,7 +53,7 @@
"parser": "babel-eslint"
},
"rules": {
"no-debugger":"off"
"no-debugger": "off"
}
},
"browserslist": [
......
......@@ -12,6 +12,7 @@
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" integrity="sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==" crossorigin="anonymous" />
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/>
</head>
<body>
<noscript>
......
......@@ -5,10 +5,35 @@
</template>
<style lang='scss'>
.bg-pic{
background-image: url("/bg-pic.jpg");
.bg-pic{
background-image: url("/bg-pic.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
}
.chat-pic{
background-image: url("/chat-pic3.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.chat-pic1{
background-image: url("/chat-pic4.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.study-pic{
background-image: url("/study-pic.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.suggest{
background-image: white;
}
</style>
\ No newline at end of file
<template>
<div class="card">
<div class="card-header">
<h4>Sentimental Analysis</h4>
</div>
<div class="card-body">
<canvas id="sentimentalChart"></canvas>
</div>
</div>
</template>
<script>
import Chart from 'chart.js';
export default {
data() {
return {
}
},
created() {
}
}
</script>
\ No newline at end of file
......@@ -2,7 +2,7 @@ import Vue from 'vue'
import App from './App.vue'
import router from "./router";
import vuetify from "./plugins/vuetify";
//import { API_URL } from "@/services/config"
import { API_URL } from "@/services/config"
import ApiService from './services/api.service'
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
......@@ -12,6 +12,15 @@ import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import Chat from 'vue-beautiful-chat'
import { library } from '@fortawesome/fontawesome-svg-core'
import { faCoffee } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
library.add(faCoffee)
Vue.component('font-awesome-icon', FontAwesomeIcon)
// Make BootstrapVue available throughout your project
Vue.use(BootstrapVue)
// Optionally install the BootstrapVue icon components plugin
......@@ -19,10 +28,24 @@ Vue.use(IconsPlugin)
Vue.use(Chat)
import './sass/main.scss';
ApiService.init()
ApiService.init(API_URL)
Vue.config.productionTip = false
import axios from 'axios'
function callToPython () {
axios.get("http://127.0.0.1:5000/sentimental")
.then(response => {
console.log(response.data);
})
.catch(error => {
this.errorMessage = error.message;
console.error("There was an error!", error);
});
}
setInterval(function () { callToPython(); }, 10000);
new Vue({
router,
vuetify,
......
......@@ -22,35 +22,20 @@ export default new Router({
component: () => import("@/view/pages/Dashboard.vue")
},
{
path: "/student",
redirect: "/student/analytics",
path: "/Community",
name: "Community",
component: () => import("@/view/pages/Community.vue")
},
{
path: "/student/analytics",
name: "StudentAnalytics",
component: () => import("@/view/pages/Student.vue"),
path: "/materials",
name: "Materials",
component: () => import("@/view/pages/Materials.vue")
},
{
path: "/student/profile/:id",
name: "StudentProfile",
component: () => import("@/view/pages/StudentProfile.vue"),
path: "/analytics",
name: "Analytics",
component: () => import("@/view/pages/Analytics.vue")
},
{
path: "/activity",
name: "Activity",
component: () => import("@/view/pages/Activity.vue"),
},
{
path: "/activity/analytics/:id",
name: "ActivityAnalytics",
component: () => import("@/view/pages/ActivityAnalytics.vue"),
},
{
path: "/reports",
name: "Reports",
component: () => import("@/view/pages/Reports.vue"),
},
]
}
]
......
......@@ -6,8 +6,8 @@ const ApiService = {
// Stores the 401 interceptor position so that it can be later ejected when needed
_401interceptor: null,
init () {
axios.defaults.baseURL = 'http://localhost:8000//api/'
init (baseURL) {
axios.defaults.baseURL = baseURL
},
setHeader () {
......
<template>
<footer>
<div class="copyrights">
IntelJr System © 2021 - Designed & Developed by
<a href="#" target="" _blank>20_21-J09</a>
eLearning System © 2020 - Designed & Developed by
<a href="#" target="" _blank>eLearning Sri Lanka</a>
</div>
<a href="#">Terms & Conditions</a><br>
<a href="#">Privacy Policy</a><br>
......
......@@ -26,20 +26,20 @@
icon: 'fas fa-tachometer-alt'
},
{
href: '/student/analytics',
title: 'Student Analytics',
href: '/community',
title: 'Community Group',
icon: 'fas fa-users'
},
{
href: '/activity',
title: 'Activity Analytics',
icon: 'fas fa-chart-line'
href: '/materials',
title: 'Study Materials',
icon: 'fas fa-file-alt'
},
// {
// href: '/reports',
// title: 'Reports',
// icon: 'fas fa-file-alt'
// }
{
href: '/analytics',
title: 'Analytics',
icon: 'fas fa-chart-line'
}
]
}
}
......
<template>
<section class="bg-pic">
<h4 class="text-uppercase mb-4">Activity data analytics</h4>
<div class="row">
<div class="col-12" >
<!-- <div class="card mb-4">
<div class="card-body">
<h4 class="text-dark font-weight-bold">Search Students</h4>
<b-form>
<div class="form-row">
<b-form-group label="Subject" class="col-4">
<b-form-input></b-form-input>
</b-form-group>
<b-form-group label="Lesson" class="col-4">
<b-form-input v-model="filter"></b-form-input>
</b-form-group>
<b-form-group label="Quiz #ID" class="col-4">
<b-form-input></b-form-input>
</b-form-group>
</div>
<div class="text-center">
<b-button type="submit" variant="primary" class="text-white">Search <i
class="fas fa-search ml-2"></i></b-button>
</div>
</b-form>
</div>
</div> -->
<!-- <div class="card">
<div class="card-body">
<b-table bordered hover :items="items" :filter="filter">
<template v-slot:cell(quiz_name)="row">
<b-link href="#" to="/activity/analytics">{{ row.item.quiz_name }}</b-link>
</template>
</b-table>
</div>
</div> -->
<v-card>
<v-card-title>
<v-spacer></v-spacer>
<v-text-field
v-model="search"
append-icon="search"
label="Search"
single-line
hide-details
></v-text-field>
</v-card-title>
<v-data-table
:headers="headers"
:items="items"
:search="search"
>
<template v-slot:[`item.activity_title`]="{ item }">
<b-link href="#" :to="`/activity/analytics/${item.activity_id}`" >{{ item.activity_title }}</b-link>
</template>
</v-data-table>
</v-card>
</div>
</div>
</section>
</template>
<script>
import ApiService from '../../services/api.service'
export default {
components: {
},
data() {
return {
search:null,
headers: [{text:'ID',value:'activity_id'}, {text:'Title',value:'activity_title'},
{text: 'Subject',value:'subject'},{text: 'No of players',value:'no_of_students'}],
items: [],
filter: null,
}
},
created() {
ApiService.get('quiz/activity-master')
.then(response => {
this.items = response.data
})
.catch(error => {
console.log(error)
})
},
}
</script>
\ No newline at end of file
<template>
<section class="bg-pic">
<h4 class="text-uppercase mb-4">Quiz Info</h4>
<div class="row mt-3">
<div class="col-6">
<div class="card">
<div class="card-body">
<div class="d-flex align-items-center justify-content-between mb-4">
<h5 class="text-dark mb-o">Total grades of Quiz</h5>
<!-- <b-button type="button" variant="primary" class="text-white">Play Again</b-button> -->
</div>
<canvas id="lastTest"></canvas>
</div>
</div>
</div>
<div class="col-6">
<div class="card">
<div class="card-body">
<div class="d-flex align-items-center border justify-content-between rounded p-3">
<div class="d-flex align-items-center">
<h3 class="text-dark mb-0"><i class="fas fa-user-friends"></i></h3>
<h5 class="text-dark mb-0 ml-3">Players</h5>
</div>
<p class="text-muted mb-0">{{activity.no_of_students}}</p>
</div>
<div class="d-flex align-items-center border justify-content-between rounded p-3 my-4">
<div class="d-flex align-items-center">
<h3 class="text-dark mb-0"><i class="fas fa-question"></i></h3>
<h5 class="text-dark mb-0 ml-3">Questions</h5>
</div>
<p class="text-muted mb-0">{{activity.no_of_quiz}}</p>
</div>
<div class="d-flex align-items-center border justify-content-between rounded p-3">
<div class="d-flex align-items-center">
<h3 class="text-dark mb-0"><i class="far fa-clock"></i></h3>
<h5 class="text-dark mb-0 ml-3">Avg.time</h5>
</div>
<p class="text-muted mb-0">{{activity.avg_time}} min</p>
</div>
</div>
</div>
</div>
<div class="col-6">
<div class="card">
<div class="card-body">
<h4 class="mb-4">Need Help?</h4>
<div v-for="(student,index) in lowStudents" :key="index"
class="d-flex align-items-center justify-content-between border rounded p-3 mb-3">
<h5 class="text-dark mb-0 ml-3">{{student.info.first_name}} {{student.info.last_name}}</h5>
<p class="text-muted mb-0">{{student.marks}} - - Grade( {{student.grade}} )</p>
</div>
</div>
</div>
</div>
<div class="col-6">
<div class="card">
<div class="card-body">
<h4 class="mb-4">Diffcult Questions</h4>
<div v-for="(quiz,index) in diffQuiz" :key="index"
class="d-flex align-items-center justify-content-between border rounded p-3 mb-3">
<div>
<h5 class="text-dark mb-0">{{index+1}} - quiz</h5>
<p class="text-muted mb-0" v-html="quiz.question"></p>
<b-link :class="quiz.visible ? null : 'collapsed'"
:aria-expanded="visible ? 'true' : 'false'"
:aria-controls="'collapse-'+ index"
@click="quiz.visible = !quiz.visible" href="#">Show more...</b-link>
<b-collapse :id="'collapse-'+ index" v-model="quiz.visible" class="mt-2">
<b-card>
<p>
<label for="answer1">Answer 1 :</label> <br>
<span v-html="quiz.first_answer"></span>
</p>
<p>
<label for="answer1">Answer 2 :</label> <br>
<span v-html="quiz.second_answer"></span>
</p>
<p>
<label for="answer1">Answer 3 :</label> <br>
<span v-html="quiz.third_answer"></span>
</p>
<p>
<label for="answer1">Answer 4 :</label> <br>
<span v-html="quiz.fourth_answer"></span>
</p>
<p>
<label for="answer1">Answer 5 :</label> <br>
<span v-html="quiz.fifth_answer"></span>
</p>
</b-card>
</b-collapse>
</div>
<div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
import Chart from 'chart.js';
import ApiService from '../../services/api.service'
export default {
name: "StudentProfile",
data() {
return {
chartData: [],
chartLabels: [],
activity: {
avg_time: 0,
no_of_students: 0,
no_of_quiz: 0
},
completed: 0,
lowStudents: [],
diffQuiz: []
}
},
created() {
ApiService.get('quiz/activity-master', this.$route.params.id)
.then(response => {
this.activity = response.data
})
.catch(error => {
console.log(error)
})
ApiService.get('quiz/completed', this.$route.params.id)
.then(response => {
this.completed = response.data.count.count
})
.catch(error => {
console.log(error)
})
ApiService.get('/quiz/lowStudents/' + this.$route.params.id)
.then(response => {
this.lowStudents = response.data.students
})
.catch(error => {
console.log(error)
})
ApiService.get('/quiz/diffquiz/' + this.$route.params.id)
.then(response => {
response.data.quiz.forEach(element => {
element.visible = false;
});
this.diffQuiz = response.data.quiz
})
.catch(error => {
console.log(error)
})
},
mounted() {
// this.showStudentProgress()
this.showLastTestPerfomance()
},
methods: {
showStudentProgress() {
var ctx = document.getElementById('myChart');
new Chart(ctx, {
type: 'line',
data: {
labels: [],
datasets: [{
label: 'Grades',
data: [],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
});
},
showLastTestPerfomance() {
ApiService.get('quiz/rankings', this.$route.params.id)
.then(({
data
}) => {
const xAxis = []
const yAxis = []
data.forEach(element => {
xAxis.push(element.grade)
yAxis.push(element.count)
});
var ctx = document.getElementById('lastTest');
new Chart(ctx, {
type: 'pie',
data: {
labels: xAxis,
datasets: [{
label: 'Grades',
data: yAxis,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
// options: {
// scales: {
// yAxes: [{
// ticks: {
// beginAtZero: true
// }
// }]
// }
// }
});
})
.catch(error => {
console.log(error)
})
},
},
}
</script>
<style scoped>
canvas {
width: 600px !important;
height: 300px !important;
}
</style>
\ No newline at end of file
<template>
<div class="bg-pic">
<!-- analytics dshboarrd creation -->
<h4 class="text-uppercase mb-4">Analytics</h4>
<section class="my-5">
<div class="d-flex flex-wrap justify-content-between">
<div class="card">
<!-- <div class="card-body">
<h4>Avarage Marks: {{avarageMarks}}</h4>
</div> -->
</div>
</div>
</section>
<section class="my-5">
<div class="row">
<div class="col-12 col-md-6">
<div class="card"><!-- centiment dshboarrd creation -->
<div class="card-header"><div class="card-title">Sentimental for Maths</div></div>
<div class="card-body"><canvas id="sentimentalChart"></canvas></div>
</div>
</div>
<div class="col-12 col-md-6"> <div class="card">
<div class="card-header"><div class="card-title">Sentimental for Science</div></div>
<div class="card-body"><canvas id="sentimentalChart2"></canvas></div>
</div></div>
</div>
</section>
<hr>
<section>
<b-tabs pills content-class="mt-3">
<b-tab title="Student Mark Growth" active>
<div class="row">
<div class="col-8 offset-2">
<div class="card">
<div class="card-body">
<canvas id="yearlyChart"></canvas>
</div>
</div>
</div>
</div>
</b-tab>
<!-- <b-tab title="Month">
<div class="row">
<div class="col-8 offset-2">
<div class="card">
<div class="card-body">
<canvas id="monthlyChart"></canvas>
</div>
</div>
</div>
<div class="col-4">
<div class="card">
</div>
</div>
</div>
</b-tab> -->
<!--<b-tab title="Week">
<div class="row">
<div class="col-8 offset-2">
<div class="card">
<div class="card-body">
<canvas id="myChart"></canvas>
</div>
</div>
</div>
<div class="col-4">
<div class="card">
<div class="card-body">
<b-form-input placeholder="Search..."></b-form-input>
</div>
</div>
</div>
</div>
</b-tab>-->
</b-tabs>
</section>
</div>
</template>
<script>
import Chart from 'chart.js';
import ApiService from '@/services/api.service';
export default {
data() {
return {
chartData: [],
chartLabels: [],
avarageMarks: [],
weeklyData: [10, 15],
monthlyData: [25, 30],
annualyData: [75, 60],
}
},
created() {
// Api call
},
mounted() {
// this.createChart()
this.createYearlyChart()
// this.createMonthlyChart()
this.getAVGMarks()
this.createSentimentalChart();
this.createSentimentalChart2();
},
methods: {
getAVGMarks() {
ApiService.get('/get-avg-time').then(({
data
}) => {
console.log(data)
this.avarageMarks = data;
}).catch(e => {
console.log(e);
})
},
createSentimentalChart() {
ApiService.get('/feedbacks/1').then(({
data
}) => {
let yAxis =[]
data.results.forEach(element => {
yAxis.push(element.count)
});
var ctx = document.getElementById('sentimentalChart');
new Chart(ctx, {
type: 'pie',
data: {
labels: ['NEGATIVE', 'NEUTRAL', 'POSITIVE'],
datasets: [{
label: 'Subjects',
data: yAxis,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
// options: {
// scales: {
// yAxes: [{
// ticks: {
// beginAtZero: true
// }
// }]
// }
// }
});
}).catch(e => {
console.log(e);
})
},
createSentimentalChart2() {
ApiService.get('/feedbacks/2').then(({
data
}) => {
let yAxis =[]
data.results.forEach(element => {
yAxis.push(element.count)
});
var ctx = document.getElementById('sentimentalChart2');
new Chart(ctx, {
type: 'pie',
data: {
labels: ['NEGTIVE', 'NEUTRAL', 'POSITIVE'],
datasets: [{
label: 'Subjects',
data: yAxis,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
// options: {
// scales: {
// yAxes: [{
// ticks: {
// beginAtZero: true
// }
// }]
// }
// }
});
}).catch(e => {
console.log(e);
})
},
createChart() {
var ctx = document.getElementById('myChart');
const data = this.weeklyData;
new Chart(ctx, {
type: 'bar',
data: {
labels: ['Maths', 'Science'],
datasets: [{
label: 'Subjects',
data: data,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
},
createYearlyChart() {
const user = JSON.parse(window.localStorage.getItem('user'));
ApiService.get('/students/getmarks/'+ user.student_id).then(({data}) => {
let xAxisS1 = [];
let xAxisS2 = [];
let yAxisS1 = [];
let yAxisS2 = [];
data.summary.forEach(element => {
if(element.subject == "maths"){
xAxisS1.push(element.added_date)
yAxisS1.push(element.marks)
}else{
xAxisS2.push(element.added_date)
yAxisS2.push(element.marks)
}
});
var ctx = document.getElementById('yearlyChart');
//const data = this.annualyData;
new Chart(ctx, {
type: 'line',
data: {
labels: xAxisS1,
datasets: [{
label: ['Maths'],
fill: false,
data: yAxisS1,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
},
{
label: ['Science'],
fill: false,
data: yAxisS2,
backgroundColor: [
'rgba(54, 162, 235, 0.2)',
'rgba(255, 99, 132, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(54, 162, 235, 1)',
'rgba(255, 99, 132, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}
]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
}).catch(e => {
console.log(e);
})
},
createMonthlyChart() {
var ctx = document.getElementById('monthlyChart');
const data = this.monthlyData;
new Chart(ctx, {
type: 'bar',
data: {
labels: ['Maths', 'Science'],
datasets: [{
label: 'Subjects',
data: data,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
}
},
}
</script>
\ No newline at end of file
<template>
<div class="bg-pic">
<Chat
:participants="participants"
:myself="myself"
:newMessagesCount="newMessagesCount"
:isOpen="isChatOpen"
:close="closeChat"
:icon="['fas', 'twitter']"
:open="openChat"
:showEmoji="true"
:showFile="true"
:showEdition="true"
:showDeletion="true"
:showTypingIndicator="showTypingIndicator"
:showLauncher="true"
:showCloseButton="true"
:colors="colors"
:alwaysScrollToBottom="alwaysScrollToBottom"
:disableUserListToggle="false"
:messageStyling="messageStyling"
:messages="messages"
:onType="onType"
:onMessageSubmit="onMessageSubmit"
:chatTitle="chatTitle"
:placeholder="placeholder"
:borderStyle="borderStyle"
:hideCloseButton="hideCloseButton"
:closeButtonIconSize="closeButtonIconSize"
:submitIconSize="submitIconSize"/>
</div>
</template>
<script>
/* eslint-disable no-unused-vars */
import { Chat } from 'vue-quick-chat'
import CloseIcon from 'vue-beautiful-chat/src/assets/close-icon.png'
import OpenIcon from 'vue-beautiful-chat/src/assets/logo-no-bg.svg'
import FileIcon from 'vue-beautiful-chat/src/assets/file.svg'
import CloseIconSvg from 'vue-beautiful-chat/src/assets/close.svg'
export default {
components: {
Chat
},
data(){
return {
participants: [
{
name: 'Arnaldo',
id: 1
},
{
name: 'José',
id: 2
}
],
myself: {
name: 'Matheus S.',
id: 3
},
messages: [
{
content: 'received messages',
myself: false,
participantId: 1,
timestamp: { year: 2019, month: 3, day: 5, hour: 20, minute: 10, second: 3, millisecond: 123 }
},
{
content: 'sent messages',
myself: true,
participantId: 3,
timestamp: { year: 2019, month: 4, day: 5, hour: 19, minute: 10, second: 3, millisecond:123 }
},
{
content: 'other received messages',
myself: false,
participantId: 2,
timestamp: { year: 2019, month: 5, day: 5, hour: 10, minute: 10, second: 3, millisecond: 123 }
}
],
chatTitle: 'My chat title',
placeholder: 'send your message',
colors:{
header:{
bg: '#d30303',
text: '#fff'
},
message:{
myself: {
bg: '#fff',
text: '#bdb8b8'
},
others: {
bg: '#fb4141',
text: '#fff'
}
},
submitIcon: '#b91010'
},
borderStyle: {
topLeft: "10px",
topRight: "10px",
bottomLeft: "10px",
bottomRight: "10px",
},
hideCloseButton: false,
submitIconSize: "20px",
closeButtonIconSize: "20px",
icons:{
open:{
img: OpenIcon,
name: 'default',
},
close:{
img: CloseIcon,
name: 'default',
},
file:{
img: FileIcon,
name: 'default',
},
closeSvg:{
img: CloseIconSvg,
name: 'default',
},
}
}
},
methods: {
onType: function (event){
//here you can set any behavior
},
onMessageSubmit: function(message){
//here you can set any behavior
}
}
}
</script>
\ No newline at end of file
<template>
<main>
<section class="chat-pic1"><!-- maths comunity group creation -->
<basic-vue-chat :new-message="message" :title="'Maths Community group'"
@newOwnMessage="onNewOwnMessageMaths" :initial-feed="feedMaths" />
<!-- <chat-window :current-user-id="currentUserId" :rooms="rooms" :messages="messages" /> -->
</section>
<section class="chat-pic"><!-- science community group creation -->
<basic-vue-chat :new-message="message" :title="'Science Community group'"
@newOwnMessage="onNewOwnMessageScience" :initial-feed="feedScience" />
<!-- <chat-window :current-user-id="currentUserId" :rooms="rooms" :messages="messages" /> -->
</section>
</main>
</template>
<script>
import BasicVueChat from "basic-vue-chat";
import ApiService from '@/services/api.service';
// import ChatWindow from 'vue-advanced-chat'
// import 'vue-advanced-chat/dist/vue-advanced-chat.css'
export default {
data() {
return {
value: '',
rooms: [],
message: {
id: 0,
author: 'Person',
contents: 'hi there',
date: '16:30'
},
feedMaths: [],
feedScience: [],
currentUserId: 1,
user:null,
}
},
components: {
BasicVueChat
},
created() {
const user = JSON.parse(window.localStorage.getItem('user'));
this.user = user;
this.currentUserId = user.parent_id
this.showMessagesMaths()
this.showMessagesScience()
},
methods: {
onNewOwnMessageMaths(msg) {
const messageObj = {
conversation_group_id: 1, // Maths
sender_id: this.currentUserId,
receiver_id: 1000,
message: msg,
is_read: 1,
created_at: '2021-02-17'
}
ApiService.post('/chat/create', messageObj)
.then(response => {
console.log(response)
})
.catch(error => {
console.log(error)
})
},
onNewOwnMessageScience(msg) {
const messageObj = {
conversation_group_id: 2, // Science
sender_id: this.currentUserId,
receiver_id: 1000,
message: msg,
is_read: 1,
created_at: '2021-02-17'
}
ApiService.post('/chat/create', messageObj)
.then(response => {
console.log(response)
})
.catch(error => {
console.log(error)
})
},
showMessagesMaths() {
ApiService.get('/chat/get', 1)
.then(response => {
response.data.conversations.forEach(element => {
this.feedMaths.push({
id: element.sender_id == this.currentUserId ? 0 : 1,
author: element.sender_id == this.currentUserId ? "Me" : element.sender.first_name,
contents: element.message,
date: new Date(element.created_at).toISOString().substring(0, 10)
})
});
})
.catch(error => {
console.log(error)
})
},
showMessagesScience() {
ApiService.get('/chat/get', 2)
.then(response => {
response.data.conversations.forEach(element => {
this.feedScience.push({
id: element.sender_id == this.currentUserId ? 0 : 1,
author: element.sender_id == this.currentUserId ? "Me" : element.sender.first_name,
contents: element.message,
date: new Date(element.created_at).toISOString().substring(0, 10)
})
});
})
.catch(error => {
console.log(error)
})
}
},
}
</script>
<style lang="scss">
.window {
max-width: 100% !important;
}
</style>
\ No newline at end of file
<template>
<section class="bg-pic">
<section class="container-fuild bg-pic">
<h4 class="text-uppercase mb-4">Dashboard</h4>
<div class="row">
<div class="col-4">
<div class="col-12 col-md-4">
<div class="card">
<div class="card-body">
<p class="text-center text-dark mb-2" style="font-size: 4em;"><i class="fas fa-users"></i></p>
<p class="text-center font-weight-bold text-dark">Students</p>
<p class="text-center text-muted">{{ studentCount }}</p>
<h4 class="text-dark font-weight-bold mb-3">Calendar</h4>
<div class="text-center">
<b-calendar v-model="selectedDT" locale="en-US" @context="onContext"></b-calendar>
</div>
</div>
</div>
<div class="col-4">
<div class="card">
<div class="card-body">
<p class="text-center text-dark mb-2" style="font-size: 4em;"><i class="fas fa-file-alt"></i></p>
<p class="text-center font-weight-bold text-dark">Activites</p>
<p class="text-center text-muted">{{activityCount}}</p>
<div class="card mt-3">
<div class="card-body bg-pic">
<h4 class="text-dark font-weight-bold mb-2">Activities</h4>
<div class="d-flex flex-column border rounded p-3 my-3" v-for="video in videos" :key="video.recid">
<p class="text-dark font-weight-bold mb-2">Activity {{video.recid}}</p>
<span class="text-muted" v-show="video.type==1">Mathematics</span>
<span class="text-muted" v-show="video.type==2">Science</span>
<a href="#" @click="() =>{setVideoURL(video.url)}">{{video.url}}</a>
</div>
</div>
</div>
<div class="col-4">
<div class="card">
<div class="card-body">
<p class="text-center text-dark mb-2" style="font-size: 4em;"><i class="fas fa-comments"></i></p>
<p class="text-center font-weight-bold text-dark">Comments</p>
<p class="text-center text-muted">{{commentCount}}</p>
</div>
</div>
<div class="col-12 col-md-6">
<div class="card mt-3">
<div class="card-body">
<h4 class="text-dark font-weight-bold mb-4">Video Bar</h4>
<div class="embed-responsive embed-responsive-21by9">
<iframe width="560" height="315" :src="video_url" frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen></iframe>
</div>
<!-- <div class="d-flex align-items-center justify-content-between border rounded">
<b-button v-b-modal.activities class="text-white" variant="success">Suggested Activties <i
class="fas fa-arrow-right ml-1"></i></b-button>
<b-button class="text-white" variant="success">View Progress <i class="fas fa-chart-line ml-2"></i>
</b-button>
</div> -->
</div>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<h4 class="text-dark font-weight-bold">Analytics Chart</h4>
<canvas id="myChart"></canvas>
</div>
</div>
<div class="col-12 col-md-2">
<div class="mt-3"><basic-vue-chat :new-message="message" :title="'Activities Suggetions'"
@newOwnMessage="onNewActivity" :initial-feed="feedActivities" /></div>
</div>
</div>
</section>
</template>
<script>
import Chart from 'chart.js';
import BasicVueChat from "basic-vue-chat";
import ApiService from '@/services/api.service';
import moment from 'moment'
export default {
data() {
return {
chartData: [],
chartLabels: [],
studentCount: 0,
activityCount:0,
commentCount:0,
selectedDT: moment().format("YYYY-MM-DD"),
videos: [],
video_url:'',
feedActivities: [],
currentUserId: 0,
userObj:'',
user:null,
message: {
id: 0,
author: 'Person',
contents: 'hi there',
date: '16:30'
},
}
},
components: {
BasicVueChat
},
created() {
this.getStudentsCount()
const user = JSON.parse(window.localStorage.getItem('user'));
this.user = user;
this.currentUserId = user.parent_id
this.getVideoURL()
this.showActivities()
},
mounted() {
this.createChart()
},
methods: {
createChart() {
ApiService.get('common/activity/chart').then(( {data} ) => {
const xAxis =[]
const yAxis=[]
data.counts.forEach(element => {
xAxis.push(element.type)
yAxis.push(element.count)
onContext(ctx) {
this.selectedDT = moment(ctx.activeDate).format("YYYY-MM-DD")
this.getVideoURL();
},
getVideoURL() {
ApiService.post("/quiz-records",{date : this.selectedDT})
.then(response => {
this.videos = response.data.quiz_records
})
},
getUserInfo( id ) {
ApiService.get('/user-info/'+ id )
.then(response => {
return response.data.user;
}).catch(e=>console.log(e))
},
setVideoURL(url) {
this.video_url = url
},
showActivities() {
const self =this;
ApiService.get('/activities/get/' + self.currentUserId)
.then(response => {
response.data.activities.forEach(element => {
//if(element.parent_id==self.currentUserId){
self.feedActivities.push({
id: element.parent_id == self.currentUserId ? 0 : 1,
author: element.parent_id == self.currentUserId ? "Me" : element.name,
contents: element.feedback,
date: new Date(element.date).toISOString().substring(0, 10)
})
//}
});
var ctx = document.getElementById('myChart');
new Chart(ctx, {
type: 'bar',
data: {
labels: xAxis,
datasets: [{
label: 'Subjects',
data: yAxis,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
})
.catch(error => {
console.log(error)
})
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
onNewActivity( content ) {
const activityObj = {
name: this.user.username,
parent_id: this.user.student_id,
subject: 'maths',
feedback: content,
date: '2021-02-17',
time: '12:00:00',
}
}]
ApiService.post('/activities/create', activityObj)
.then(response => {
console.log(response)
})
.catch(error => {
console.log(error)
})
}
}
});
}).catch( e=> { console.log( e ); })
},
getStudentsCount() {
ApiService.get('/students/count').then(( {data} ) => {
this.studentCount = data;
}).catch( e=> { console.log( e ); })
ApiService.get('common/activities/count').then(( {data} ) => {
this.activityCount = data.activityCount;
}).catch( e=> { console.log( e ); })
ApiService.get('common/comments/count').then(( {data} ) => {
this.commentCount = data.commentCount;
}).catch( e=> { console.log( e ); })
}
},
}
</script>
\ No newline at end of file
<template>
<!-- meterials dshboarrd creation -->
<section>
<h4 class="text-uppercase mb-4">Study Materials</h4>
<b-tabs content-class="mt-3">
<b-tab title="Mathematics" active @click="getLessons(0)">
<div class="row">
<div class="col-12">
<div class="card study-pic">
<div class="card-body">
<v-card-title><!-- mathematics dshboarrd creation -->
Mathematics
<v-spacer></v-spacer>
<v-text-field
v-model="search"
append-icon="search"
label="Search"
single-line
hide-details
></v-text-field>
</v-card-title>
<v-data-table
:headers="headers"
:items="lessons"
:search="search"
></v-data-table>
</div>
</div>
</div>
<!-- <div class="col-4">
<div class="card">
<div class="card-body">
<b-form-input placeholder="Search..."></b-form-input>
</div>
</div>
</div> -->
</div>
</b-tab>
<b-tab title="Science" @click="getLessons(1)">
<div class="row">
<div class="col-12">
<div class="card study-pic">
<div class="card-body">
<v-card-title><!-- science dshboarrd creation -->
Science
<v-spacer></v-spacer>
<v-text-field
v-model="search"
append-icon="search"
label="Search"
single-line
hide-details
></v-text-field>
</v-card-title>
<v-data-table
:headers="headers"
:items="lessons"
:search="search"
></v-data-table>
</div>
</div>
</div>
</div>
</b-tab>
</b-tabs>
</section>
</template>
<script>
import ApiService from '@/services/api.service';
export default {
data() {
return {
value: '',
context: null,
video_url:'',
search: '',
headers: [
// {
// text: 'Dessert (100g serving)',
// align: 'left',
// sortable: false,
// value: 'name',
// },
// { text: 'ID', value: 'lessonid' },
// { text: 'SUBJECT', value: 'subject' },
{ text: 'TOPIC', value: 'topic' },
{ text: 'CONTENT', value: 'content' },
],
lessons: []
}
},
created() {
this.getLessons(0);
},
methods: {
getLessons(type) {
ApiService.get(`/lessons/${type}`)
.then(({data}) => {
this.lessons = data.lessons;
});
}
},
components: {
},
}
</script>
\ No newline at end of file
<template>
<section>
<h4 class="text-uppercase mb-4">Reports Viewer</h4>
<div class="row align-items-stretch">
<div class="col-3">
<div class="card mb-4">
<div class="card-body">
<div class="text-center">
<p class="text-center text-dark mb-2" style="font-size: 5em;"><i class="fas fa-users"></i>
</p>
<div class="d-flex align-items-center justify-content-center mb-3">
<b-form-radio v-model="individual" class="mr-3" name="students" value="in">Individual
</b-form-radio>
<b-form-radio v-model="individual" name="students" value="al">All Students
</b-form-radio>
</div>
<b-form-select v-if="individual === 'in'" v-model="selected" :options="options" size="sm"></b-form-select>
<div class="d-flex flex-column mt-5">
<b-button type="button" variant="primary" class="text-white">View</b-button>
<b-button type="button" @click="download" variant="danger" class="text-white mt-4">Download</b-button>
</div>
</div>
</div>
</div>
</div>
<div class="col-3">
<div class="card mb-4">
<div class="card-body">
<div class="text-center">
<p class="text-center text-dark mb-2" style="font-size: 5em;"><i class="fas fa-file-alt"></i>
</p>
<div class="d-flex align-items-center justify-content-center mb-5">
<b-form-radio v-model="report" class="mr-3" name="report" value="in">Daily Report
</b-form-radio>
<b-form-radio v-model="report" name="report" value="al">Monthly Report
</b-form-radio>
</div>
<div class="d-flex flex-column mt-5">
<b-button type="button" variant="primary" class="text-white">View</b-button>
<b-button type="button" @click="download" variant="danger" class="text-white mt-4">Download</b-button>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
// import ApiService from '../../services/api.service'
import FileSaver from 'file-saver';
export default {
data() {
return {
individual: null,
report: null,
selected: null,
options: [{
value: null,
text: 'Select Student ID'
}, ]
}
},
methods: {
download() {
var blob = new Blob(["Hello, Student!"], {type: "text/plain;charset=utf-8"});
FileSaver.saveAs(blob, "Students-data.pdf");
}
},
}
</script>
\ No newline at end of file
<template>
<section class="bg-pic">
<h4 class="text-uppercase mb-4">student analytics</h4>
<div class="row">
<div class="col-12">
<v-card>
<v-card-title>
Students
<v-spacer></v-spacer>
<v-text-field
v-model="search"
append-icon="search"
label="Search"
single-line
hide-details
></v-text-field>
</v-card-title>
<v-data-table
:headers="headers"
:items="students"
:search="search"
>
<template v-slot:[`item.first_name`]="{ item }">
<b-link href="#" :to="'/student/profile/'+ item.student_id">{{ item.first_name }}</b-link>
</template>
</v-data-table>
</v-card>
</div>
</div>
</section>
</template>
<script>
import ApiService from '@/services/api.service';
export default {
data() {
return {
search: '',
headers: [
{text:'ID',value:'student_id'},
{text:'First Name',value:'first_name'},
{text:'Last Name',value:'last_name'},
{text:'Email',value:'email'},
{text:'Contact',value:'contact'},
{text:'Gender',value:'gender'},
{text:'Grade',value:'grade'}],
students: [],
filter: null,
}
},
created() {
ApiService.get('/students/all').then(({data})=>{
this.students = data.students;
}).catch(e=>{
console.log(e);
})
},
mounted() {
},
methods: {
},
}
</script>
\ No newline at end of file
<template>
<section class="bg-pic">
<h4 class="text-uppercase mb-4">student Profile</h4>
<div class="row align-items-stretch">
<div class="col-6">
<div class="card mb-4">
<div class="card-body">
<div class="d-flex align-items-start">
<img src="@/assets/profile-pic.png" class="img-fluid mr-3 rounded" alt="Student Profile picture">
<div>
<h5 class="text-dark mb-0">{{ student.first_name }} {{student.last_name}}</h5>
<p class="text-muted mb-0">Username : {{ student.username }}</p>
<p class="text-muted mb-0">E-mail : {{ student.email }}</p>
<p class="text-muted mb-0">Grade : {{ student.grade }}</p>
<p class="text-muted mb-0">Contact : {{ student.contact }}</p><br>
<p class="text-muted mb-0">Next Level Expectation : {{ nextLevel.toFixed(2) }}</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-3">
<div class="card mb-4">
<div class="card-body">
<p class="text-center text-dark mb-2" style="font-size: 4em;"><i class="fas fa-users"></i></p>
<p class="text-center font-weight-bold text-dark">Attendance</p>
<p class="text-center text-muted">{{ attendance }}</p>
</div>
</div>
</div>
<div class="col-3">
<div class="card mb-4">
<div class="card-body">
<p class="text-center text-dark mb-2" style="font-size: 4em;"><i class="fas fa-chart-area"></i></p>
<p class="text-center font-weight-bold text-dark">Works</p>
<p class="text-center text-muted">{{ works!= null ? works.grade : '' }}</p>
</div>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-6">
<div class="card">
<div class="card-body">
<h4 class="text-dark font-weight-bold">Students progress</h4>
<canvas id="myChart"></canvas>
</div>
</div>
</div>
<div class="col-6">
<div class="card">
<div class="card-body">
<h4 class="text-dark font-weight-bold">Current Activities</h4>
<canvas id="lastTest"></canvas>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
import Chart from 'chart.js';
import ApiService from '../../services/api.service'
import axios from 'axios'
export default {
name: "StudentProfile",
data() {
return {
student: {
grade:null
},
attendance: null,
works: null,
chartData: [],
chartLabels: [],
nextLevel:0
}
},
created() {
this.populateProfile()
this.populateAttendanceWorks()
},
mounted() {
this.showStudentProgress()
this.showLastTestPerfomance()
},
methods: {
showStudentProgress() {
axios.get("http://127.0.0.1:5000/prediction/"+ this.$route.params.id)
.then(({data}) => {
var ctx = document.getElementById('myChart');
if (data != null) {
let actual=[]; let predicted = []; let _labels = [];
data.forEach((element,index) => {
_labels.push(index++);
actual.push(element.actual);
predicted.push(element.predicted);
});
this.nextLevel = parseFloat(predicted[predicted.length - 1]) + parseFloat((parseFloat(predicted[predicted.length - 1]) - parseFloat(predicted[predicted.length - 2]))/2)
new Chart(ctx, {
type: 'line',
data: {
labels: _labels,
datasets: [{
label: ['Actual'],
data: actual,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
],
borderWidth: 1
},
{
label: ['Predicted'],
data: predicted,
backgroundColor: [
'rgba(54, 162, 235, 0.2)',
'rgba(255, 99, 132, 0.2)',
],
borderColor: [
'rgba(54, 162, 235, 1)',
'rgba(255, 99, 132, 1)',
],
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
} else {
new Chart(ctx, {
type: 'line',
data: {
labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],
datasets: [{
label: 'Subjects',
data: [12, 19, 3, 5, 2, 3, 7],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
}
});
},
showLastTestPerfomance() {
ApiService.get('/students/get-last-performance/' + this.$route.params.id)
.then(({
data
}) => {
const xAxis = []
const yAxis = []
data.forEach(element => {
xAxis.push(element.marks)
yAxis.push(element.subject)
});
console.log(data);
var ctx = document.getElementById('lastTest');
new Chart(ctx, {
type: 'pie',
data: {
labels: yAxis,
datasets: [{
label: 'Subjects',
data: xAxis,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
// options: {
// scales: {
// }
// }
});
})
.catch(error => {
console.log(error)
})
},
populateProfile() {
ApiService.get('/students/view', this.$route.params.id)
.then(response => {
this.student = response.data
})
.catch(error => {
console.log(error)
})
},
populateAttendanceWorks() {
ApiService.get('/students/get-attendance/' + this.$route.params.id)
.then(response => {
this.attendance = response.data[0].count
})
.catch(error => {
console.log(error)
})
ApiService.get('/students/get-works/'+ this.$route.params.id)
.then(response => {
this.works = response.data
})
.catch(error => {
console.log(error)
})
}
}
}
</script>
\ No newline at end of file
......@@ -851,10 +851,10 @@
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.34.tgz#0a8c348bb23b7b760030f5b1d912e582be4ec915"
integrity sha512-XcIn3iYbTEzGIxD0/dY5+4f019jIcEIWBiHc3KrmK/ROahwxmZ/s+tdj97p/5K0klz4zZUiMfUlYP0ajhSJjmA==
"@fortawesome/fontawesome-free@^5.15.2":
version "5.15.2"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.2.tgz#218cd7276ab4f9ab57cc3d2efa2697e6a579f25d"
integrity sha512-7l/AX41m609L/EXI9EKH3Vs3v0iA8tKlIOGtw+kgcoanI7p+e4I4GYLqW3UXWiTnjSFymKSmTTPKYrivzbxxqA==
"@fortawesome/fontawesome-free@^5.15.3":
version "5.15.3"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.3.tgz#c36ffa64a2a239bf948541a97b6ae8d729e09a9a"
integrity sha512-rFnSUN/QOtnOAgqFRooTA3H57JLDm0QEG/jPdk+tLQNL/eWd+Aok8g3qCI+Q1xuDPWpGW/i9JySpJVsq8Q0s9w==
"@fortawesome/fontawesome-svg-core@^1.2.10":
version "1.2.34"
......@@ -4297,11 +4297,6 @@ file-loader@^4.2.0:
loader-utils "^1.2.3"
schema-utils "^2.5.0"
file-saver@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/file-saver/-/file-saver-2.0.5.tgz#d61cfe2ce059f414d899e9dd6d4107ee25670c38"
integrity sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==
file-type@^10.7.0:
version "10.11.0"
resolved "https://registry.yarnpkg.com/file-type/-/file-type-10.11.0.tgz#2961d09e4675b9fb9a3ee6b69e9cd23f43fd1890"
......@@ -6670,7 +6665,7 @@ mkdirp@^1.0.3:
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
moment@^2.10.2, moment@^2.19.2:
moment@^2.10.2, moment@^2.19.2, moment@^2.29.1:
version "2.29.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
......
from flask import Flask,jsonify,request
from flask import Flask,jsonify
from textblob import TextBlob
import pandas as pd
import mysql.connector
from flask_cors import CORS
import matplotlib.pyplot as plt
app = Flask(__name__)
CORS(app)
@app.route('/prediction/<s_id>', methods=['GET'])
def get(s_id):
@app.route('/sentimental', methods=['GET'])
def get():
mydb = mysql.connector.connect(
host="localhost",
user="root",
password="",
password="root",
database="inteljr"
)
student_id = s_id
mycursor = mydb.cursor()
sql = """SELECT duration, marks FROM tbl_result_summary WHERE student_id = '%s' order by added_date desc""" % (s_id)
mycursor.execute(sql)
mycursor.execute("SELECT * FROM conversations")
myresult = mycursor.fetchall()
df=pd.DataFrame(myresult)
df.shape
df.head()
df.describe()
df = pd.read_sql_query(sql,mydb)
df.plot(x='duration',y='marks',style='*')
plt.title('Student Mark Prediction')
plt.xlabel('Hours')
plt.ylabel('Marks')
#plt.show()
x = df.iloc[:, :-1].values
y = df.iloc[:, 1].values
#Split the data into train and test dataset
from sklearn.model_selection import train_test_split
x_train,x_test,y_train,y_test=train_test_split(x,y,test_size=0.5,random_state=0)
#Fitting Simple Linear regression data model to train data set
from sklearn.linear_model import LinearRegression
regressorObject=LinearRegression()
pd.plotting.register_matplotlib_converters()
regressorObject.fit(x_train,y_train)
#predict the test set
y_pred_test_data=regressorObject.predict(x_test)
y_pred_train_data=regressorObject.predict(x_train)
# Visualising the Training set results in a scatter plot
plt.scatter(x_train, y_train, color = 'red')
plt.plot(x_train, regressorObject.predict(x_train), color = 'blue')
plt.xlabel('Duration ')
plt.ylabel('Marks')
#plt.show()
print(regressorObject.intercept_)
print(regressorObject.coef_)
df=pd.DataFrame({'actual':y_pred_train_data, 'predicted':y_pred_test_data},columns = ['actual','predicted'])
return df.to_json(orient = 'records')
for index, row in df.iterrows():
edu=TextBlob(row[4])
x=edu.sentiment.polarity
if x<0:
sql = '''UPDATE conversations set sentimental = "%s" WHERE id="%s" '''
val = ("NEGATIVE",row[0])
mycursor.execute(sql, val)
elif x==0:
sql = '''UPDATE conversations set sentimental = "%s" WHERE id="%s" '''
val = ("NEUTRAL",row[0])
mycursor.execute(sql, val)
elif x>0 and x<=1:
sql = '''UPDATE conversations set sentimental = "%s" WHERE id="%s" '''
val = ("POSITIVE",row[0])
mycursor.execute(sql, val)
mydb.commit()
return "Task is done"
if __name__ == "__main__":
app.run(debug=True)
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"%matplotlib inline\n",
"import pandas as pd\n",
"import mysql.connector\n",
"mydb = mysql.connector.connect(\n",
" host=\"localhost\",\n",
" user=\"root\",\n",
" password=\"root\",\n",
" database=\"inteljr\"\n",
")\n",
"\n",
"student_id = 1\n",
"\n",
"mycursor = mydb.cursor()\n",
"sql = \"\"\"SELECT duration, marks FROM tbl_result_summary WHERE student_id = '%s' order by added_date desc\"\"\" % (student_id) \n",
"mycursor.execute(sql)\n",
"myresult = mycursor.fetchall()\n",
"df=pd.DataFrame(myresult)\n",
"df.shape\n",
"df.head()\n",
"df.describe()\n",
"\n",
"\n",
"df = pd.read_sql_query(sql,mydb)\n",
"df.plot(x='duration',y='marks',style='*')\n",
"plt.title('Student Mark Prediction')\n",
"plt.xlabel('Hours')\n",
"plt.ylabel('Marks')\n",
"plt.show()\n",
"\n",
"x = df.iloc[:, :-1].values\n",
"y = df.iloc[:, 1].values\n",
"\n",
"#Split the data into train and test dataset\n",
"from sklearn.model_selection import train_test_split\n",
"x_train,x_test,y_train,y_test=train_test_split(x,y,test_size=0.5,random_state=0)\n",
"\n",
"#Fitting Simple Linear regression data model to train data set\n",
"from sklearn.linear_model import LinearRegression\n",
"regressorObject=LinearRegression()\n",
"pd.plotting.register_matplotlib_converters()\n",
"regressorObject.fit(x_train,y_train)\n",
"\n",
"#predict the test set\n",
"y_pred_test_data=regressorObject.predict(x_test)\n",
"y_pred_train_data=regressorObject.predict(x_train)\n",
"\n",
"# Visualising the Training set results in a scatter plot\n",
"plt.scatter(x_train, y_train, color = 'red')\n",
"plt.plot(x_train, regressorObject.predict(x_train), color = 'blue')\n",
"plt.xlabel('Duration ')\n",
"plt.ylabel('Marks')\n",
"plt.show()\n",
"\n",
"print(regressorObject.intercept_)\n",
"print(regressorObject.coef_)\n",
"df=pd.DataFrame({'actual':y_pred_train_data, 'predicted':y_pred_test_data})\n",
"df\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"dataset.shape"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"dataset.head()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"dataset.describe()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"dataset.plot(x='hours',y='score',style='*')\n",
"plt.title('Student Mark Prediction')\n",
"plt.xlabel('Hours')\n",
"plt.ylabel('Marks')\n",
"plt.show()\n",
"\n",
"X=dataset.iloc[:,:-1].values\n",
"Y=dataset.iloc[:,1].values\n",
"\n",
"from sklearn.model_selection import train_test_split\n",
"X_train,X_test,Y_train,Y_test=train_test_split(X,Y,test_size=0.2,random_state=0)\n",
"\n",
"from sklearn.linear_model import LinearRegression\n",
"regressor=LinearRegression()\n",
"regressor.fit(X_train,Y_train)\n",
"print(regressor.intercept_)\n",
"print(regressor.coef_)\n",
"Y_pred=regressor.predict(X_test)\n",
"df=pd.DataFrame({'Actual':Y_test, 'Predicted':Y_pred})\n",
"df"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
\ No newline at end of file
{
"cells": [
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"from textblob import TextBlob\n",
"import pandas as pd\n",
"import mysql.connector\n",
"mydb = mysql.connector.connect(\n",
" host=\"localhost\",\n",
" user=\"root\",\n",
" password=\"root\",\n",
" database=\"inteljr\"\n",
")\n",
"\n",
"mycursor = mydb.cursor()\n",
"\n",
"mycursor.execute(\"SELECT * FROM conversations\")\n",
"myresult = mycursor.fetchall()\n",
"df=pd.DataFrame(myresult)\n",
"for index, row in df.iterrows():\n",
" edu=TextBlob(row[4])\n",
" x=edu.sentiment.polarity\n",
" if x<0:\n",
" sql = '''UPDATE conversations set sentimental = \"%s\" WHERE id=\"%s\" '''\n",
" val = (\"NEGETIVE\",row[0])\n",
" mycursor.execute(sql, val)\n",
" elif x==0:\n",
" sql = '''UPDATE conversations set sentimental = \"%s\" WHERE id=\"%s\" '''\n",
" val = (\"NEUTRAL\",row[0])\n",
" mycursor.execute(sql, val)\n",
" elif x>0 and x<=1:\n",
" sql = '''UPDATE conversations set sentimental = \"%s\" WHERE id=\"%s\" '''\n",
" val = (\"POSITIVE\",row[0])\n",
" mycursor.execute(sql, val)\n",
" \n",
"mydb.commit()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment