Skip to content

Commit b8dddfa

Browse files
committed
slightly better display for errors
1 parent 24c1e52 commit b8dddfa

17 files changed

Lines changed: 98 additions & 38 deletions

v5-unity/build/composingprograms.bundle.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22525,9 +22525,15 @@ var OptFrontendSharedSessions = (function (_super) {
2252522525
data: { user_uuid: this.userUUID },
2252622526
error: function () {
2252722527
console.log('/getHelpQueue error');
22528-
$("#publicHelpQueue").empty(); // avoid showing stale results
22528+
if (_this.wantsPublicHelp) {
22529+
$("#publicHelpQueue").html('ERROR: help server is down. If you had previously asked for help, something is wrong; stop this session and try again later.');
22530+
}
22531+
else {
22532+
$("#publicHelpQueue").empty(); // avoid showing stale results
22533+
}
2252922534
},
2253022535
success: function (resp) {
22536+
var displayEmptyQueueMsg = false;
2253122537
if (resp && resp.length > 0) {
2253222538
$("#publicHelpQueue").empty();
2253322539
var myShareId = exports.TogetherJS.shareId();
@@ -22632,13 +22638,19 @@ var OptFrontendSharedSessions = (function (_super) {
2263222638
});
2263322639
}
2263422640
else {
22635-
// ugly repetition ...
22636-
$("#publicHelpQueue").html('Nobody is currently asking for help. Click "Get live help!" at the left to ask for help.');
22641+
displayEmptyQueueMsg = true;
2263722642
}
2263822643
}
2263922644
else {
22640-
// ugly repetition ...
22641-
$("#publicHelpQueue").html('Nobody is currently asking for help. Click "Get live help!" at the left to ask for help.');
22645+
displayEmptyQueueMsg = true;
22646+
}
22647+
if (displayEmptyQueueMsg) {
22648+
if (_this.wantsPublicHelp) {
22649+
$("#publicHelpQueue").html('Nobody is currently asking for help. If you had previously asked for help, something is wrong; stop this session and try again later.');
22650+
}
22651+
else {
22652+
$("#publicHelpQueue").html('Nobody is currently asking for help using the "Get live help!" button.');
22653+
}
2264222654
}
2264322655
},
2264422656
});

v5-unity/build/csc108h.bundle.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22525,9 +22525,15 @@ var OptFrontendSharedSessions = (function (_super) {
2252522525
data: { user_uuid: this.userUUID },
2252622526
error: function () {
2252722527
console.log('/getHelpQueue error');
22528-
$("#publicHelpQueue").empty(); // avoid showing stale results
22528+
if (_this.wantsPublicHelp) {
22529+
$("#publicHelpQueue").html('ERROR: help server is down. If you had previously asked for help, something is wrong; stop this session and try again later.');
22530+
}
22531+
else {
22532+
$("#publicHelpQueue").empty(); // avoid showing stale results
22533+
}
2252922534
},
2253022535
success: function (resp) {
22536+
var displayEmptyQueueMsg = false;
2253122537
if (resp && resp.length > 0) {
2253222538
$("#publicHelpQueue").empty();
2253322539
var myShareId = exports.TogetherJS.shareId();
@@ -22632,13 +22638,19 @@ var OptFrontendSharedSessions = (function (_super) {
2263222638
});
2263322639
}
2263422640
else {
22635-
// ugly repetition ...
22636-
$("#publicHelpQueue").html('Nobody is currently asking for help. Click "Get live help!" at the left to ask for help.');
22641+
displayEmptyQueueMsg = true;
2263722642
}
2263822643
}
2263922644
else {
22640-
// ugly repetition ...
22641-
$("#publicHelpQueue").html('Nobody is currently asking for help. Click "Get live help!" at the left to ask for help.');
22645+
displayEmptyQueueMsg = true;
22646+
}
22647+
if (displayEmptyQueueMsg) {
22648+
if (_this.wantsPublicHelp) {
22649+
$("#publicHelpQueue").html('Nobody is currently asking for help. If you had previously asked for help, something is wrong; stop this session and try again later.');
22650+
}
22651+
else {
22652+
$("#publicHelpQueue").html('Nobody is currently asking for help using the "Get live help!" button.');
22653+
}
2264222654
}
2264322655
},
2264422656
});

v5-unity/build/opt-live.bundle.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22525,9 +22525,15 @@ var OptFrontendSharedSessions = (function (_super) {
2252522525
data: { user_uuid: this.userUUID },
2252622526
error: function () {
2252722527
console.log('/getHelpQueue error');
22528-
$("#publicHelpQueue").empty(); // avoid showing stale results
22528+
if (_this.wantsPublicHelp) {
22529+
$("#publicHelpQueue").html('ERROR: help server is down. If you had previously asked for help, something is wrong; stop this session and try again later.');
22530+
}
22531+
else {
22532+
$("#publicHelpQueue").empty(); // avoid showing stale results
22533+
}
2252922534
},
2253022535
success: function (resp) {
22536+
var displayEmptyQueueMsg = false;
2253122537
if (resp && resp.length > 0) {
2253222538
$("#publicHelpQueue").empty();
2253322539
var myShareId = exports.TogetherJS.shareId();
@@ -22632,13 +22638,19 @@ var OptFrontendSharedSessions = (function (_super) {
2263222638
});
2263322639
}
2263422640
else {
22635-
// ugly repetition ...
22636-
$("#publicHelpQueue").html('Nobody is currently asking for help. Click "Get live help!" at the left to ask for help.');
22641+
displayEmptyQueueMsg = true;
2263722642
}
2263822643
}
2263922644
else {
22640-
// ugly repetition ...
22641-
$("#publicHelpQueue").html('Nobody is currently asking for help. Click "Get live help!" at the left to ask for help.');
22645+
displayEmptyQueueMsg = true;
22646+
}
22647+
if (displayEmptyQueueMsg) {
22648+
if (_this.wantsPublicHelp) {
22649+
$("#publicHelpQueue").html('Nobody is currently asking for help. If you had previously asked for help, something is wrong; stop this session and try again later.');
22650+
}
22651+
else {
22652+
$("#publicHelpQueue").html('Nobody is currently asking for help using the "Get live help!" button.');
22653+
}
2264222654
}
2264322655
},
2264422656
});

