Developing Moodle Plugin for control the activity - php

I am totally new in this concept. I received a task in which I need to create Moodle plugin for course.
In my course I have two sections where Only videos will be uploaded by teacher. I want to create a plugin to use user webcam while they are playing that video and capture the screenshot. For example, they click on play then webcam will start. so, my question is.
is this possible? and where should I start doing development like in local folder? or in mod folder. I just need some guidance from where I need to start. although I have a simple core code written by myself in php and JavaScript where I can start video when user play video. but I want to integrate that into Moodle, but I don't know from where to start.
I did some research, but it shows the activity plugins should be in /mod folder but I don't know how I should start.

Here's the documentation for developing an activity plugin - although it can be complicated if you are new to Moodle
https://docs.moodle.org/dev/Activity_modules
If you are new to Moodle, there is a free beginners course here for developers
https://moodle.academy/enrol/index.php?id=64
Also recording video isn't an easy task - its always worth checking to see if a plugin already exists - here are contributed plugins
https://moodle.org/plugins/?q=record%20video
Poodll is a popular set of plugins, they already have one for recording video
https://moodle.org/plugins/qtype_poodllrecording
Maybe use one of those as the basis for your plugin

Related

Getting google document onto Wordpress post editor

I have a wordpresss blog where i post a lot of stuffs. Sometimes a few people do write contents for me. They usually write it on google docs and they send me a link.
I would like to write a small plugin whereby on each post there is an option to input the google doc link for an article and pressing a button brings the post onto the wordpress editor.
I much confused about how to proceed with the google docs api part? what is the easiest way to achieve the import ?
Try docs-to-wordpress plugin
This plugin will grab docs out of a collection in Google Docs, create or update a post in WordPress and then move the doc to a new collection. Google Docs no longer supports xmlrpc, so this is perhaps the easiest way to move content from your Google Docs account to your self-hosted WordPress install.
Here's a Google script that will convert a Google Doc to a nice clean html email, that you can copy and paste in a Wordpress editor.
http://omaralzabir.com/googledocs2cleanhtml/
Hope this helps. I have been looking for a solution for a long time. Finally, had to spend some time and make one for myself, as I use Google Docs for authoring my blog posts.
My company just released this Google Drive app. It automatically uploads your Google document to WordPress, including all your images. It also adjusts all the formatting to fit your blog's theme.

PHP/jQuery Instagram gallery on website

I'm looking to have a gallery on my website that contains the images from my Instagram account. I haven't been able to find my resources that explain the process of interacting with the API for this purpose. Can anyone point me in the right direction? Ideally the gallery would have folders by month, sort of like an archive feature.
Did you check this out? It seems straightforward.
http://snipplr.com/view/58083/
You can use the Instagram API and create a Javascript solution manually. But this will take time.
The API that you need is -
https://api.instagram.com/v1/users/{user-id}/media/recent/?access_token=ACCESS-TOKEN
Or You can directly use a simple plugin like Youmax-PhotoMax.
PhotoMax will create an Instagram Gallery from your user account. The Archiving feature you will have to add manually into it. But most of features like filtering images based on #user or #hashtags will already be present in there.
You can check out the demos here.

Notify web page about a plugin new version php

I'm developing a web application where users can upload multiple plugins. I want to give an extra value to my app with a feature like wordpress plugin version adviser. I don't know how to deep in this area in order to investigate. I hear someting like "pingtracks", but not sure if this the correct way. Well, that's my doubt, how can I determinate if there is a new plugin version to uptade?
Thanks in advance.
PS: There is a table in my db with all plugins relevent data like url, author, current version, etc.
Each plugin should have a URL for some sort of update manifest. The resource at that URL should contain information such as currently available versions, and the URLs of files that need to be updated. This file could be as simple as static JSON data.
Please remember to use HTTPS, so that it is harder to spoof your update site.
Every time that user uploads a new plugin, check the "current version" in your DB and compare it with the last same-named plugin uploaded. (create another table for saving needed data for example)

How to implement a backend with AJAX, PHP, and MySQL for dynamic video sources when using Google TV Templates?

For people interested in doing web apps for Google TV, especially those with video content, the easiest way is use Google TV Templates: https://developers.google.com/tv/web/docs/gtv-templates.
The original Google TV Templates were developed with video source files hard coded in Javascript file. A number of people have asked about how to implement a backend with PHP and MySQL and store video sources there so that they can be dynamically loaded from frontend within the Templates. The following article was written to address this question.
https://developers.google.com/tv/web/docs/ajax_gtv_templates_tutorial
The tutorial walks you through how to set up a database in MySQL (i.e. schema, sample data), PHP code to serve data, and modified Javascript to do AJAX loading.
Currently to add video source data into the database, one can use straight SQL but it may be more desirable to build a PHP admin front end.
A bug was recently reported by Maurizio on Google TV Developers +page: https://plus.google.com/117492290125593364976/posts:
"Hi, i downloaded the html5 template mysql version. it is working fine but if i add more than one category , the last one added is repeted. Do u have any idea of how i can fix this problem? many thanks."
I'll follow up with a fix.
A fix to this bug is available and a new download is at: http://gtv-resources.googlecode.com/files/gtv_template2_ajax_php_mysql.tgz
The actual fix is in this php file:
http://code.google.com/p/gtv-resources/source/browse/trunk/gtv_template2_ajax_php_mysql/videosources.php
If there is interest, please ask a question and I'll write up an admin page as well.

Creating a journal website

As a project I would like to create a website that allows a user to login (create a login/password if doesn't exist) and enter some data for the day (say miles run, calories burned, situps done, etc). The website would record this data for the user for that day and build a running log of various activities. The user would be able to go back and edit entries. The user could then view the history of their various activities.
I have written some perl code to handle the various analysis that I intend to do on the user-entered data. I also can easily create a perl script to save a flat file with the user generated data appended with the data and allow editing.
But I have no clue how to get this into a web experience and unfortunately I don't even know where to start!
Any idea how I should go about doing this? It doesn't need to be a super fancy website, just functional. Where should I start?
Thank you
See Ovid's CGI Course. CGI.pm is a simple Perl tool to create web pages. For more advanced tool look at Mojolicious framework. I use CGI::Application framework but it is old and for me it is already too simple, Catalyst and Mojolicious are more advanced.
I would use WordPress or Drupal as the basic framework. In Drupal7 you'd create a new content type, in Wordpress you'd create a new "Post Type" (new as of WP 3.0) for users to enter data. You'd then write code to fetch & process that data.
But you could off course just use WordPress with the Runners Log plugin (and Drupal probably has a similar plugins), if you wouldn't want to do the coding ;-)

Categories