eduSteem update 3-9-2018

in utopian-io •  3 months ago


Classes started on August 20th, and so began the real world testing of eduSteem. Though most of the features I had hoped to have working by the start date were indeed finished I soon realized that the things I thought could wait were the very things I needed. Because of these sort falls in the project I haven't been able to use the program as I would have liked, but I am still confident that it will be an amazing tool for those that use it.

New Feature - Unit Lesson Controls (Copy,Delete,Move)

Screenshot from 2018-09-03 19-23-23.png

After starting classes I realized that some lessons are nearly identical, but without a quick way to create these lessons I was having to go through the process for each one, wasting valuable time. I also found out that as a teacher sometimes you have to change your plans on a daily basis, so I've added the needed functions to delete and rearrange the lessons to follow with the schedule.


pull request: 59

The functions needed for these features can be found in the course.js file along with the UI elements in UnitEditor.qml. For those interested here are the functions found in the javascript file.

function lessonCopy(unitNumber,lesson) {

    var d = new Date()
    var copied = []

   db.transaction(function (tx) {
       var unit = tx.executeSql("SELECT creationdate FROM Lessons WHERE unitnumber =?",[unitNumber])
       var count = unit.rows.length

    var pull = tx.executeSql("SELECT * FROM Lessons WHERE creationdate = ?",[lesson])

       if(pull.rows.length === 1) {

           copied = [pull.rows.item(0).id,
            pull.rows.item(0).unitnumber ,
            count ,
            pull.rows.item(0).duration ,
            pull.rows.item(0).about ,
            pull.rows.item(0).objective ,
            pull.rows.item(0).supplies ,
            pull.rows.item(0).resources ,
            pull.rows.item(0).guidingQuestions ,
            pull.rows.item(0).lessonSequence ,
            pull.rows.item(0).studentProduct ,
            pull.rows.item(0).reviewQuestions ,
            d.getTime() ,

             var dtable = "INSERT INTO Lessons VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"


function lessonDelete(unitNumber,lesson) {
    db.transaction(function (tx) {

        var pull = tx.executeSql("SELECT * FROM Lessons WHERE creationdate = ?",[lesson])

        var dtable = "DELETE FROM Lessons WHERE creationdate = ?"
    if(pull.rows.length === 1) {



function lessonMove(unitNumber,lesson,direction) {
    var moveit = 0
    if(direction === "up") {
        moveit = -1
    } else {
        moveit = 1

    db.transaction(function (tx) {

        var unit = tx.executeSql("SELECT creationdate FROM Lessons WHERE unitnumber =?",[unitNumber])
        var count = unit.rows.length

        var pull = tx.executeSql("SELECT * FROM Lessons WHERE creationdate = ?",[lesson])

        if(pull.rows.length === 1) {
            var currentNum = pull.rows.item(0).lessonNum
            var newNum = 0
            /* Lets keep it from moving the lesson into the negatives */
            if(currentNum + moveit > 0) {
                newNum = currentNum + moveit
            } else {
                newNum = currentNum

            tx.executeSql("UPDATE Lesson SET lessonNum= ? WHERE creationdate = ?",[newNum,lesson])




These functions are connected to the buttons found in the qml file to complete the actions.

New Feature - Schedule daily class controls

Similar to the first feature highlighted in this post, and chronologically the first implemented within the code I added new ways to edit the daily schedule. The new functionality allows the user to move or delete the classes within the day. Currently this propagates to the entire months calendar, but in future versions you can expect it to be on a day by day basis.


pull requests: 52,55

The implementation is rather straight forward, and can be found in Scheduler.js in the move_Class function.

Bug Fixes

pull requests: 52,55,56,58

  • SQL injection prevention: I have been working on updating all the sql calls to a more secure model suggested by @codingdefined . Most if not all the Sql actions have been scrubbed of the offending code.

  • Interface updates: Some of the edits to the lessons and calendars would not show up immediately after the changes were made. This made using the program frustrating as you would have to back out and log back in to see the changes. Though not all have been fixed I've made good progress in this regard.

  • Redundant code: At some point the fieldPull function was copied into two javascript files. I'm sure I had had a reason for this but most likely one was just left when I was refactoring the code for an earlier update. There are more areas that could get the same treatment, but as they don't cause confusion when reading the code so I haven't removed them yet.

  • Calendar propagation: In an earlier update I added the ability to add a class to a defined number of months dictated by the interface. It was working ALMOST the way it was intended, however I found an issue where it wasn't adding the lessons to months after December. This is now fixed.

  • Anchors away: Removed anchors that were not properly bound to a parent or sibling.


Find out more

This project is first and foremost for my classroom and the benefit of my students. It is my hope that when complete other families and schools will adopt the software, and use it in their homes as well. The feature list isn't set in stone but here are a few of its current and planned features:

  • School management including calendars, Courses, Students, and Teachers
  • Lesson plan creation and publishing to STEEM and to an in application store for other teachers to download
  • Student reports created and published by the students through an semi-automated process
  • Auto review (Quizzes) based on review questions added to lessons
  • media storage via IPFS
  • Student rewards based on completion of assignments
  • Micro-scholarships provided by the up-votes the student receives on their weekly posts

As with all my projects eduSteem is open source. Most if not all proceeds from utopian and steem are used for the continued development of this and my other software's and projects.

For further reading check out these other posts here on Steemit.

I also have a Patreon page here if you would like to show your support for the project. The proceeds will be used to maintain the house and my students education as Steemit and Patreon are my sole sources of income.

As always it is my hope that this software along with any of the other projects I have undertaken will be found useful to the community. I do this for the love of the challenge and the need for the software.

GitHub Account

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for your contribution. It's good to see you are working on improving your code based on suggestions. And that's true "Most if not all the Sql actions have been scrubbed of the offending code.", as because I can see some places it has to be done.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.

Need help? Write a ticket on
Chat with us on Discord.


Thank you for your review, @codingdefined!

So far this week you've reviewed 5 contributions. Keep up the good work!

Hi @bflanagin!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Congratulations @bflanagin! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes received

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

You can upvote this notification to help all Steemit users. Learn why here!

Hey, @bflanagin!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support!
Simply set as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord

Vote for Utopian Witness!