Structuring scorm package with just one item - scorm

I recently packaged a Scorm course, and everything looks ok, but when they launch the course they have to click first in one menu button from the LMS, and open a submenu and they have to click again, in other courses they just click in the parent item. I think it's something to do with the structure in the Manifest file, the thing is that I have just one item so the menu is not really necesary.
This is what my client sees:
<?xml version="1.0" standalone="no" ?>
<!--
Single SCO content packaging example. SCORM 2004 2nd Edition.
Provided by Rustici Software - http://www.scorm.com
This example demonstrates the simplest possible manifest, containing just one SCO and
no metdata or sequencing information.
-->
<!--
The manifest node contains a unique identifer for this course and the course's version number.
The schema declartions are important to ensure you are delivering valid XML. For the most part
these should remain static. Other schema prefixes are allowed, but can limit interoperabilty.
-->
<manifest identifier="com.scorm.golfsamples.contentpackaging.singlesco.20042nd" version="1"
xmlns="http://www.imsglobal.org/xsd/imscp_v1p1"
xmlns:adlcp="http://www.adlnet.org/xsd/adlcp_v1p3"
xmlns:adlseq="http://www.adlnet.org/xsd/adlseq_v1p3"
xmlns:adlnav="http://www.adlnet.org/xsd/adlnav_v1p3"
xmlns:imsss="http://www.imsglobal.org/xsd/imsss"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1 imscp_v1p1.xsd
http://www.adlnet.org/xsd/adlcp_v1p3 adlcp_v1p3.xsd
http://www.adlnet.org/xsd/adlseq_v1p3 adlseq_v1p3.xsd
http://www.adlnet.org/xsd/adlnav_v1p3 adlnav_v1p3.xsd
http://www.imsglobal.org/xsd/imsss imsss_v1p0.xsd">
<!--The metadata node simply declares which SCORM version this course operates under.
"CAM 1.3" is the notation for SCORM 2004 2nd Edition.-->
<metadata>
<schema>ADL SCORM</schema>
<schemaversion>CAM 1.3</schemaversion>
</metadata>
<!-- There is just one organization. The organization contains just one item.-->
<organizations default="control_interno" adlseq:objectivesGlobalToSystem="false">
<organization identifier="control_interno">
<title>Control Interno</title>
<item identifier="item_1" identifierref="resource_1">
<title>Control Interno</title>
</item>
<imsss:sequencing>
<imsss:controlMode choice="true" flow="true" />
</imsss:sequencing>
</organization>
</organizations>
<!--
There is just one resource that represents the single SCO that comprises the entirety of this course.
The href attribute points to the launch URL for the course and all of the files required by the course
are listed.
-->
<resources>
<resource identifier="resource_1" type="webcontent" adlcp:scormType="sco" href="./control_interno/index.html">
<file href="./control_interno/index.html"/>
</resource>
</resources>
</manifest>

Related

CSS not loading in Jira server report

I am developing a jira server report and I am not able to load my css file.
In my atlassian-plugin.xml I define my web-resource like this:
<web-resource key="jira-reports-resources" name="wl-jira-report-plugin Web Resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<resource type="download" name="jira-report-plugin.css" location="/css/jira-report-plugin.css"/>
<resource type="download" name="jira-report-plugin.js" location="/js/jira-report-plugin.js"/>
<resource type="download" name="images/" location="/images"/>
<context>jira-reports-context</context>
</web-resource>
and my report like this:
<report name="Massnahmen Verantwortlichkeit Report" i18n-name-key="report.massnahme.name"
key="massnahme-report" class="com.example.reports.massnahme.MassnahmeReport">
<description key="report.massnahme.description"></description>
<resource name="view" type="velocity" location="/templates/reports/massnahme/view.vm"/>
<resource name="i18n" type="i18n" location="report-massnahme"/>
<label key="report.massnahme.label"></label>
<!-- the properties of this report which the user must select before running it -->
<properties>
<property>
<key>departmentLeaderId</key>
<name>report.massnahme.input.user.name</name>
<description>report.massnahme.input.user.description</description>
<type>multiselect</type>
<values class="com.example.reports.massnahme.generator.MassnahmeUserGenerator"/>
</property>
</properties>
</report>
In my report java class I add the WebResourceManager into the velocityParams and in my view.vm I call it in the first row:
$webResourceManager.requireResourcesForContext("jira-reports-context")
In my view.vm I use a table-based presentation and I want to use a accordion technique to fold rows in my table. My javascript is loaded and the click listener works as intended. But my css file is completely ignored. When I inspect the page in chrome the css classes are not loaded at all. I tried some easy things like
.test-table{
border: 1px solid black;
}
and nothing is showing up.
How do I have to define my css class for using it in a report? I was surprised to see that I can not add css or javascript to the report element itself. Or do I have an error in my code definition? Any ideas?
Try this
webResourceManager.requireResource("groupId.artifactid:web-resource").
Example from the below link:
webResourceManager.requireResource("com.avvd.jira.plugin.inquirer:inquirer-resources")
https://community.atlassian.com/t5/Answers-Developer-Questions/Velocity-don-t-load-resource/qaq-p/489704
Thanks
Try not to use "-" in your context string, replace all the "-" with "."
<context>jira.reports.context</context>
and
$webResourceManager.requireResourcesForContext("jira.reports.context")
Even the answer was not quite correct, the link #MrKumar posted showed me the correct way. Apparently for CustomFields the approach using the method requireResource() is outdated and one should put these resources in <context>atl.general</context>. It worked directly with my reports too.

