Claromentis E-Learning module version 2.3.14+ required
When creating a module, you can user "Inner File" to provide a link to a document in the Documents application.
With the use of embed code, it is possible to view the PDF in a small window on the module's page.
Please note that users must have at least view permission in Documents in order to access them through E-learning module
Method A (Using Document ID)
Step 1: Finding ID of a Document
Navigate to the document you wish to use. When viewing it, take note of the number at the end of the page's URL:
Step 2: Embed the Code
Create or edit your E-Learning module, and change its type to "Embed Code"
Copy in this:
<iframe name="previewIframe" src="/intranet/documents/preview.php?doc_id=213" style="width:100%; height:500px;" frameborder="0"></iframe>
- Change the number highlighted in red to the number obtained in step 1.
- Your document will display as seen in the image below.
- It is also possible to adjust the default height of the iframe window if required
Please note: The module will need to be attributed to a Course for your uploaded content to be visible and 'embed in the same window' set in Course preferences as shown below.
Method B (Using Full Document URL)
Step 1: Finding the full URL of a document
Navigate to the document you wish to use and then click "Send link by email"
you will get the full URL to the document on the email for example
http://yourintranet.claromentis.net/intranet/documents/1/90/Branding-Sheet.pdf
If clicking on the document take you straight to the document rather than showing preview (as above) then you may simply copy the full URL in the browser.
Step 2: Embed the Code
Create or edit your E-Learning module, and change its type to "Embed Code"
Paste the URL of the document starting from /intranet... into replacing the embed code example below.
<iframe name="previewIframe" src="/intranet/documents/x/xx/filename.pdf" style="width:100%; height:500px;" frameborder="0"></iframe>
- Change the highlighted in red to the number obtained in step 1.
- Your document will display as seen in the image below.
- It is also possible to adjust the default height of the iframe window if required
Optional: Disable Download
Google Chrome browser by default is showing the top toolbar allowing people to download and print the PDF
if you need to hide this, simply add #toolbar=0
into the embed code following example below:
<iframe name="previewIframe" src="/intranet/documents/x/xx/filename.pdf#toolbar=0" style="width:100%; height:500px;" frameborder="0"></iframe>
Please note that this would not stop users to perform right-click and save as