Command line moodle plugin

Command line moodle plugin

by Frédéric Moreau -
Number of replies: 13

Hello,


I would like to allow users to type command in a GNU/Linux online shell. The shell should be connected to a KVM virtual machine running a GNU/Linux system. I know this sounds quite hard to achieve, but :

* Do you know if any Moodle plugin allows to type commands.

* Are you aware of a Moodle site allowing to type command.


Kind regards,
Frédéric Moreau

Average of ratings: -
In reply to Frédéric Moreau

Re: Command line moodle plugin

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Interesting question. What you want is to give the participants a Unix shell. For obvious reasons it can't be a "real" shell of the Moodle server itself. So you have basically two choices. Either a dedicated Unix instance, a so-called jail server, or simulating a shell on HTTP, for example on a JavaScript framework. There are two related plug-ins for program commands, the Virtual Programming Lab and the Code runner. Both need a dedicated Unix. Their advantage is that both are "integrated" in to Moodle, the communication with the teacher, assessments of the work, etc. work the same way as any other Moodle activity. I am not aware of a shell simulator for Moodle. Over the years we had various (not Moodle-related) solutions to this problem. Now the BYOD is upon us, we either give the participants a Linux VM or give them instructions on how to install the Unix of their choice on VirtualBox. This has two big limitations: 1. not integrated in to Moodle, 2. not all the participants master their "devices". Can't help.
In reply to Frédéric Moreau

Re: Command line moodle plugin

by Ken Task -
Picture of Particularly helpful Moodlers

Not a developer ... and like Visvanath ... not aware of other such plugins ... cept the ones already mentioned.

However, maybe something to think about ...

As Visvanath pointed out, VirtualBox/VMWare on local machine means teacher cannot access to help IF student messes up big time but there is yet another option ... factors depending ...

In Amazon and Google, there are prebuilt OS instances ... some even include a certain web based app like  a Moodle.  Can't find the article now, but a gentleman did share how he did Google instances ... which all had a 30 trial  ... teacher shared the instance ... students could 'install' under their own accounts.

30 days in the free tier ... after which, the individual student and the option to pay X amount per month.

30 days isn't much time for a class.

Amazon surely has something similar.

Would think, however, the Google route would be better just because the student account would have access to Google Docs and Google Drive ... which would be very compatible with a Moodle instance using Google's Oauth2 authentication - and Google Drive.

2 cent opinion ...

'spirit of sharing', Ken




In reply to Ken Task

Re: Command line moodle plugin

by Frédéric Moreau -

Thank you for the answer and the modules for programming assignments.

@Ken Task

Linux includes its own virtual machine system called "KVM". So you can create an unlimited number of virtual machines without paying Google or Amazon. You only need IPv6 and a dedicated server with enough RAM and CPU. 


@Visvanath Ratnaweera

Yes, I am really looking for a Unix shell inside Moodle. I was thinking of KVM as backend for vitual machines. I am runing dedicated servers.

Recently I saw an example on Internet of a tutorial with interactive shell included. You could configure your Linux server and restart it. I will get back with a precise link, so we can study it.

Scaleway (a French provider of virtual machines) allows to administer the virtual machines using a shell inside the browser. You can reboot your server in rescue mode and access the shell inside your browser. Another example is the Unix shell of IPMI managers in Supermicro servers. DELL servers should have the same features. So it is possible to have a shell inside a browser.

In reply to Frédéric Moreau

Re: Command line moodle plugin

by Ken Task -
Picture of Particularly helpful Moodlers

Hmmmm ... 'server with enough RAM ..." ... with remotely hosted no investment in hardware at all.

Still ... you might investigate:

https://cloud.google.com/edu/

And I think if student wanted to pursue more than what was offered in your class they could take over accounts and thus not be bound by any curriculum sequence.

And, on linux, there is software student could use to make a text based screen movie ... that can be shared.

Anyhoo

'spirit of sharing', Ken


In reply to Frédéric Moreau

Re: Command line moodle plugin

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Frédéric

I too could use something similar.

These are the things which are important for me:
- Integration with Moodle
I have plenty of solutions without. The problem with "loose" tools is that I can not guide the students.

