Picture of Adam Laird
Trickle assessment issues - totally stumped
by Adam Laird - Friday, 21 February 2014, 10:28 AM
 

Ok i'm going round and round in circles with this one but trickle assesment I just cant get to work (have working elsewhere without assessment or question componants)

On output the elements seem to be there but with an opacity of 0 and nothing showing on the page. If I take off trickle and assessment it shows, if I take off assessment option on article it does not work either. I am stumped

so the article has;

{
        "_id":"oralCancer-07-a-01",
        "_parentId":"oralCancer-07",
        "_type":"article",
        "_classes":"",
        "title":"Learning Points & Knowledge Check",
        "body":"",
        "_trickle": {
            "button": {
                "continue": "Continue"
            }
        },
        "_assessment": {
            "_isPercentageBased" : true,
            "_scoreToPass" : 50,
            "_completionMessage" : {
                "title" : "You have finished the assessment",
                "message": "You scored [SCORE] out of [MAXSCORE].  [FEEDBACK]"
                },
            "_bands": [
            {
                "_score": 0,
                "feedback": "You're score was below 25%. Why not have another try?"
                },
                {
                    "_score": 25,
                    "feedback": "You're score was below 50%. Why not have another try?"
                },
                {
                    "_score": 50,
                    "feedback": "Great work. You passed the knowledge check."
                }
            ]
        }
    }

With assigned blocks;

{
        "_id": "oralCancer-07-a-01-b-01",
        "_parentId": "oralCancer-07-a-01",
        "_type": "block",
        "_classes": "",
        "title": "Learning Points",
        "body": "",
        "_trackingId": 0
    },
    {
        "_id": "oralCancer-07-a-01-b-02",
        "_parentId": "oralCancer-07-a-01",
        "_type": "block",
        "_classes": "",
        "title": "Question 1",
        "body": "",
        "_trackingId": 0
    },
    {
        "_id": "oralCancer-07-a-01-b-03",
        "_parentId": "oralCancer-07-a-01",
        "_type": "block",
        "_classes": "",
        "title": "Question 2",
        "body": "",
        "_trackingId": 0
    },

 

and components (shortened for pasting purposes);

,
    {
        "_id": "oralCancer-07-a-01-b-01-c-01",
        "_parentId":"oralCancer-07-a-01-b-01",
        "_type":"component",
        "_component":"media",
        "_classes":"",
        "_layout":"full",
        "title":"",
        "media": {
            "mp4": "course/en/video/big_buck_bunny.mp4",
            "ogv": "course/en/video/big_buck_bunny.ogv"
        },
        "body": "Learning Points Review"
    },
    {
        "_id": "oralCancer-07-a-01-b-02-c-01",
        "_parentId":"oralCancer-07-a-01-b-02",
        "_type":"component",
        "_component":"textinput",
        "_classes":"",
        "_layout":"left",
        "title": "Q1",
        "body": "The most effective oral sffective oral screening involve?</b> ",
        "_attempts": 1,
        "placeholder": "Enter your answer her then click submit",
        "_allowsAnyOrder": false,
        "_allowsAnyCase": true,
        "_allowsPunctuation": false,
        "_questionWeight":10,
        "buttons": {
            "submit": "",
            "reset": "",
            "showCorrectAnswer": "",
            "hideCorrectAnswer": ""
        },
        "feedback": {
            "correct": "Ideally thef any lesion.",
            "incorrect": "Ideally the sof any lesion.",
            "partly": "Ideally the sc lesion."
        },
        "items": [
            {
                "prefix": "",
                "suffix": "",
                "answers": []
            }
        ]
    },
    {
        "_id": "oralCancer-07-a-01-b-02-c-02",
        "_parentId":"oralCancer-07-a-01-b-02",
        "_type":"component",
        "_component":"graphic",
        "_classes":"",
        "_layout":"right",
        "title":"",
        "body":"",
        "graphic": {
            "alt": "alt text",
            "title": "title text",
            "large": "course/en/images/origami-menu-two.jpg",
            "medium": "course/en/images/origami-menu-two.jpg",
            "small": "course/en/images/origami-menu-two.jpg"
        }
    },
    {
        "_id": "oralCancer-07-a-01-b-03-c-02",
        "_parentId":"oralCancer-07-a-01-b-03",
        "_type":"component",
        "_component":"graphic",
        "_classes":"",
        "_layout":"left",
        "title":"Q2",
        "body":"Idenmit.",
        "graphic": {
            "alt": "alt text",
            "title": "title text",
            "large": "course/en/images/origami-menu-two.jpg",
            "medium": "course/en/images/origami-menu-two.jpg",
            "small": "course/en/images/origami-menu-two.jpg"
        }
    },
    {
        "_id": "oralCancer-07-a-01-b-03-c-01",
        "_parentId":"oralCancer-07-a-01-b-03",
        "_type":"component",
        "_component":"mcq",
        "_classes":"",
        "_layout":"right",
        "_attempts":1,
        "_questionWeight":1,
        "_isRandom":true,
        "_selectable":1,
        "title": "",
        "body": "",
        "items": [
            { "text": "Delayed referrals","shouldBeSelected":true },
            { "text": "Dival", "shouldBeSelected":true},
            { "text": "Failure to refer", "shouldBeSelected":true}
        ],
        "feedback":{
            "correct":"correct answer.",
            "partly":"Not ent.",
            "incorrect":"wong."
        },
        "buttons": {
            "submit": "",
            "reset": "",
            "showCorrectAnswer": "",
            "hideCorrectAnswer": ""
        }
    }

