Integrating iCalendar in Moodle - php

I am working on a Moodle project and I have downloaded and installed the latest build(1.9) on my system. I'm using this framework for the very first time so presently trying to get familiar with the environment and the documentation.
My need is to embed an iCal kinda calendar on Moodle's front page using the PHP iCalendar API. I downloaded the latest version of PHP iCalendar but kinda needed some help figuring things out further. I am trying to build a plug-in sorta thing which allows you to put a custom-built calendar (in place of the regular Moodle calendar) on your Moodle site.
Has anyone ever worked with something similar before? Any suggestions?

On moodle.org, there is a change request for this feature in the Moodle Tracker that you might want to follow:
Calendar: IMPORT or Subscribe to iCal feed into Moodle calendar
.

You could try looking at the module development text. It could be fairly easy to do, but I haven't really worked with moodle that much. http://moodle.org/

This feature is currently a feature request in Moodle, but may take several version before it comes it becomes a core feature see the feature request here http://tracker.moodle.org/browse/MDL-16660.
The current workaround seems to be to use one of the commonly avaliable web based calendar system to import your ical feed and then inserting a html snippet into moodle to view it.
The obvious example would be to use a public Google calendar to do this but there is also:
http://assignaday.4teachers.org/
http://www.localendar.com/elsie
Reference:
http://moodle.org/mod/forum/discuss.php?d=82855

Related

How to add OAuth2 Server on a CakePHP 3 plugin

I am working on a plugin in CakePHP3 and I need to create a simply Oauth 2.0 Server API that allows to do a simple CRUD on the users' table and create sessions when needed.
I have done some research here in StackOverflow and it seems that the best choice would be
https://github.com/uafrica/oauth-server
Now, I have tried to make it work according to the doc in the repository but since it will be a plugin, not the core of the application I do not understand how it is supposed to work and which file I need to update.
Would somebody be so kind to give me the list of steps I need to follow and the actual files that need to be updated?
Many Thanks in advance
The uafrica/oauth-server project is woefully out of date. It requires v4.1 of league/oauth2-server, which is now currently at v7.2. Version 5 of that project was completely rewritten and is not backwards compatible with v4.x.
I don't think there's an out-of-the-box CakePHP 3 plugin that works with the current version of league/oauth2-server.
You'll have to either build your own plugin from scratch, or try to hack the uafrica/oauth-server project to get it work with league/oauth2-server.

Using PHP, how can I determine which CMS or framework is used?

Using PHP, can I find out which CMS or framework is used on a particular website. Eg Wordpress, Magento or Codigniter, Laravel.
I've tried this approach: http://dailyblogging.org/internet/detect-cms-and-scripts-of-websites/
This is what I actually want, but in code form, not as an online service: http://onlinewebtool.com/cmsdetector.php This should be a PHP script that does not run as an online service.
What will it take to do this, or at least give me a hint?
Update 2018
Github repo moved:
https://github.com/AliasIO/Wappalyzer/blob/master/src/apps.json
There is a Chrome extension called Wappalyzer.
You can see some regexp which are included in the wappalyzer project for detecting servers, cms and frameworks.
Maybe you can include this and write a php script that uses this:
https://github.com/ElbertF/Wappalyzer/blob/master/share/apps.json
For Drupal, view source
And if you find
/sites/all
/sites/
For including image/javascript/css, its Drupal based site.
Same way, if you find wp_content, its wordpress.
For MVC ftameworks, its difficult to determine as url routing is same for all.

Interacting with TFS using PHP

I need to develop an module that interact with TFS for our internal office application, but the project is in php, i have done searching a lot, but could not find a sdk or api in php that could do the following.
listing the work items for a tfs user
creating / modifying work items.
View work item details and get attachments
modifying work items
can anybody suggest an api / sdk that could do the above said actions,
note: we are not interacting with Visual Studio Online, we are using hosted tfs in our own premises.
thanks in advance.
Use the Java SDK for TFS and the PHP/Java Bridge and then try something like this (psuedo code only)
<?php
require_once("java/Java.inc");
$tfsTPC=new java("com.microsoft.tfs.core.TFSTeamProjectCollection","http://tfs:8080/tfs/DefaultCollection");
$projects = $tfsTPC->getWorkItemClient()->getProjects();
?>
P.S. My PHP knowledge died a long time ago, so I'm not sure if the sample code is quite right, but hopefully you get the idea.
Also, even though it's the Java SDK you're using you should be able to follow all the C# samples since the SDK methods are almost identical between the .NET and Java SDKs

Google Moments in google's own php library, are not working

I have struggled with google's php library, the latest version of which is available on their own website. While the simple google plus example they provide works fine (it's a basic login with GET features), there is no way to add a moment activity via app in php - at least not for me.
Their own example isn't working (the example can be retrievd in the library: examples/moments/simple.php)
Someone provides an answer here but the button demo they provide isn't working either if I press (authorization is fine, posting produces no action.
Does anyone have a suggestion on how to change their own php file so to make it work? I tired removing all the code and resetting it to the basic action: at least I am not getting oauth or php errors, but the file produces no action.
I understand that posting moments in php is not currently supported, but I have a web app and android implementation wouldn't work for me I think.
At the moment you need to get the library from the trunk, you can find instructions here.
This gist documents how to request permission and write activities.
The old moments api has been deprecated and those samples are for the old API, I'll remove them from the codebase as soon as possible. Thanks for raising this question!

Google Calendar - how to delete entries using PHP?

I'm working on syncing events from our project management DB into a google calendar using PHP.
Creating events in GCal works fine, but deleting them is proving to be a real pain, especially as there aren't any examples on how to do it.
Has anyone done this before in PHP (not on Zend Framework)?
Why you dont want to use zend?
Give a look at php nusoap class, but i strongly raccomand Zend.
It's the simplyest way to do that: here you'll find the full php google calendar api, and here how to delete events.

Categories