Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
30a6990
in usageAssignment directive, it's subchapters, not subchapter or sub…
presnick Nov 29, 2015
c1e29ff
more bug fixes for usageassignment directive
presnick Nov 29, 2015
887301e
Updated parsons
flysaiah Dec 3, 2015
b44efdb
Fixed compareButton bug in MChoice
flysaiah Dec 5, 2015
e23b98c
Merge branch 'ParsonsUpdate' of https://github.com/flysaiah/Runestone…
bnmnetp Dec 15, 2015
f615314
merge with flysaiah-ParsonsUpdate
bnmnetp Dec 15, 2015
7be9df1
Merge pull request #111 from flysaiah/mcBugFix
bnmnetp Dec 15, 2015
bbc537e
Merge pull request #109 from presnick/master
bnmnetp Dec 15, 2015
bc281da
Fixes typo in timelimit. activecodes specifying timelimit off should…
bnmnetp Dec 20, 2015
a6c059d
Use the container directive with the full_width class to override the…
bnmnetp Jan 9, 2016
1130b3f
Add basecourse to eBookConfig
bnmnetp Jan 9, 2016
38907f1
Add base_course to template
bnmnetp Jan 10, 2016
ba0b0f2
Fix to read audio files from the server
ericsonga Jan 16, 2016
9385dfb
bump version
bnmnetp Jan 24, 2016
93da463
dumb rst to css changes _ to -, we must follow.
bnmnetp Jan 24, 2016
a218fb3
bump version for css fix
bnmnetp Jan 24, 2016
1b7412b
Fix to use base course in eBookConfig
ericsonga Jan 26, 2016
6f88a58
Merge remote-tracking branch 'RunestoneInteractive/master'
ericsonga Jan 26, 2016
c073a63
Merge pull request #114 from CSLearning4U/master
bnmnetp Jan 27, 2016
3ea9760
Fix to fill in the blank logging of correct answers
ericsonga Jan 27, 2016
06b4541
Fix for indention on Parsons problems with code blocks that need to b…
ericsonga Jan 28, 2016
d041ad7
removed console.log
ericsonga Jan 28, 2016
391e8df
Moved the code to get rid of leading spaces so that the code string i…
ericsonga Jan 28, 2016
f7a56c4
Merge pull request #115 from CSLearning4U/master
bnmnetp Jan 28, 2016
cbd006c
Fix to stop extra logging of timed quesitons
ericsonga Feb 3, 2016
34d8e09
Merge remote-tracking branch 'RunestoneInteractive/master'
ericsonga Feb 3, 2016
0c650f0
Merge pull request #116 from CSLearning4U/master
bnmnetp Feb 11, 2016
ee81167
Missing basecourse in the dictionary. Use stub value in init
bnmnetp Feb 11, 2016
8d578e5
Development files should not be ignored. Development files should be…
bnmnetp Feb 11, 2016
a9b8fbb
Make new release with bug fixes
bnmnetp Feb 11, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions runestone/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def init():
conf_dict['author'] = click.prompt("Your Name ", default=getpass.getuser())
conf_dict['project_title'] = click.prompt("Title for this project ", default="Runestone Default")
conf_dict['python3'] = click.prompt("Use Simple Python3 Semantics ", default="false")
conf_dict['basecourse'] = conf_dict['project_name']
if conf_dict['use_services'] == "true":
conf_dict['login_req'] = click.prompt("Require login ", default="false")
conf_dict['master_url'] = click.prompt("URL for ajax server ", default="http://127.0.0.1:8000")
Expand Down
2 changes: 1 addition & 1 deletion runestone/activecode/css/activecode.css
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@
border: 2px solid black;
}