Alfresco: Finding out the type of a piece of content

When I log into http://localhost:8080/alfresco I can navigate to a folder and see four content items. So far so good. But there is no indication as to what the type is of each content type, except for a PDF icon.
Is there a way for me to specify an icon for my custom content types?
I would like the icon to be dependent on my custom type.
<types>
<type name="sc:doc">
<title>Someco Content</title>
<parent>cm:content</parent>
<icon>boring-icon.png</icon> <-- something like this
</type>
<type name="sc:marketingDoc">
<title>Marketing Document</title>
<parent>bnp:doc</parent>
<icon>fancy-marketing-icon.png</icon> <-- something like this
</type>
</types>
If it matters, I am using Alfresco 3.3 (Enterprise).
Take a look here http://docs.alfresco.com/3.4/tasks/kb-code-explorer-add.html
e.g. web-client-config-custom.xml (sc:marketingDocis the Alfresco content type):
<!-- Specify icon for the kb:document instances -->
<config evaluator="string-compare" condition="sc:marketingDoc icons">
<icons>
<icon name="sc_marketingDoc-icon" path="/images/icons/your_custom_icon.gif" />
</icons>
</config>
Are you informed, that Alfresco Explorer is deprecated & you should use Share instead?

Alfresco Share - Dynamic rendering of fields in a form

My question is more or less in the title, I added a new data type in my data model.
<type name="moi:montype">
<title>titre type</title>
<parent>cm:content</parent>
<mandatory-aspects>
<aspect>moi:monaspect</aspect>
</mandatory-aspects>
</type>
This one uses a new aspect in which I added a new field
<aspect name="moi:monaspect">
<title>titre aspect</title>
<properties>
<property name="moi:monchamp">
<type>d:text</type>
<mandatory>false</mandatory>
</property>
...
</properties>
</aspect>
I then displayed this new field in a Share form by editing the file share-config-custom.xml.
<config evaluator="node-type" condition="moi:montype">
<forms>
<form>
<field-visibility>
<show id="moi:monchamp"/>
...
</field-visibility>
<appearance>
<field id="moi:monchamp" label="Champ texte" />
...
</appearance>
</form>
</forms>
</config>
Till then, I could test my changes and the new field displays well.
But I would like to go further, and condition for example the display of the field depending on the logged in user's group.
If the logged in user is part of the "priviledged group", then the field is displayed, otherwise it will not, or only in read only mode.
Do you think we can do this ? And how ?
I looked at documentation, but can't find my happiness.
I don't ask for the full solution, but for tips to follow.
Thank you for your help.
Every field has a component renderer. These are implemented using FreeMarker. Most of the time, as in your case, you are relying on the default component renderer. In addition to the options mentioned by Matjaz, another option would be to point the field at a custom renderer. The renderer could inspect the user's group membership and the group required for this field (maybe passed in as an argument, for example), and then decide whether or not to show itself.
There are a few ways to do this.
The easiest way is to make a webscript which returns html for a form field based on if a current logged in user is in your target group. Then add a form control which is only javascript making an ajax call to the webscript and and appending results to your container div which is specified in your form control (ftl).
The second approach you could use is to extend "org.alfresco.repo.forms.processor.AbstractFilter" and implement the functionality in Java. You could probably implement after generate and remove the form field if current logged in user is not in a target group.
Hope this helps a bit... :)
There is no easy way to do this as alfresco does not allow you to set rights on node properties.
Every field has control template, you could define your own. in your template you would define how this property is rendered depending of user type.
<config evaluator="node-type" condition="cm:content">
<forms>
<form>
<appearance>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/yourOwnFtl.ftl" />
</field>
</appearance>
</form>
</forms>
</config>
Another approach is to write your own share config form evaluator (like node-type ...)
This could check for node type and user permission role/group
let you write one config for each setup (per user group/role)
...
NB! this will one work for forms, so is purely a cosmetical setup, alfresco interface and CIFS etc. will not support this setup.

