learnlinux / tuxlab-app Goto Github PK
View Code? Open in Web Editor NEWA Platform for Creating Interactive Linux Courses
License: GNU General Public License v3.0
A Platform for Creating Interactive Linux Courses
License: GNU General Public License v3.0
We need to implement a Javascript function as part of the TuxLab object used in labfiles which enables instructors to write to a specific users' course record in a safe manner, as specified in the schema:
https://github.com/learnlinux/tuxlab-app/blob/master/docs/db_schema.md
We should allow instructors to hide labs which we don't want users to be able to see, and disable labs if they are past due. Both of these fields should be booleans in the lab schema, and should be respected when using Meteor.publish and initializeLab methods.
Instructor views are not separate:
https://github.com/learnlinux/tuxlab-app/tree/master/client/imports/ui/pages/instructor
Rather, instructor views are handled in the same components as the regular user views, but will simply have a check to determine if the current user is an instructor.
With this in mind, we need to create one more static views for:
and also update the existing views to include custom content for instructors:
Updates to https://github.com/learnlinux/tuxlab-app/blob/master/server/imports/lab/methods.ts
Currently, there would be major issues if the instructor chose to edit the lab after the student had begun. We need to fix this.
We need to implement a standard for logging in the tuxlab-app. I think the best framework, at least for our sake, is Winston, as it is machine readable, which will enable us to create status dashboards in the future. @trunkatedpig I want you to walk through the existing Meteor code and in any place where an error message would normally be outputted, replace it with the appropriate call for Winston. The Winston object should only ever be created once- probably in startup.
@cemersoz be aware this is happening, and start flagging possible things we want to log.
Tasks Schema needs to be updated to ensure that the task IDs are unique and are continuous from 1 to the length of the array.
I20160711-11:45:24.677(-4)? Exception from sub user-courses id LDPG7KAyHX6of4i9M TypeError: Cannot call method 'concat' of undefined
I20160711-11:45:24.759(-4)? at Subscription. (collections/courses.ts:61:58)
I20160711-11:45:24.760(-4)? at Computation. (packages/peerlibrary_reactive-publish/packages/peerlibrary_reactive-publish.js:313:1)
I20160711-11:45:24.760(-4)? at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)
I20160711-11:45:24.760(-4)? at packages/meteor/dynamics_nodejs.js:123:1
I20160711-11:45:24.760(-4)? at packages/peerlibrary_server-autorun/packages/peerlibrary_server-autorun.js:446:1
I20160711-11:45:24.760(-4)? at packages/peerlibrary_server-autorun/packages/peerlibrary_server-autorun.js:424:1
I20160711-11:45:24.760(-4)? at Function.FiberUtils.synchronize (packages/peerlibrary_fiber-utils/packages/peerlibrary_fiber-utils.js:163:1)
I20160711-11:45:24.761(-4)? at Computation.Tracker.Computation.Computation._runInside (packages/peerlibrary_server-autorun/packages/peerlibrary_server-autorun.js:413:1)
I20160711-11:45:24.761(-4)? at packages/peerlibrary_server-autorun/packages/peerlibrary_server-autorun.js:438:1
I20160711-11:45:24.761(-4)? at Function.FiberUtils.synchronize (packages/peerlibrary_fiber-utils/packages/peerlibrary_fiber-utils.js:163:1)
As we approach a finished product, I want to begin making some tweaks to the template:
We need to begin creating data bindings for the LabView (which would be the split view between the documentation and the terminal). @sandershihacker already has a template in place. @cemersoz I want you to begin by publishing the following data to the user:
There are a lot of issues with the API Tests in Gagarin:
https://github.com/learnlinux/tuxlab-app/pull/12/files
See comments above.
You CANNOT simply publish an entire collection (
tuxlab-app/collections/courses.ts
Line 7 in de9bc0d
In addition, remember that you should be limiting what data is sent to the client- they do not need a copy of the labfile, or tasks (this should be hidden for them until they complete them). I have made this a lot easier by splitting courses and labs into separate databases.
@cemersoz I get an error in the latest version of TuxLab app:
collections/labs.ts (7, 30): File 'server/imports/lab/checkLab.d.ts' is not a module.
Be sure to ask @cemersoz about the schema. He is now an expert in the Meteor.user() object.
@cemersoz - I need you to fill in the code allowing the server to verify an incoming LabFile:
https://github.com/learnlinux/tuxlab-app/blob/master/collections/labs.ts#L72
After this is completed, retag this issue as for Alpha.2, because we need to implement the LabFile upload. I would be sure to use the CollectionsFS API for fileDrop functionality (it is much easier):
https://www.angular-meteor.com/tutorials/socially/angular2/handling-files-with-collectionfs
When the user selects a lab, we need to display an interim loading screen so we can prevent any errors that the Markdown View / Terminal View would have otherwise.
Add verification to validate Lab IDs. Currently blocked by SimpleSchema:
In order to preserve memory, we should only have one copy of a given lab object open at a time. Instead of evaling every time a user loads a lab, you should check to see if that lab is already in the cache, and use that copy if possible.
We already have Underscore by virtue of Meteor. There is no need to reimport it. Plus, the point of underscore is to use underscores:
_.unzip([]) not underscore.unizip([])
https://github.com/learnlinux/tuxlab-app/blob/master/server/imports/api/lab.env.js
I am having the same problem as @cemersoz - I have a lot of merge conflicts because of the tabbing which is being done automatically. Use Atom or Visual Studio or some self-respecting editor.
This needs to function is one and/or both of the records exist:
https://github.com/learnlinux/tuxlab-app/blob/master/server/imports/api/env.js#L68
We need to begin assembling a test which can insert the example data into the database, and test the mongo authentication roles and schemas within the application.
We should probably avoid having to do a separate database operation to inject a course into a lab. Instead, we should do this automatically.
First, we need to make sure that Aaron is passing you the appropriate ETCD Authentication details, and that you are using them (if they exist) in connecting to ETCD.
Second, when the "magic method" is called and the LabVM is created, we need to use node-etcd to create two different records in etcd:
This record points the SSH address (username.cmu.tuxlab.org) to the IP Address of the Docker Host containing the LabVM environment. This should be a simple A record in the format of HelixDNS.
The proxy record creates a pipe between an incoming WebSSH or SSH request and the destination VM. You need to create records which are formatted to the standard of RedRouter, which is a key at SSH::username
with just the docker-container and allowed-auth-methods fields set.
We may have more than one editor in the future (as we would enable a Javascript code editor for LabFiles). So renaming the existing one to mdeditor would be good:
https://github.com/learnlinux/tuxlab-app/tree/master/client/imports/ui/components/editor
It would also be beneficial to give students the option to "reset" to various save points. In order to implement this, I believe we can use the Docker Commit action, which saves a diff between the current state and the original image.
In addition to the reset option, it would be good to have a way to pipe this into the database in case an instructor wanted to use it / review it / grade it.
UPDATE:
The best way to do this is with export. However, this is probably a post-beta feature.
I noticed that lab.import.js was deleted in your repository. Is this what was intended?
I had to split the labs database off from courses (it is easier in the long run). This means you may need to update some of your code.
Pull from my fork:
https://github.com/DerekTBrown/tuxlab-app
Find all the places I used //todo @sander
Fill in with Schemas according to the schema definition (https://github.com/DerekTBrown/tuxlab-app/tree/master/collections)
Make sure to use nested schemas and array definitions wherever possible. Also make sure to allow any fields which can be optional to be optional:
https://github.com/aldeed/meteor-collection2#attach-a-schema-to-meteorusers
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.