ol.arabic {
.full_width ol {
max-width: 100% !important;
}
13 changes: 8 additions & 5 deletions runestone/activecode/js/activecode.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ errorText.NotImplementedErrorFix = "For now the only way to fix this is to not u


ActiveCode.prototype.setTimeLimit = function (timer) {
var timelimit = this.timeLimit;
var timelimit = this.timelimit;
if (timer !== undefined ) {
timelimit = timer
}
Expand Down Expand Up @@ -986,11 +986,14 @@ AudioTour.prototype.tour = function (divid, audio_type, bcount) {
// str+="<audio id="+akey+" preload='auto'><source src='http://ice-web.cc.gatech.edu/ce21/audio/"+
// akey+".mp3' type='audio/mpeg'><source src='http://ice-web.cc.gatech.edu/ce21/audio/"+akey+
// ".ogg' type='audio/ogg'>Your browser does not support the audio tag</audio>";

var dir = "http://media.interactivepython.org/" + eBookConfig.basecourse + "/audio/"
//var dir = "../_static/audio/"
str += "<audio id=" + akey + " preload='auto' >";
str += "<source src='../_static/audio/" + akey + ".wav' type='audio/wav'>";
str += "<source src='../_static/audio/" + akey + ".mp3' type='audio/mpeg'>";
str += "<source src='_static/audio/" + akey + ".wav' type='audio/wav'>";
str += "<source src='_static/audio/" + akey + ".mp3' type='audio/mpeg'>";
str += "<source src='" + dir + akey + ".wav' type='audio/wav'>";
str += "<source src='" + dir + akey + ".mp3' type='audio/mpeg'>";
str += "<source src='" + dir + akey + ".wav' type='audio/wav'>";
str += "<source src='" + dir + akey + ".mp3' type='audio/mpeg'>";
str += "<br />Your browser does not support the audio tag</audio>";
this.ahash[akey] = lnums;
this.aname.push(akey);
Expand Down
2 changes: 1 addition & 1 deletion runestone/assess/js/fitb.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ FITB.prototype.checkFITBStorage = function () {
// Starts chain of functions which ends with feedBack() displaying feedback to user
this.evaluateAnswers();
this.renderFITBFeedback();
var answerInfo = "answer:" + this.given_arr + ":" + (this.isCorrect ? "correct" : "no");
var answerInfo = "answer:" + this.given_arr + ":" + (this.correct ? "correct" : "no");
this.logBookEvent({"event": "fillb", "act": answerInfo, "div_id": this.divid});
this.enableCompareButton.disabled = false;
};
Expand Down
20 changes: 13 additions & 7 deletions runestone/assess/js/mchoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,12 @@ MultipleChoice.prototype.renderMCFormButtons = function () {
});
if (this.multipleanswers) {
this.submitButton.addEventListener("click", function () {
this.processMCMASubmission();
this.processMCMASubmission(true);
}.bind(this), false);
} else {
this.submitButton.addEventListener("click", function (ev) {
ev.preventDefault();
this.processMCMFSubmission();
this.processMCMFSubmission(true);
}.bind(this), false);
} // end else
this.optsForm.appendChild(this.submitButton);
Expand Down Expand Up @@ -313,7 +313,9 @@ MultipleChoice.prototype.restoreMultipleSelect = function () {
$(this.optionArray[b].input).attr("checked", "true");
}
}
this.enableMCComparison();
if (this.useRunestoneServices) {
this.enableMCComparison();
}
} // end for
} // end if
} // end if len > 0
Expand Down Expand Up @@ -346,12 +348,14 @@ MultipleChoice.prototype.restoreRadio = function () {
=== Processing MC Submissions ===
===============================*/

MultipleChoice.prototype.processMCMASubmission = function () {
MultipleChoice.prototype.processMCMASubmission = function (logFlag) {
// Called when the submit button is clicked
this.getSubmittedOpts();
this.scoreMCMASubmission();
this.populateMCMALocalStorage();
this.logMCMAsubmission();
if (logFlag) {
this.logMCMAsubmission();
}
this.renderMCMAFeedBack();
if (this.useRunestoneServices) {
this.enableMCComparison();
Expand Down Expand Up @@ -428,12 +432,14 @@ MultipleChoice.prototype.renderMCMAFeedBack = function () {
}
};

MultipleChoice.prototype.processMCMFSubmission = function () {
MultipleChoice.prototype.processMCMFSubmission = function (logFlag) {
// Called when the submit button is clicked
this.getSubmittedOpts();
this.populateMCMFLocalStorage();
this.scoreMCMFSubmission();
this.logMCMFsubmission();
if (logFlag) {
this.logMCMFsubmission();
}
this.renderMCMFFeedback(this.givenArray[0] == this.correctIndexList[0], this.singlefeedback);
if (this.useRunestoneServices) {
this.enableMCComparison();
Expand Down
8 changes: 4 additions & 4 deletions runestone/assess/js/timed.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ Timed.prototype.handlePrevAssessment = function () {
this.running = 0;
this.done = 1;
$(this.timedDiv).show();
this.submitTimedProblems();
this.submitTimedProblems(false); // do not log these results
}

Timed.prototype.startAssessment = function () {
Expand Down Expand Up @@ -508,7 +508,7 @@ Timed.prototype.finishAssessment = function () {
this.running = 0;
this.done = 1;
this.taken = 1;
this.submitTimedProblems();
this.submitTimedProblems(true); // log results
this.checkScore();
this.displayScore();
this.storeScore();
Expand All @@ -518,9 +518,9 @@ Timed.prototype.finishAssessment = function () {
}
};

Timed.prototype.submitTimedProblems = function () {
Timed.prototype.submitTimedProblems = function (logFlag) {
for (var i = 0; i < this.renderedQuestionArray.length; i++) {
this.renderedQuestionArray[i].processTimedSubmission();
this.renderedQuestionArray[i].processTimedSubmission(logFlag);
}
if (!this.showFeedback) {
this.hideTimedFeedback();
Expand Down
6 changes: 3 additions & 3 deletions runestone/assess/js/timedmc.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ TimedMC.prototype.hideFeedback = function () {
}
};

TimedMC.prototype.processTimedSubmission = function () {
TimedMC.prototype.processTimedSubmission = function (logFlag) {
for (var i = 0; i < this.optionArray.length; i++) {
this.optionArray[i]["input"].disabled = true;
}
if (this.multipleanswers) {
this.processMCMASubmission();
this.processMCMASubmission(logFlag);
} else {
this.processMCMFSubmission();
this.processMCMFSubmission(logFlag);
}
};
12 changes: 11 additions & 1 deletion runestone/common/css/runestone-custom-sphinx-bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,22 @@ div.section {
padding-left:0;
padding-right:0;
}
.container .section >*:not(.section) {
.container .section >*:not(.section) {
max-width: 500pt;
margin-left: auto;
margin-right: auto;
}

/* This rule is meant to override the behavior of the
previous rule since it is not possible to exclude
more than one section in the not() part of the rule
*/
.container .section div.full-width.container {
margin-left: auto;
margin-right: auto;
max-width: 90%;
}

.container .section>img {
display: block;
margin-left: auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@
eBookConfig.isLoggedIn = false;
eBookConfig.useRunestoneServices = {{ use_services }};
eBookConfig.python3 = {{ python3 }};
eBookConfig.basecourse = '{{ basecourse }}';
</script>

<div id="fb-root"></div>
Expand Down
3 changes: 2 additions & 1 deletion runestone/common/project_template/pavement.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ options(
'course_url':master_url,
'use_services': '%(use_services)s',
'python3': '%(python3)s',
'dburl': '%(dburl)s'
'dburl': '%(dburl)s',
'basecourse': '%(basecourse)s'
}
)
)
Expand Down
18 changes: 13 additions & 5 deletions runestone/parsons/css/parsons.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** Stylesheet for the puzzles */

.sortable-code {
position: static;
padding-left: 0px;
margin-left: 2%;
display:inline-block;
Expand All @@ -19,6 +20,12 @@
margin-left: 0;
border: 1px solid #efefff;;
}
.sortable-code ul:empty {
padding-bottom: 30px;
}
.sortable-code li, .sortable-code li:before, .sortable-code li:after {
box-sizing: content-box;
}
ul.output {
background-color: #FFA;
}
Expand Down Expand Up @@ -72,13 +79,13 @@ li.correctPosition, .testcase.pass {
.testcase .msg { font-weight: bold; }
.testcase .error { color: red;}
.testcase .feedback { font-weight: bolder;}
.testcase.fail .expected, .testcase.fail .actual {
color: red;
.testcase .fail .expected, .testcase .fail .actual {
color: red;
font-weight: bolder;
}
.testcase .output {
display: block;
white-space: pre;
.testcase .output {
display: block;
white-space: pre;
background-color: #555555;
color: white;
font-size: 12px;
Expand All @@ -104,6 +111,7 @@ li.correctPosition, .testcase.pass {
display: block;
color: red;
}

.parsons{
/*background-color: #fbfcfd;
border-color: #e6e6e6;
Expand Down
11 changes: 11 additions & 0 deletions runestone/parsons/js/lib/jquery.ui.touch-punch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions runestone/parsons/js/lib/lis.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,31 @@ var LIS = {};
return _.difference(list, best);
};

// Returns an array of those indices of the input that
// are not included in the chosen longest increasing
// subsequence of the input values.
LIS.best_lise_inverse_indices = function(input) {
var decks = this.patience_sort(_.toArray(input)),
lises = this.find_lises(decks),
best = this.best_lise(lises),
inverse_indices = [];
var j = 0;
for (var i = 0; i < best.length; i++) {
for ( ; j < input.length; j++) {
if (input[j] === best[i]) {
j++;
break;
} else {
inverse_indices.push(j);
}
}
}
for ( ; j < input.length; j++) {
inverse_indices.push(j);
}
return inverse_indices;
};

// Takes an iterable sequence and returns a list of the inverses of
// all the longest increasing subsequences of this sequence
/*
Expand Down
Loading