How to move the documentactions viewlet from a viewletmanager to another?

Once again back with a Plone question.
I have Plone 4 installed and I need to show the Document action icons at the top instead of bottom. having trouble in getting this to work. can someone help.
If you just need to move that viewlet (with same class and template), first you have to register a viewlet with same class to your desired viewletmanager (let's say for ex. plone.app.layout.viewlets.interfaces.IAboveContentBody):
<browser:viewlet
name="plone.abovecontenttitle.documentactions"
manager="plone.app.layout.viewlets.interfaces.IAboveContentBody"
class="plone.app.layout.viewlets.content.DocumentActionsViewlet"
permission="zope2.View"
/>
and then add this in your genericsetup profile (file viewlets.xml) :
<?xml version="1.0"?>
<object>
<order manager="plone.abovecontentbody" skinname="Plone Default">
<!-- this will place your viewlet before all the others.
you can also use a viewlet's name for a relative position -->
<viewlet name="plone.abovecontenttitle.documentactions" insert-before="*"/>
</order>
<hidden manager="plone.belowcontentbody" skinname="Plone Default">
<viewlet name="plone.abovecontenttitle.documentactions"/>
</hidden>
</object>
More info:
http://plone.org/documentation/kb/customization-for-developers/viewlets
http://collective-docs.readthedocs.org/en/latest/views/viewlets.html

How to automate detection of out of order tab navigation in Qt dialogs?

Typically, a dialog wishes to have tab navigation proceed in an orderly fashion through a dialog that roughly corresponds to the order of reading a book.
When new fields are added to a dialog by engineers on a team, the new widgets can often not be inserted in tab correct order.
Can anyone think of a way to automate the detection of out of tab navigation order widgets within a dialog?
I assume you're speaking about QtDesigner *.ui files.
Out of order tabbing occurs when the order of GridLayout/FormLayout items in a ui file (actually xml file) differs from the visual order (left-to-right, top-to-bottom). Like this:
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="1">
<widget .../>
</item>
<item row="1" column="0">
<widget .../>
</item>
...
</layout>
Note that the third row comes before the first, which means in the generated code (and also when loading ui dynamically) the widget from the third row will be added first and will come first in the tab order.
Here's the XLST you can use on a ui file to "fix" the tab order, it removes all manually set tab stops and arranges xml items in visual order.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="#*|node()">
<!-- Copy everything -->
<xsl:copy>
<xsl:apply-templates select="#*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="layout">
<xsl:copy>
<xsl:apply-templates select="#*|node()">
<!-- Sort layout items in the visual order -->
<xsl:sort select="#row" data-type="number"/>
<xsl:sort select="#column" data-type="number"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
<xsl:template match="tabstops">
<!-- Remove (i.e. do not copy) manual tab stops -->
</xsl:template>
</xsl:stylesheet>
Detecting but not fixing the problem is a bit harder, because manually set tab stops must be taken into account. Basic algorithm is as follows:
Build the "raw" tab order by walking xml depth-first and collecting widget names and associated item's row and column (when present) and layout name in a list.
Augment the raw order with manual tab stops, i.e. rearrange the list according to <tabstops> section in the xml, one pair at a time (like QWidget.setTabOrder does it).
Scan the list and check then all rows and columns are in order (independently for each layout name).
It sounds like you have a .ui file with a QTabWidget and a multitude of pages all in on .ui file. I would suggest splitting things up a little bit more. Implement each Tab as a widget by itself, this can be in the desginer too. Then you have two options for the TabWidget itself. Create all the tabs in the designer and promote the content to the widget class that needs to go on that page. Or leave the TabWidget completely empty and populate it in code with the appropriate subwidgets.

Resources