steventhanna / schenda Goto Github PK
View Code? Open in Web Editor NEWA tool to help students stay organized
License: GNU General Public License v2.0
A tool to help students stay organized
License: GNU General Public License v2.0
Again, going to have the async problem, passing the correct class to the page based on the pretty urls.
Why did I have to make the URLS pretty....
Before it was not working, but it really should work.
Swal will not let you close the alert once a class is updated.
It just says, ok, and then sits there.
error: A hook (`orm`) failed to load!
error: SyntaxError: Unexpected token <
at Object.parse (native)
at Database.read
There is no response when <a href="/class/<%= classroom.urlName %>/tasks/<%= tasks[i].tid %>" id="actions" data-target="#taskActions" data-toggle="modal" class="action" style="color: <%= classroom.color %>"><i class="fa fa-ellipsis-v"></i></a>
is clicked.
However, when you right click, and Open in New Tab
, everything loads as it should.
Very strange.
For some reason, the browser console throws a null exception error when it tries the following code:
var description = document.getElementById('noteDescription').innerHTML;
I have been able to get around the error, and get the system to execute the rest of the code by doing the following:
try {
var description = document.getElementById('noteDescription').innerHTML;
console.log(description);
} catch (e) {
console.log(e);
}
The console message in the browser is the following:
TypeError: Cannot read property 'innerHTML' of null(…)
Is it possible that I should use .value()
instead?
When task information needs to be changed, I no longer have to look up the user, then the classroom, and then project, and finally the task... Instead just look up the user, and then the task. Saves time, and code. Makes things run quicker also.
If there is no duedate assigned to a task, then the task is just randomly in the array.
The description div on task.ejs
is not operating as it should.
<div class="description">
<% if (tasks[i].note == "") { %>
No notes
<% } else { %>
<%= tasks[i].note %>
<% } %>
</div>
For some reason, it spits out No notes
each time. That should not be the case.
The browser decides to take a coffee break each time I want to create a new note, with a duedate..
Dates are showing up almost 20 days before they should. God knows why this is happening.
I do not know if it is being saved to the database incorrectly, or if it is actually a database issue.
They are being saved yyyy/mm/dd instead of dd/mm/yyyy
Figure out a way to do this. Ask @sotch-pr35mac for assistance if need be.
To preserve db data, the method remove
should do the following:
Instead of
Did not know the existed... But they do. Should make my life easier.
In order to create pretty URL's for the end user, I use the following routes:
'GET /class/:className': {
controller: 'user',
action: 'classHome'
},
With className
being the regular className, with -
instead of spaces.
The flow for looking this up is as follows.
The problem lies with the possibility of users attempting to create two identical notes, or two identical classes... This needs to be fixed in the backend...
Sort tasks by date due.
These are really a pain in the ass.
The EJS is causing these type errors to be triggered. Especially if it is inside of an if statement.
I need to think of a way around this.
I am having an issue passing all classrooms to the overview
page...
My thought process is the following:
user.classes
.classList
.Classroom.findOne
.classList
classList
to the page.undefined
, although when I console.log
the information gathered, ie classList[i].name
, it prints the correct information to the console.... Keep in mind this is still in the for loop... When I console.log
outside of the for loop, information is printed undefined
.overview: function(req, res) {
//Lookup the user in the database.
User.findOne({
id: req.user.id
}).exec(function(err, user) {
//Handle errors looking up the user in the database.
if (err || user == undefined) {
console.log("There was an error looking up the user. Error Code 007");
//Report a 500
res.serverError();
} else {
var classIdList = user.classes;
// console.log(classIdList);
// console.log(classIdList.length);
var allClasses = [];
for (var i = 0; i < classIdList.length; i++) {
Classroom.findOne({
cid: classIdList[i]
}).exec(function(err, className) {
if (err || className == undefined) {
console.log("There was an error looking up the classes from the CID list");
res.serverError();
} else {
var classroom = {
cid: className.cid,
name: className.name,
urlName: className.urlName,
tasks: className.tasks,
projects: className.projects,
notes: className.notes
};
allClasses.push(classroom);
console.log(className);
console.log(className.name);
}
});
}
console.log(allClasses);
console.log(allClasses.length);
res.view('dashboard/overview', {
user: user,
classes: allClasses
});
}
});
},
Yeah this needs to change.
Its not that it is having an error, but rather it will not change from incomplete
to complete
. I am just going to rewrite the function in the morning.
They are just too much of a hassle.
Auto-saving for notes.
To reduce the strain on the server, the note should autosave to the local cache continuously. Every x
minutes, the page should make a PUT
request (per @sotch-pr35mac recommendation) to the server.
Now I just have no clue how to deal with the local cache.
Create a note preview tab inside the edit note... Should not be too bad?
Maybe we should have a section that contains all the notes?
Like chapters in books?
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.