From 489f3a685d6f4829d83d026f18a2d50db0061c53 Mon Sep 17 00:00:00 2001 From: Nuwan Date: Wed, 23 Oct 2024 23:42:48 +0530 Subject: [PATCH] add debug log entries to identify possible errors when creating a session using custom URL --- web/app/assets/javascripts/scheduled_session.js.erb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/app/assets/javascripts/scheduled_session.js.erb b/web/app/assets/javascripts/scheduled_session.js.erb index c4f142000..8ae45620e 100644 --- a/web/app/assets/javascripts/scheduled_session.js.erb +++ b/web/app/assets/javascripts/scheduled_session.js.erb @@ -499,6 +499,7 @@ } else { var instruments_me = []; + console.log("** getCreatorInstruments() (1)", getCreatorInstruments()); $.each(getCreatorInstruments(), function(index, instrument) { instruments_me.push(instrument.name); }); @@ -884,6 +885,7 @@ data.friends_can_join = createSessionSettings.friends_can_join; data.rsvp_slots = []; + console.log("** startSession getCreatorInstruments (2): " + getCreatorInstruments()); $.each(getCreatorInstruments(), function(index, instrument) { var slot = {}; slot.instrument_id = instrument.id; @@ -893,6 +895,7 @@ }); var otherInstruments = instrumentRSVP.getSelectedInstruments(); + console.log("** startSession getSelectedInstruments: " + otherInstruments); data.isUnstructuredRsvp = otherInstruments.length == 0 && userSelectedSlots(createSessionSettings.createType); $.each(instrumentRSVP.getSelectedInstruments(), function(index, instrument) { for (var i = 0; i < instrument.count; i++) { @@ -903,6 +906,7 @@ data.rsvp_slots.push(slot); } }); + console.log("** startSession data.rsvp_slots: " + data.rsvp_slots); } var joinSession = function(sessionId) { @@ -1507,6 +1511,7 @@ // asks the instrument selector for the creator's specified instruments, and defaults to Other/Beginner if none were selected function getCreatorInstruments() { var instruments = instrumentSelector.getSelectedInstruments(); + console.log("** getCreatorInstruments getSelectedInstruments (0)", instruments) if(instruments.length == 0) { var otherId = context.JK.server_to_client_instrument_map.Other.server_id; // get server ID var otherInstrumentInfo = context.JK.instrument_id_to_instrument[otherId]; // get display name