v5-unity/build/visualize.bundle.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22525,9 +22525,15 @@ var OptFrontendSharedSessions = (function (_super) {
2252522525
data: { user_uuid: this.userUUID },
2252622526
error: function () {
2252722527
console.log('/getHelpQueue error');
22528-
$("#publicHelpQueue").empty(); // avoid showing stale results
22528+
if (_this.wantsPublicHelp) {
22529+
$("#publicHelpQueue").html('ERROR: help server is down. If you had previously asked for help, something is wrong; stop this session and try again later.');
22530+
}
22531+
else {
22532+
$("#publicHelpQueue").empty(); // avoid showing stale results
22533+
}
2252922534
},
2253022535
success: function (resp) {
22536+
var displayEmptyQueueMsg = false;
2253122537
if (resp && resp.length > 0) {
2253222538
$("#publicHelpQueue").empty();
2253322539
var myShareId = exports.TogetherJS.shareId();
@@ -22632,13 +22638,19 @@ var OptFrontendSharedSessions = (function (_super) {
2263222638
});
2263322639
}
2263422640
else {
22635-
// ugly repetition ...
22636-
$("#publicHelpQueue").html('Nobody is currently asking for help. Click "Get live help!" at the left to ask for help.');
22641+
displayEmptyQueueMsg = true;
2263722642
}
2263822643
}
2263922644
else {
22640-
// ugly repetition ...
22641-
$("#publicHelpQueue").html('Nobody is currently asking for help. Click "Get live help!" at the left to ask for help.');
22645+
displayEmptyQueueMsg = true;
22646+
}
22647+
if (displayEmptyQueueMsg) {
22648+
if (_this.wantsPublicHelp) {
22649+
$("#publicHelpQueue").html('Nobody is currently asking for help. If you had previously asked for help, something is wrong; stop this session and try again later.');
22650+
}
22651+
else {
22652+
$("#publicHelpQueue").html('Nobody is currently asking for help using the "Get live help!" button.');
22653+
}
2264222654
}
2264322655
},
2264422656
});

v5-unity/c.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<!-- let Webpack take care of everything. Use the [hash] feature to
2121
create unique filenames for releases:
2222
https://webpack.github.io/docs/long-term-caching.html -->
23-
<script type="text/javascript" src="build/visualize.bundle.js?0e1205e820" charset="utf-8"></script>
23+
<script type="text/javascript" src="build/visualize.bundle.js?6b105bfa5b" charset="utf-8"></script>
2424

2525
<!-- insert google-analytics.txt contents here -->
2626

v5-unity/composingprograms.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<title>Online Python Tutor - Composing Programs - Python 3</title>
1212

1313
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
14-
<script type="text/javascript" src="build/composingprograms.bundle.js?721187cc9a" charset="utf-8"></script>
14+
<script type="text/javascript" src="build/composingprograms.bundle.js?23a48c44ae" charset="utf-8"></script>
1515

1616
<!-- insert google-analytics.txt contents here -->
1717

v5-unity/cpp.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<!-- let Webpack take care of everything. Use the [hash] feature to
2121
create unique filenames for releases:
2222
https://webpack.github.io/docs/long-term-caching.html -->
23-
<script type="text/javascript" src="build/visualize.bundle.js?0e1205e820" charset="utf-8"></script>
23+
<script type="text/javascript" src="build/visualize.bundle.js?6b105bfa5b" charset="utf-8"></script>
2424

2525
<!-- insert google-analytics.txt contents here -->
2626

v5-unity/csc108h.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<title>Online Python Tutor - csc108h</title>
1212

1313
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
14-
<script type="text/javascript" src="build/csc108h.bundle.js?31c393728a" charset="utf-8"></script>
14+
<script type="text/javascript" src="build/csc108h.bundle.js?95a30f27e1" charset="utf-8"></script>
1515

1616
<!-- insert google-analytics.txt contents here -->
1717

v5-unity/csc108h_shared.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<title>Online Python Tutor - csc108h with shared sessions</title>
1212

1313
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
14-
<script type="text/javascript" src="build/csc108h.bundle.js?31c393728a" charset="utf-8"></script>
14+
<script type="text/javascript" src="build/csc108h.bundle.js?95a30f27e1" charset="utf-8"></script>
1515

1616
<!-- insert google-analytics.txt contents here -->
1717

v5-unity/java.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<!-- let Webpack take care of everything. Use the [hash] feature to
2121
create unique filenames for releases:
2222
https://webpack.github.io/docs/long-term-caching.html -->
23-
<script type="text/javascript" src="build/visualize.bundle.js?0e1205e820" charset="utf-8"></script>
23+
<script type="text/javascript" src="build/visualize.bundle.js?6b105bfa5b" charset="utf-8"></script>
2424

2525
<!-- insert google-analytics.txt contents here -->
2626

0 commit comments

Comments
 (0)