πŸ‡¬πŸ‡§United Kingdom @8bitplateau

Account created on 24 February 2008, over 16 years ago
#

Recent comments

πŸ‡¬πŸ‡§United Kingdom 8bitplateau

And in answer to the seconds, is this ? using xAPI

        H5P.externalDispatcher.on('xAPI', function(event){
          const max = event.getMaxScore();
          const score = event.getScore();
          const verb = event.getVerb();
          if (score === max && max > 0){
            console.error(verb);
            console.error('Complete');
          }
        });

Thank you Docs - https://h5p.org/documentation/developers/x-api-event#setScoredResult

πŸ‡¬πŸ‡§United Kingdom 8bitplateau

So, in answer to the first question H5P is in the window object (yay) so I can init() it from wherever.
In react I am doing it as follows, listening for history change. It's not quite there yet but it's a start and now I know how to init().
The key is H5P.init('.h5p-iframe-wrapper');

const CustomParagraph = (props) => {

  let history = useHistory();

  useEffect(() => {
    try {
      let H5P = window.H5P;
      setTimeout(() => {
        H5P.init('.h5p-iframe-wrapper');
      }, "10");
    }
    catch (err) {
      console.error('Missing H5P.');
    }
  }, [history]);

  const StyledBox = withStyles((theme) => ({
    root: {
      marginBottom: theme.spacing(4),
    },
  }))(Box);

  return (
    <StyledBox>
      <LessonGrid>
        <div className='h5p-iframe-wrapper'>
          <iframe
            id={`h5p-iframe-${props.componentId}`}
            className='h5p-iframe'
            data-content-id={props.componentId}
            frameBorder='0'
            scrolling='no'
            lang='en'
            title={`Component frame ${props.componentId}`}>
          </iframe>
        </div>
      </LessonGrid>
    </StyledBox>
  );
};
πŸ‡¬πŸ‡§United Kingdom 8bitplateau

Hey @elaman thanks for the reply.

1. OK - got it. Good you can do both, thanks (read the docs).

2. Hmm, ok thanks, maybe the easiest thing is to have two types of H5P component, A 'dumb' one for simple instruction and one that extends one of the quiz/question components and leverages its state features.

thanks for the pointers :)

πŸ‡¬πŸ‡§United Kingdom 8bitplateau

8bitplateau β†’ made their first commit to this issue’s fork.

πŸ‡¬πŸ‡§United Kingdom 8bitplateau

Yes I see your point, the Dall-e Task could just return the string and pass to a file saving Task.
So, once that is done (the New Action merge), refactor this plugin to remove the file saving part, then rebuild my ECA workflow model ?
This is only for a POC app for me, so the way it's working atm is fine for now.

πŸ‡¬πŸ‡§United Kingdom 8bitplateau

Hi, here is a working views block for group 3 that can be placed on a user page.
It shows group relationships, and does some contextual filtering from there.
The end result is a list of links to groups the user belongs to.
It is wise to add a further filter on the type of relationship with the specific group type but that will make this export case-specific.

πŸ‡¬πŸ‡§United Kingdom 8bitplateau

Slightly different version with some more fixes for PHPStorm and installation.

I was getting the following error:

Fatal error: Type of Drupal\wingsuit_ui_patterns\Plugin\Deriver\LibraryDeriver::$basePluginId must be string (as in class Drupal\ui_patterns\Plugin\Deriver\AbstractPatternsDeriver) in /var/www/html/web/modules/contrib/wingsuit_companion/modules/wingsuit_ui_patterns/src/Plugin/Deriver/LibraryDeriver.php on line 22

so added some types

πŸ‡¬πŸ‡§United Kingdom 8bitplateau

That's not my use-case nor what the patch is trying to provide.
This is simply an improvement to the way the module currently adds arbitrary links using Title and URL, but gets them from a Node so that the Title and URL are kept up to date. This is not to do with Tokens or Relationships or Taxonomy.

πŸ‡¬πŸ‡§United Kingdom 8bitplateau

Have just download leaflet Leaflet 1.9.4 and I see the map files are in there, so these are from the library itself, and are correct when downloading from github. Still, misleading when debugging, not sure why they would be in their dist package.
Feel free to close :)

πŸ‡¬πŸ‡§United Kingdom 8bitplateau

8bitplateau β†’ created an issue.

πŸ‡¬πŸ‡§United Kingdom 8bitplateau

Just an FYI, here is most relevant.

I ran in to the issue when compiling twig, as per the screen grab.

In color.changing.html.twig line 9: Unknown "help_route_link" function.

from file - core/modules/color/help_topics/color.changing.html.twig

This function is in Help Topics, not a module I had enabled. Enabling it got rid of the issue.

Production build 0.69.0 2024