Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate SE EGRA #3473

Open
2 tasks
chrisekelley opened this issue Nov 14, 2022 · 16 comments · May be fixed by #3699
Open
2 tasks

Automate SE EGRA #3473

chrisekelley opened this issue Nov 14, 2022 · 16 comments · May be fixed by #3699
Assignees
Labels
Milestone

Comments

@chrisekelley
Copy link
Member

chrisekelley commented Nov 14, 2022

Updated LOE here: Tangerine-Community/tangy-form#386

User story: SE EGRA becomes more automated and less hacky. Forms will automatically play sounds and highlight which element triggers the sound - lIke a tangy-helper element.

Tasks:

  • Create tangy-helper custom element that will express the two widgets in the screenshot below - the Question icon and the instruction icon. When a page loads, the audio for these two items queue and play. The student can click on each one multiple times to learn how they work.
  • Add options to tangy-radio-block. (note radio block not buttons) to be able to include sound and images, again being able to queue those to play autmatically and highlight. See example PWA.
@chrisekelley
Copy link
Member Author

chrisekelley commented Nov 14, 2022

When a form loads, it highlights the Question mark image and plays the instructions. It then highlights Big Orange who reads the letter to be clicked. In. the current code, these are in a section called "tangerineMan".

<div style="display:flex;margin-bottom:-2rem;" id="audios">
           <img src="./assets/media/instructions.png" style="max-height:100px;width:auto;border-radius:0.5rem;border:5px solid transparent;margin-right:0.5rem;" onclick="queue('./assets/media/math_84-number-id-question-mark-audio-no-skipping.mp3','instructions');play();" id="instructions">
           <img src="./assets/images/ms-talk2.png" style="max-height:100px;width:auto;border-radius:0.5rem;border:5px solid transparent;" class="talk" onclick="queue('./assets/media/math_1-one.mp3','prompt');play();" id="prompt">
       </div>

Screenshot of example:

image

@chrisekelley
Copy link
Member Author

chrisekelley commented Nov 14, 2022

Example code:

<tangy-form-item id="sec_num_id_demo" 
            title="Number ID - Demo"
on-open="
         // Make the background blue
         document.styleSheets[1].removeRule(6);
         document.styleSheets[1].addRule('body',`background-color: rgb(247, 246, 246) !important; height: 100% !important; display: flex !important; flex-direction: column !important; justify-content: center !important; align-items: center !important; font-family: Andika, sans-serif !important; font-size: 1.3rem !important; font-weight: 400 !important; line-height: 1.5 !important; margin: 0px !important; color: rgb(33, 33, 33) !important; background-image: url('./images/blue_hills_75.png') !important; background-size: cover !important; background-attachment: fixed !important; background-repeat: no-repeat !important; `,6);
   queue('./assets/media/math_44-number_id_proxy_demo.mp3','instructions')
   // Next two lines obviated by demo video
   // 
   // play();
">
   <tangy-box name="num_id_demo" class="" style="">
       <div style="text-align:center;padding:4rem 1.2rem;background-color:#fff;border-radius:1rem;"> <video autoplay="" style="margin-left: auto" height="400px">
               <source src="./assets/media/math_83-number-id-screenshare-demo-no-skipping.mp4" type="video/mp4"></video> </div>
   </tangy-box>
   <tangy-box name="tangerineMan" class="" style="">
       <div style="display:flex;margin-bottom:-2rem;" id="audios">
           <div id="instructions"></div>
           <div id="prompt"></div>
       </div>
   </tangy-box>
</tangy-form-item>

@chrisekelley
Copy link
Member Author

chrisekelley commented Nov 28, 2022

Letters demo

SE-EGRA-demo1.mov

Numbers demo

SE-EGRA-Numbers-demo-1080.mov

@chrisekelley
Copy link
Member Author

chrisekelley commented Nov 28, 2022

Specs for new custom element

The new element will display two images with hard-coded path to the image files: ./assets/media/instructions.png and ./assets/images/ms-talk2.png and ids 'instructions' and 'prompt'.

Each image will have an on-click event that will play the sound file.

The new custom element needs the following API:

  • pathToInstructionsSound - './assets/media/math_84-number-id-question-mark-audio-no-skipping.mp3
  • pathToPromptSound - './assets/media/math_8-eighty.mp3'
  • displayInstructions - boolean to enable the Instructions image
  • displayPrompt - boolean to enable the prompt image

When the section loads, the sounds should play in-order.

Some sections do not need to display the instructions image and/or play automatically the instructions sound. The 'displayInstructions' boolean will enable.disable this image.

Current implementation

The current queue function takes the following args:

  • pathToSound
  • id of image to highlight

In the section's on-open event, the play function is usually triggered after the queue function:

   queue('./assets/media/math_8-eighty.mp3','prompt');
   play();;

@zaklearn
Copy link

hi,
I want to deploy this feature SE EGRA EGMA, in which version is it available and how to do it because there is not much documentation on it.

@lachko
Copy link
Contributor

lachko commented Mar 17, 2023

Instructions on how to install the tools are provided here: https://github.com/ICTatRTI/SE-tools.

@zaklearn
Copy link

zaklearn commented Mar 17, 2023 via email

@chrisekelley
Copy link
Member Author

Hi - Would you please re-post the image or paste the text of the error? It did not upload.

@lachko
Copy link
Contributor

lachko commented Mar 20, 2023

@zaklearn you are posting on a feature request to automate the SE EGRA tools. Not related to the actual content set. Please use our support desk for any content related enquiries. Provide us with detailed information on what you are doing, what you are expecting to happen and what is happening.

@zaklearn
Copy link

Hi, sure this the error i got.
WhatsApp Image 2023-03-18 at 13 05 36

@chrisekelley
Copy link
Member Author

@zaklearn - Looks like the se-tools directory is not on the filesystem:

image

If the dir is not in the image, and if you're not mapping the content-sets dir in the container to your server's filesystem, then even if you upload it to the server, it will not appear in the container.

An easy way to get this into the container - look at your startup script - typically, it is start.sh or develop.sh. Look for the directories that are marked with -v or --volume in the run command - for example (from start.sh):

--volume $(pwd)/content-sets:/tangerine/content-sets:delegated \

So, it looks like the content-sets dir is shared, so if you upload the se-tools to that dir, it'll appear inside the container. Plus , it'll remain there even after your restart the container.

@chrisekelley
Copy link
Member Author

Track this feature here: Tangerine-Community/tangy-form#397

@chrisekelley
Copy link
Member Author

chrisekelley commented Apr 3, 2023

Work for this issue is in this branch: https://github.com/Tangerine-Community/Tangerine/tree/3473_media-inputs-automate

Next steps:

  • link options to media elements - use the mat-expansion-panel element to create a [panel that drops down under a radio element and displays a list of options. Each of these can be linked to media elements.
  • add "Play on Open" checkbox to play the content when the form-item (section) is opened.

@chrisekelley
Copy link
Member Author

Screenshot of Media Input Editor:

image

@esurface
Copy link
Contributor

New Design

  1. The form editor can defined a promptSound and pomptHighlight property for all elements
    • Radio blocks and EFTouch Input sound will be triggered on click
  2. The form editor can define the order in which prompt sounds are played in the section of a form
  3. The media-input-editor will be removed since the functionality is now at the input level, not the section level

@esurface esurface added this to the v3.31.0 milestone May 29, 2024
@esurface esurface linked a pull request May 29, 2024 that will close this issue
@esurface
Copy link
Contributor

@lachko -- this is a large feature to QA. I'll leave it to you to decide on the best way to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants