:D
ryanmarten / delicountr Goto Github PK
View Code? Open in Web Editor NEWOnline student Help Queue Designed for Westwood High Classrooms
Home Page: http://www.mholthouse.org/rmarten/index.php
Online student Help Queue Designed for Westwood High Classrooms
Home Page: http://www.mholthouse.org/rmarten/index.php
:D
I have seen in one of your TODO Lists, you have this random sharing link todo. Well im going to give you an appoarach which is using this function.
/*
{NOTE} : Randomness Level To High Causes
Less Randomness.
*/
function generateUUID(randomnessLevel) {
var d = new Date().getTime();
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = (d + Math.random() * randomnessLevel) % 16 | 0;
d = Math.floor(d / 16);
return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);
});
return uuid;
};
You can see in the function it generates a random UID. Well, once it does that you upload the UID To the database with the queue. and then, im sure in PHP There is a handler for variable parameters in the url. For example in AngularJS Its $stateParams. And there you go, the jobs done.
Well , for the teachers page protection, its very simple. All you have to do is, when the user first registers again you give him a random UID By using function above to ensure randomness. After you do that this hapenes. After that you must put an addintonal parameter in the URL for teacher page, like /teacher/{UID GENERATED}. Now, Lets say a student tries to acess Teachers page. What first will happen, is that you have to get the current active users UID. After you do that you check the Students UID with the URL Parameter UID, and if they match. Sucess thats actually the teacher in this case he is not, so he will be directed and warned that he will be banned if he attempts another practice like this. I hope this helped.
Demo Of UID Registration: https://repl.it/C3Fe
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.