How to let office online own the style of view mode? - ms-wopi

Recently, I would like to use the “edit mode” of Office Online Server to open the Microsoft Word file as follows:
http://office-online/we/wordeditorframe.aspx?WOPISrc=...&access_token=...
However, I notice that there is no gap between two consecutive pages, please see the following screenshot.
In addition, when I use the “view mode” to view a word document with wordviewframe.aspx, the presentation of page is normal.
http://officeonline/wv/wordviewerframe.aspx?WOPISrc=...&access_token=...
But this time I discover that the Edit in Browser button(in the top right-hand corner)cannot be used.
I have added the attributes such as
HostEditUrl, EditModePostMessage in CheckFileInfo described in official document.
So I have two questions:
1) How to let “edit mode” own the style of “view model”? Namely, there is some space between two word page.
2) How to switch to edit-mode from view mode?
Thanks very much.

Your WOPI host (your own API which implemented WOPI Protocol) must,
Implement methods PutFile (to save updated file on your storage) and PutRelativeFile (to create a new file based on the current file, for example converting from .doc to be .docx).
Return following data in the response of CheckFileInfo operation.
2.1 SupportUpdate : true (to let WOPI Client know that your API implement the PutFile and PutRelativeFile methods)
2.2 UserCanWrite : true (to indicate that the use have Write permission over the file)
2.3 LicenseCheckForEditIsEnabled : true (to route user to Microsoft Login page to verify that the user have Office 365 license)
2.4 HostEditUrl : url_to_your_edit_page
NOTE: Your user need MS Office 365 license in order to edit file on WOPI.
.

1) This might actually be a bug in the OOS. Can you verify that the problem persists when you switch the <ui=UI_LLCC&><rs=DC_LLCC&> to English locale & open a document written in English? Just to rule out this possibility.
2) The HostViewUrl and HostEditUrl is supposed to lead to a "host page" - an HTML page which will host an iframe that points to an Office for the web application. => Not to the OOS URL directly.

Related

Missing Document Providers using Intent.ActionCreateDocument

When I use Intent.ActionOpenDocument as the activity the resulting picker shows all available document providers. When I use Intent.ActionCreateDocument the resulting picker shows a limited subset of document providers. Does anyone know of a method to have the Intent.ActionCreateDocument picker show all document providers?
When OneDrive app is installed it support ACTION_OPEN_DOCUMENT Intent (Android Storage Access Framework (SAF)), but unfortunately it does not support ACTION_CREATE_DOCUMENT intent from the same SAF.Thus we can implement work-around: 1st invoke ACTION_SEND and latter ACTION_OPEN_DOCUMENT.
But this means bad user experience for end user when interacting with OneDrive comparing to doing same action with Google Drive (which support both open and create intents.) As result user would need to select file twice using OneDrive and only once if he use GDrive.

Persistently Filtering Out Application Traffic in Fiddler

Whenever I start Fiddler, I see traffic from all of the applications on my system but it's very rarely the case that I want this. Usually what I want is to only see requests made by applications I am debugging. In order to achieve this, I leave Fiddler running all the time and whenever I want to see what happened with a request I can just open it up and see.
I can filter requests by right-clicking on an entry -> Filter -> Hide '<application name>'. Although this works fine, it is cleared when Fiddler is restarted.
How can I persist filters that filter out traffic from a certain application?
I tried using the Filters tab but this is very limited and one of the missing features is what I detailed above.
This can be achieved by creating custom rules. In order to do this, in Fiddler, go to Rules -> Customize Rules. You can choose Yes to install the FiddlerScript Editor plugin if you want but this is not necessary. Just click No when asked and a file named CustomRules.js will be opened using Notepad.
This file allows you to program all sorts of rules into Fiddler, from adding headers to outgoing requests to monitoring the time taken for a response to be received. Further details on it can be found here.
In order to filter out a certain application, scroll down to the OnBeforeRequest method and paste the following code in:
if (oSession["X-PROCESSINFO"] && (
oSession["X-PROCESSINFO"].StartsWith("firefox") ||
oSession["X-PROCESSINFO"].StartsWith("outlook") ||
false))
{
oSession["ui-hide"] = "FiddlerScript> Hiding unimportant process";
}
This piece of code tells Fiddler to hide all requests coming from Mozilla Firefox or Microsoft Outlook. If you want to add / update / delete any application here, all you need to do is copy / update / delete lines that contain the StartsWith method.
The first condition will filter out all the requests that do not come from an application. This is the case for requests made from Fiddler's Composer tab.

