PHP SDK Opencloud/Openstack - How to add X-Storage-Policy in header? - openstack-swift

I am using php sdk openstack v1 for opencloud and I would like to know while creating container I want to add custom header for "X-Storage-Policy" then how can i add custom header?

I got the solution, its working by passing metadata argument while creating container.
Its done :) Thank you all

Related

Creating moodle plugin to accept REST calls and create activities/notice/files

Im quite new to moodle development. Im trying to post activity/notice to a selected course. I could not find any webservice for creating activities within a course. Is there any way i could create a plug-in where i could make a REST call to the plug so that it would create a notice?. An example would help allot.
STEP 1
To create local plugin you can follow following folder structure according to Moodle documentation (https://docs.moodle.org/dev/Local_plugins)-
local/
yourplugin/
db/
access.php
install.php
install.xml
lang/
en/
yourplugin.php
index.php
settings.php
version.php
Meanwhile, creating local plugin does not always really solve all problems as there are limitation depending what you really want to achieve.
what worked for me was editing //moodle_dir/course/modedit.php file, and i was able to make REST Call to add scorm activity to any course i want.

Update Template description using Python SDK for Smarsheet API

Asking with hopefulness.
Is there are way to update the Template Description either directly or using the Python SDK?
I'm guessing "no" since the only way to see the Template Description after creation is via the API (can not via the GUI).
-Craig
No, the template endpoints are read-only.

How to crete New Web Service inside moodle?

I am go through the service module inside moodle , how can i add my own function and class for handling some operations such as enrolling and register . is it possible or not
You need to create a new plugin (probably a 'local' plugin) and add a webservice within it:
https://docs.moodle.org/dev/Adding_a_web_service_to_a_plugin
this might help
https://docs.moodle.org/dev/Web_service_API_functions
even this---
https://docs.moodle.org/31/en/Using_web_services
I created a new web service "core_completion_override_course_completion_status"
Duplicate any existing web service and replace the words as per your need in the method name, class name etc.
Increate Moodle main version from version.php in root moodle folder.

Is it possible to set WebTrends DCS ID dynamically in Swift project

I am working on iOS application. I need to implement WebTrends analytics in my iOS application.
Can I set WT_DCSID dynamically after load data from server.Because I have got WT_DCSID from server not static.
Can I do it or not. Please suggest it.
Plese take a look at advance configuration link.
Based on this doc, you would use something like:
WTDataCollector.sharedCollector().setValue("dcsxxxxxxxxxxxxxxxxxxxxxx_xxxx", kWTConfigDCSID, persists:true)
You still need to set a default wt_dc_dcsid in the webtrends.plist as this is what is read when Webtrends loads it's configuration. You can simply overwrite it after that point programmatically.
Thank you,

GTMOAuth2ViewControllerTouch doesn't show login screen

I'm using objective c gdata client and I have a problem with GTMOAuth2ViewControllerTouch. It was working for me (shows UI, returns callbacks), but now it shows just empty white screen. Any ideas?
So, I have found a solution. It seems to be a wrong build configuration for gdata static library. So I have unset GTM_INCLUDE_OAUTH2 to not include gtm auth controllers to static library and then add this classes directly to application. gtm auth can be found here.
You have to add the GTMOAuth2ViewControllerTouch.xib in your project