Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 567a14e

Browse files
authored
Merge pull request #1184 from bjones1/login-fix
Component creation trigger
2 parents 6c69e8a + aeb790c commit 567a14e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

runestone/activecode/js/acfactory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ export default class ACFactory {
160160
// Page Initialization
161161
//
162162

163-
$(document).ready(function () {
163+
$(document).bind("runestone:login-complete", function () {
164164
ACFactory.createScratchActivecode();
165-
$("[data-component=activecode]").each(function (index) {
165+
$("[data-component=activecode]").each(function () {
166166
if ($(this).closest("[data-component=timedAssessment]").length == 0) {
167167
// If this element exists within a timed component, don't render it here
168168
try {

runestone/shortanswer/js/shortanswer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ export default class ShortAnswer extends RunestoneBase {
272272
== Find the custom HTML tags and ==
273273
== execute our code on them ==
274274
=================================*/
275-
$(document).ready(function () {
276-
$("[data-component=shortanswer]").each(function (index) {
275+
$(document).bind("runestone:login-complete", function () {
276+
$("[data-component=shortanswer]").each(function () {
277277
if ($(this).closest("[data-component=timedAssessment]").length == 0) {
278278
// If this element exists within a timed component, don't render it here
279279
try {

0 commit comments

Comments
 (0)