MODx (Revolution) - using CAPTCHA extra for forms

I have installed CAPTCHA extra on MODx Revolution. According to its description
"The Captcha components can also be used by other components to create captcha-style verification for front-end forms."
When changing captcha.enabled in System setting to Yes, it adds Captcha to manager login, but there's no documentation on how to use it on other components, neither I could find any example by googling.
How can I use the Captcha on a desired form? (and not on manager login if possible)
Thanks for your time.
You add it somewhere in your form where you want it to appear:
<img src="[[++assets_url]]components/captcha/captcha.php" alt="Captcha Image" />
And create a textfield for user to enter the result. Then wherever you're doing the validation for your form, compare the value of the textfield to $_SESSION['veriword'].
You can also read this: http://bobsguides.com/captcha-plugin.html
The docs are limited - but there, in the docs folder of the distribution:
Modx Captcha Utility
====================
Author: BobRay <bobray#softville.com>
Date: 08/10/2008
Updated:10/03/2010
====================
This utility provides captcha verification in the MODx
Manager login and elsewhere.
It uses the following System Settings:
captcha.enabled If set, captcha is used for Manager login (off when installed)
captcha.use_mathstring If set, the image is a simple equation for the user to solve (on when installed)
captcha.words Selection of words used for the image if captcha_use_mathstring is off
captcha.height Height of image (default: 80)
captcha.width Width of image (default: 200)
captcha.words Words to use in CAPTCHA challenge
You may add or delete fonts from the core/components/captcha/fonts directory
as long as there is at least one .ttf file there.
You may add or delete images from the core/components/captcha/noise directory
as long as there is at least one file there.
Captcha can also be used in other forms that require captcha.
You can roll your own function by calling assets/components/captcha/captcha.php where you want the image
and then comparing the user's input to the $_SESSION['veriword'] variable.
See the code in the core/components/captcha/captcha.plugin.php file.
You should also be able to see this from the properties of the installed package in the package manager.
Basically, what he is saying that you ~can~ use it for other forms 'if you want to write a little bit of code'

Kenexa LCMS 8.2 content to Moodle LMS via AICC URL