With "integration" I mean:
a) students can practice (I see the stats)
b) when they are ready, they can upload/show me the solution
c) I can easily test their work (not download shell scripts and run on my machine)
d) and grade them

Basically something like the VPL for the Unix shell.

- Non-privileged shell
Is a must. Whether directly on the OS or simulated doesn't matter.

- A root shell (luxury)
to teach system administration. Obviously two people can not share root access. Not an easy thing. But not a must.

I am not actively working on it since I have my "loose" solutions. Still keep us informed on your progress.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Command line moodle plugin

by Ken Task -
Picture of Particularly helpful Moodlers

@Visvanath

Ok, now you've peaked my curiosity ... these other 'loose' solutions ... mind sharing info about them? (without giving away the store, of course).   Could handle links to info.

For years, in a former life of IT/Admin for schools using Moodles, I had searched for but never found anything that could be used (safely) for students interested in server admin or just linux CLI.

Thanks in advance for any info.

'spirit of sharing', Ken


In reply to Ken Task

Re: Command line moodle plugin

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Ken

You overestimate my "loose" solutions. They are pretty low-tech. For example ask the students to record their terminal with a tool like script and upload the typescript file in an assignment. I have replay them in my computer. Last time I gave everybody a (non-priviledged) shell account in a Raspberry Pi. It was in the Univ. DMZ reachable from outside through its public IP address. Synchronous classes on the Pi was fun, they could explore old school communication programs like mailx, write and talk.

For root access they had to start an OVA image we provided in VirtualBox, either in their laptops or come to the lab. Today, I would go for a live USB system. Those are the kind of "loose" solutions, in the sense no tight connection to Moodle. A luxury solution would be an add-on to VPL which allows spawning KVM instances on the the server. Students should get the console remotely - need to be independent of the network configuration of the VM.
In reply to Visvanath Ratnaweera

Re: Command line moodle plugin

by Ken Task -
Picture of Particularly helpful Moodlers

Thanks.  Those kinda sound like some of my mis-steps ... but didn't have a Ras's or other ... just a single CentOS boxen. :|

Still though, given the social media's emphasis on Cloud and the fact that's where all this stuff is leading ... at least media would have one think so ... a Google Compute Engine instance initially setup by prof/teacher would give students 'cloud' experiences.