Picture of Adam Laird
Re: Trickle assessment issues - totally stumped
by Adam Laird - Friday, 21 February 2014, 12:10 PM
 

think its a bug - issue raised at github https://github.com/adaptlearning/adapt-contrib-trickle/issues/8

me
Re: Trickle assessment issues - totally stumped
by Sven Laux - Friday, 21 February 2014, 12:15 PM
 

Thanks for raising the issue, Adam. We'll look into it.
Sven

Picture of Dan Gray
Re: Trickle assessment issues - totally stumped
by Dan Gray - Friday, 21 February 2014, 12:24 PM
 

Hi Adam

Thanks for posting the issue. Are you using the 'master' branch from GitHub? 

I did try and build using the article, block component JSON code that you posted and it successfully build a course with trickle. I did have to remove the trailing comma from the blocks JSON but this was reported as an error on build. So I suspect that there is something else wrong.

Did you make any changes to the theme?
Dan

Picture of Adam Laird
Re: Trickle assessment issues - totally stumped
by Adam Laird - Friday, 21 February 2014, 12:59 PM
 

trailing commas were just there due to cutting and pasting. no changes to theme and yes on master.

The atsached will work with the bundled demo course as just using demo assets for now

Picture of Adam Laird
Re: Trickle assessment issues - totally stumped
by Adam Laird - Friday, 21 February 2014, 1:38 PM
 

and do you mean you managed to get a trickle article working which had a media component in it Dan?

Picture of Dan Gray
Re: Trickle assessment issues - totally stumped
by Dan Gray - Friday, 21 February 2014, 4:00 PM
 

Hi Adam. Thanks for uploading the course JSON files. 

I managed to build using the course files you uploaded. When navigating to pages 3 through to 7 the page shows up blank as you had described. I think this is because they have no components defined for them in the components.json file.

The last page titled Knowledge Check did have media components and questions and had working trickle with my build. Is this the page that trickle failed on for you?

I liked the naming convention you used for the article, blocks and component id's. Might have to borrow that :)

Dan

Picture of Adam Laird
Re: Trickle assessment issues - totally stumped
by Adam Laird - Monday, 24 February 2014, 8:02 AM
 

yes it was the last bit 'knowledge check' I'll have to try a rebuild then as it was totally failing on mine.

The naming convention is great until you have to insert a componant/block/article then you end up using 07a 07b to save having to renumber everything once youve laid out the framework.

And yep the blank pages inbetween are just me setting up the structure and then jumping to the quiz portion for testing.

Picture of Daryl Hedley
Re: Trickle assessment issues - totally stumped
by Daryl Hedley - Friday, 21 February 2014, 4:37 PM
 

Hey Adam,

could you check that the media file is loaded and you can play it please? This might mean you have to change the opacity/visibility of the block and component.

Thanks,

Daryl

Picture of Adam Laird
Re: Trickle assessment issues - totally stumped
by Adam Laird - Monday, 24 February 2014, 8:51 AM
 