Before I begin, I'd like to appologise for any improper terminology. I am in a jack-of-all-trades position right now and LCMS/LMS systems are not my primary focus typically.
Goal:
Create content that is stored and edited in Kenexa (Formerly Outstart) LCMS and is accessed via AICC URL in the Moodle LMS. This is important to us because we'd like to have the content in a central repository (the LCMS), where changes can be made to the content and instantly applied to the LMS(s).
Problem:
Unable to connect to LCMS content using an AICC URL (generated by the LCMS) using Moodle LMS. When connecting, I receive this error:
AICC HACP Entry Point Error
AICCException : The callback to the LMS failed with http status code (404)
When creating the AICC URL, the LCMS will present an error if I supply an invalid or unreachable URL for my LMS. In this case, the LCMS can "see" the LMS, as far as I can tell.
Details:
The LCMS uses an editable XML file when publishing the AICC URL and content. That file looks like this:
<publish_configuration>
<destination>
<id>{instance_id}</id>
<label>{instance_label}</label>
<url>{protocol}://{destination_host}/{pens_context}</url>
<standard>pens</standard>
<transport_location>{protocol}://{source_host}/{repository_context}</transport_location>
<transport_userid>{transport_user}</transport_userid>
<transport_account>{transport_account}</transport_account>
<transport_password>{transport_password}</transport_password>
<system_userid>{system_user}</system_userid>
<system_password>{system_password}</system_password>
</destination>
<destination>
<id>02</id>
<label>Moodle_Test</label>
<url>http://LMS-URL/moodle</url>
<standard>pens</standard>
<transport_location>http://LCMS-URL/LCMS/evsfiles/exports</transport_location>
<transport_userid></transport_userid>
<transport_account>FIRST_USERID</transport_account>
<transport_password>FIRST_PASSWORD</transport_password>
<system_userid>SECOND_USERID</system_userid>
<system_password>SECOND_PASSWORD</system_password>
</destination>
</publish_configuration>
Fiddler shows that a request is sent to the LCMS when the AICC URL is launched and receives a "200 OK" header response.
We've been using the second "destination" option in the XML and it seems to generate the AICC URL correctly, from the LCMS's point of view. When launched, directly in the browser or from the LMS, the error from the beginning of this question pops up.
We have another type of LMS using these AICC URLs and it is working correctly, however we are trying to take this method and apply it to many different sites that are all using moodle.
System Information:
LMS:
Moodle: Version 2.3.2 (Build 201220910)
Apache2: 5.0.8
PHP: 5.3.16
MySQL: 5.5.21
Enable direct AICC url checked
Enable external AICC HACP checked
LCMS:
Kenexa LCMS: 8.2.0073
Tomcat Application Server: 6.0.32 (Bundled with LCMS)
MSSQL Server: 2008 R2
General
- Both applications are running on the same server.
- No internet connection to server.
- Local Address (192.168.1.10) doesn't work correctly in the publish.xml file
Questions:
Is it possible that PHP or Apache are blocking the AICC communication between the LCMS and the LMS?
Could this be a Moodle issue with AICC URLs?
I'm not sure if there are any other questions I should be asking in relation to this. I don't know enough about the inner workings of AICC/MOODLE/Kenexa LCMS to pinpoint the issue here. My usual solution would be to google until I find a similar issue and tailor their solution to fit my issue, but I am having a hard time finding anything like this.
If you need any more information, logs, etc, please let me know!
Thank you in advance!
UPDATE - 15/7/2013
After digging around the "fantastic" Moodle forums, I found a link to this bug report. Now, this didn't sound exactly like my problem, but I was running out of ideas so I gave it a try.
How to fix this issue:
Navigate to the SCORM Lesson Settings
Find "Display course structure in player"
Disable
Save and Display
I'm assuming that the JScript used to populate the "Table of Contents" in the content player is having issues with the AICC URL. As far as I can tell, the AICC URL does not provide any "course structure" so the Jscript fails to build the ToC and thus causes some deeper issues with the AICC content being displayed. (Most of this is assumption, would love for someone else to verify).
Quoting my update from the original question:
After digging around the "fantastic" Moodle forums, I found a link to this bug report. Now, this didn't sound exactly like my problem, but I was running out of ideas so I gave it a try.
How to fix this issue:
Navigate to the SCORM Lesson Settings
Find "Display course structure in player"
Disable
Save and Display
I'm assuming that the JScript used to populate the "Table of Contents" in the content player is having issues with the AICC URL. As far as I can tell, the AICC URL does not provide any "course structure" so the Jscript fails to build the ToC and thus causes some deeper issues with the AICC content being displayed. (Most of this is assumption, would love for someone else to verify).

TYPO3 - how to set the <base> tag in the header of generated html pages?

I have inherited ownership of a website running on TYPO3 version 4.2.1. There are two pages that are not rendering correctly, and this seems to be down to a failure to load css and javascript files. Inspecting the page source, I can see that the <base href="blah..." /> tag is missing from the page header.
The question: how on Earth do I set the base url property in TYPO3!?
I have poured over the Typo3 website, edited various "typoscript" files, offered sacrafices to the PHP gods, all to no avail. The generated code still does not include the tag.
Any help appreciated. Please note it is not possible for me to "upgrade to the latest version", and my PHP knowledge is non-existant.
Adding this line to the "Setup" field of your site's main TypoScript template ought to do it:
config.baseURL = < URL here >
The "TSRef" (TypoScript Reference) is a key document for every TYPO3 site administrator -- it's available online here:
http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/current/
I recommend printing out a copy to keep at your desk, you will be referring to it frequently. (They provide it in OpenOffice format as well, to make this easy.)
Section 1.6 ("Setup") describes all the properties you can set via TypoScript's CONFIG object:
http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.3.0/view/1/6/#id2512147
P.S. While I wasn't going to recommend you download the latest version to fix this problem, I will recommend you download the latest version to be sure you haven't missed any security patches.
Here is how to set the baseurl within the v4.5 introduction package:
Template > Home > Edit Whole Template Record
Includes (between Options and Recources tab )
Click on the little template icon to the left of ROOT, choose Edit
Under Constants > Config, enter the base domain as shown below (leave out the <>
Rememember to clear all cache and then to Ctrl + F5 to complete refresh the browser
TS:
config {
# cat=config; type=boolean; label=Admin Panel: Turn on admin panel (mainly for testing purposes only)
adminPanel = 0
# cat=config; type=boolean; label=Debugging: Turn on debugging (testing purposes only)
debug = 0
# cat=config; type=string; label=Domain name for Base URL: (excluding slashes and protocol like http://)
domain = < ENTER YOUR DOMAIN HERE >
}