Forum Discussion
TeresaVanderpos
2 months agoCommunity Member
Using Code block for reflection - unable to print
Hi everyone,
Trying out the code block with some help from my coder colleague. We created this html and it works great in chrome if I just launch it.
I paste it into the code block for RISE and...
TeresaVanderpos
2 months agoCommunity Member
I keep trying to add the .txt file it shows success, but not seeing it, please let me know if you can see the code attachment file.
- Chris-Hurst2 months agoCommunity Member
I had issues around this too, so ended up using JavaScript in a Storyline block, then embedding this Storyline block in Rise. This code downloads a Word doc with the users comments, here's the code, I hope it helps!
// === STORYLINE: SAVE THIS BLOCK'S 5 ENTRIES TO LOCALSTORAGE === var player = GetPlayer(); // Give this Storyline block a unique part id: var partId = "Design"; // change in each embedded Storyline: part-1, part-2, ... // Fill in the 5 prompts and the corresponding Storyline variable names for THIS block // (Use your exact on-screen copy as labels, and exact variable names) var fields = [ { label: "Write clear learning objectives", value: player.GetVar("Entry_Analyse") || player.GetVar("D1TextEntry1") || "" }, { label: "Choose format (course, workshop, job aid, etc.)", value: player.GetVar("Entry_Design") || player.GetVar("D1TextEntry2") || "" }, { label: "Map content flow (topics in order)", value: player.GetVar("Entry_Develop") || player.GetVar("D1TextEntry3") || "" }, { label: "Select active learning methods", value: player.GetVar("Entry_Implement")|| player.GetVar("D1TextEntry4")|| "" }, { label: "List supporting media", value: player.GetVar("Entry_Evaluate")|| player.GetVar("D1TextEntry5") || "" } ]; // Optional: include a short title for this block (e.g., "Analyse", "Design", etc.) var blockTitle = "Design"; // Save payload var payload = { id: partId, title: blockTitle, savedAt: new Date().toISOString(), fields: fields }; // Use a shared collection key in localStorage var KEY = "RiseCombinedNotes__parts"; var parts = []; try { parts = JSON.parse(localStorage.getItem(KEY) || "[]"); } catch(e){ parts = []; } // Replace if this part already exists; otherwise append var idx = parts.findIndex(p => p && p.id === partId); if (idx >= 0) { parts[idx] = payload; } else { parts.push(payload); } // Persist localStorage.setItem(KEY, JSON.stringify(parts)); // (Optional) quick feedback back into Storyline via a variable: try { player.SetVar("NotesSavedOK", true); } catch(e) {}
Related Content
- 3 months ago
- 3 months ago
- 10 months ago
- 11 months ago