When I first dove into that environment, can recall setting up 2 - one on CentOS and the other Ubuntu ... got busy with other things after initial launch of the Ubuntu and didn't do the first thing an admin should do ... apt-get upgrade, etc. to get the latest fixes/patches.  2 days later, a message from Google saying that server had been involved in network activity and if I didn't fix it in 2 days time, it would be removed.  (help desk turn around time was 5 biz days so couldn't get more info on it).   Dropped it instead.

But it was nice to know that Google was paying attention!   Have seen some remotely hosted VPS systems that provider had not  clue ... uhhhh ... not good!

Anyhoo ... back to more 'fun' in Moodledom! smile

'spirit of sharing', Ken


In reply to Ken Task

Google Edu and other nebulous affairs [OT]

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Ken, with due respect to your contribution to the community, there is one thing we do not share: Your fascination for Google. I don't have to tell you, Google makes one's live convenient, for a price - they take control of your (virtual) life. I know that not many care. But pawning your life is one thing, herding your students to the kraken, that is a breach of trust!

OK, Google is not Facebook, https://www.bbc.co.uk/search?q=facebook, which gives us a new scandal each week. There is no reason Google to be better.

Forget all that. Why do you go from Free and Open Source Software for closed source; even worse embrace Software as a Service? I am not too keen on a tedious discussion. Thought of placing this comment for those who land here "from Google". Possibly https://moodle.org/mod/forum/discuss.php?d=381897#p1539757 is a better discussion.
In reply to Visvanath Ratnaweera

Re: Google Edu and other nebulous affairs [OT]

by Ken Task -
Picture of Particularly helpful Moodlers

And with all due respect to your contributions as well ... smile

"herding your students to the kraken, that is a breach of trust!" and then say ...

"I am not too keen on a tedious discussion"

Now how is one to not take that seriously ... and respond ... regardless of thread!

Much depends upon one's environment ... and I mean country, + State in my case (Tx).

When Google for Edu and Google Classroom came out, there was a mass exodus from Moodle - especially for Elemenary and most Jr. High teachers.   High Schools seem to stay ... but are struggling with many things one can do with Google Suite rather easily ...  but not inside a Moodle.

Besides that, many ISD's have opted to go with ChromeBooks in addition to iPad's.

Wouldn't call either of those 'open'.  Are ISD's leading their students to 'other krakens'?

Besides that ... for years, schools have 'herded' students to another 'kraken' ... that of Microsoft.  And here's a kicker ... in Texas we have a State Board of Education which does decide directions public schools take ... one member is a lobbyist in State Legislature for Microsoft!

There is a state wide organization promoting the use of Technology in schools called TCEA ... every year they organize a 'visit' to the Legislature to 'talk tech' with those that make laws affecting all schools.  In prep for that TCEA sends out a "TCEA Recommendations" list to members.

Sweeping ...

"Replace the outdated time-based system (Carnegie unit) of awarding credits and funding with one that is based on a student’s competency."

and here's one where a Moodle could fit ...

"Allow school districts to create their own full-time or part-time TxVSN school, if only within their own district boundaries."

I used to work (retired from) an Education Service Center in South Texas ... had many small school districts that were rural and whose total technology budget annually was $2500.00.  Even with special M$ licensing for schools once one applies that to the budget ... doesn't leave much to work with.  But, Linux servers for many things fits - and that's what I did ... provided a 'free solution' for cash strapped schools - which included Moodles.

Now that's in schools ... I have also supported (for years) a corp and their multiple Moodles.   No thought of Google there.

Besides ... the youth are more technically aware than in the past ... and they will become and are becoming tech consumers in their own right.  Heck, there's change afloat right now with a generation coming to positions of decision making.  Funny, I'd venture a guess that many of those folks ... use iPhones!

So IMHO, historically, schools have been herding students to krakens for years!

My suggestion for students to get hands on in a Google hosted Linux server which is capable of 'cloud' isn't saying this is the only way to do it and could give them insight into the yin/yang of it.

Ok, nuff said. smile

'spirit of sharing', Ken



Average of ratings: Useful (1)
In reply to Ken Task

Re: Google Edu and other nebulous affairs [OT]

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Ken, the rant was worth it! ;)

The disagreement turned out to be minor: Even for on-line Unix shell accounts for students I avoid going to Google whereas you wouldn't really mind. That is a detail.

The big picture, pawning school children to data kraken, that is the success story of a shameless lobby, on that we agree. In your environment it is Google, in mine it is Microsoft. Those are just circumstances. Only thing, I haven't accepted that as inevitable. I manage a couple of active and productive Moodle instances defying Microsoft and other "Ed-tech" tools.

And the obvious, for the benefit of the visitors here, if you want to own your data - don't forget, data is the petroleum of the 21st century - you have to run your server. Whether they are Open Source or Closed Source is in this connection secondary.
In reply to Visvanath Ratnaweera

Re: Google Edu and other nebulous affairs [OT]

by Colin Fraser -
Picture of Documentation writers Picture of Testers

@Ken @Visvanath,

Too often technology common sense is overwhelmed by slick marketing and "brave new world of the future". The stated intention of the Dark Side is to treat technology the same as a utility. We used to create our own energy in our own hovels, which, OK, is not a great solution, but it was reliable, as long as we didn't burn the house down. Along comes gas lighting and stoves, a huge improvement, as long as we remembered to turn the gas off at night and not kill ourselves by suffocation or burn the house down. Then electricity changes it all, and we are now saddled with a never ending annual, quarterly, monthly or weekly payment. 

This is what is now happening with technology, we are being bamboozled by "inevitable" changes making it "cheaper" or "more cost effective" and  all the time, we are moving away from self sufficiency, just as we did going from wood to electricity. There will be a huge cost, the only thing that is really "inevitable", somewhere along the line, I expect, but I have no idea what that cost may be. 

BTW, we had a blackout here a little while ago, 1.4million people went without power for 4-16 hours. You should have been able to hear the cry around the world. They laughed at us in Perth and Sydney, but they are not laughing as more and more people are now connecting to solar panels, returning a little self sufficiency to the individual. I wonder how that will happen with technology when it does all go wrong?