Hi Dan,

Ok narrowed it down with you stating you got it to show.

on OSX 10.9

Browser | Version | Showing?

Safari     | 7.0.1     | YES
FIrefox   | 27.0.1   | NO
Chrome | 32.0.17 | YES
Opera    | 12.15    | NO

Windows 7

IE          | 9.0.8112.16421 | YES

 

Picture of Kevin Corry
Re: Trickle assessment issues - totally stumped
by Kevin Corry - Monday, 24 February 2014, 9:26 AM
 

Hi Adam,

Do you have firebug or similar installed on the Firefox browser you were testing on? If so, can you check the console for any reported errors/warnings?

Picture of Adam Laird
Re: Trickle assessment issues - totally stumped
by Adam Laird - Monday, 24 February 2014, 10:20 AM
 

@Kevin

get the following warnings in firefox on all pages with the media component in them

Specified "type" attribute of "video/mp4" is not supported. Load of media resource course/en/video/big_buck_bunny.mp4 failed.
Specified "type" attribute of "video/ogv" is not supported. Load of media resource course/en/video/big_buck_bunny.ogv failed.
All candidate resources failed to load. Media load paused.

not just in the trickle page and the elements show on a non trickily page.

Managed to test on a windows 7 Firefox with the same results

Picture of Chris Jones
Re: Trickle assessment issues - totally stumped
by Chris Jones - Monday, 24 February 2014, 11:14 AM
 

The correct mime type for Ogg Theora Vorbis is "video/ogg", try changing to that.

https://developer.mozilla.org/en-US/docs/HTML/Supported_media_formats

Picture of Adam Laird
Re: Trickle assessment issues - totally stumped
by Adam Laird - Monday, 24 February 2014, 11:44 AM
 

changing to to ogg

"media": {
            "mp4": "course/en/video/big_buck_bunny.mp4",
            "ogg": "course/en/video/big_buck_bunny.ogv"
        },

 

makes the component appear but as a audio/ogg component not video

getting close to the answer though

Picture of Adam Laird
Re: Trickle assessment issues - totally stumped
by Adam Laird - Monday, 24 February 2014, 11:54 AM
 

@Chris

well done you were right but it isn't an issue with trickle its and issue with the media component so in templates/media.hbs we change the mime type from ogv and it works though think this could be improved more

<div class="media-inner component-inner">
    {{#if title}}
    <div class="media-title component-title">
        <h4 class="media-title-inner component-title-inner">
            {{{title}}}
        </h4>
    </div>
    {{/if}}
    {{#if body}}
    <div class="media-body component-body">
        <p class="media-body-inner component-body-inner">
            {{{body}}}
        </p>
    </div>
    {{/if}}
    <div class="media-widget component-widget">
    
        {{#if media.mp3}}
            <audio src="{{media.mp3}}" type="audio/mp3"/>
        {{else}}
            {{#if media.ogg}}
                <audio src="{{media.ogg}}" type="audio/ogg"/>            
            {{else}}
                <video preload="none" width="640px" height="360px" style="width:100%; height:100%;">
                    <source src="{{media.mp4}}" type="video/mp4"/>
                    <source src="{{media.ogv}}" type="video/ogg"/>
                </video>
            {{/if}}
        {{/if}}
    </div>
</div>

Picture of Daryl Hedley
Re: Trickle assessment issues - totally stumped
by Daryl Hedley - Monday, 24 February 2014, 12:30 PM
 

Hey Adam,

Looks like a bug in the media component like you said. This should be updated in the media component template to read - 'video/ogg'. Not too sure why this was set as 'video/ogv'. I can fix this as a hot-fix into master.

Another point to mention is to make sure that your server has support for the new media files.

You can setup your server to support media types by having a .htacess file that contains the following:

AddType video/mp4 .mp4 m4v

AddType video/ogg .ogv

AddType video/webm .webm

Thanks,

Daryl

Picture of Daryl Hedley
Re: Trickle assessment issues - totally stumped
by Daryl Hedley - Monday, 24 February 2014, 12:37 PM
 

Hey Adam,

Thanks for helping us out with this bug and finding it. We have now updated the master branch of the media component to contain your fix. Great work!

https://github.com/adaptlearning/adapt-contrib-media/pull/23

Thanks,

Daryl