Skip to content

Commit

Permalink
Added view history button to submission, fix builtin string method names
Browse files Browse the repository at this point in the history
  • Loading branch information
acbart committed Sep 12, 2019
1 parent 6935c5e commit eab62ef
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 17 additions & 1 deletion static/libs/skulpt/skulpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -17356,6 +17356,22 @@ Sk.builtin.str.prototype["rsplit"].co_varnames = ["sep", "maxsplit"];
Sk.builtin.str.prototype["rsplit"].$defaults = [Sk.builtin.none.none$, Sk.builtin.int_(-1)];
Sk.builtin.str.prototype["rsplit"].co_kwargs = true;

var builtinStringMethods = [
"capitalize", "center", "count", "endswith", "expandtabs",
"find", "format", "index", "isalnum", "isalpha",
"isdigit", "islower", "isnumeric", "isspace",
"istitle", "isupper", "join", "ljust", "lower", "lstrip",
"partition", "replace", "rfind", "rindex", "rjust", "rpartition", "rsplit",
"rstrip", "split", "splitlines", "startswith", "strip", "swapcase", "title",
"upper", "zfill"
];
for (i = 0; i < builtinStringMethods.length; i++) {
renamed = builtinStringMethods[i];
Sk.builtin.str.prototype[renamed].co_name = new Sk.builtin.str(renamed);
Sk.builtin.str.prototype[renamed].__name__ = new Sk.builtin.str(renamed);
Sk.builtin.str.prototype[renamed].tp$name = renamed;
}

/***/ }),

/***/ "./src/dict.js":
Expand Down Expand Up @@ -35077,7 +35093,7 @@ var Sk = {}; // jshint ignore:line

Sk.build = {
githash: "b358af4824d08ce74dc6dd9bfffe9df9d619f806",
date: "2019-09-12T03:07:07.552Z"
date: "2019-09-12T04:21:23.623Z"
};

/**
Expand Down
2 changes: 2 additions & 0 deletions templates/reports/blockpy.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ <h2 id='{{ assignment.slug() }}'>{{ assignment.name }}</h2>
<div>Instructor Link: <a href='' target='_blank'>View</a></div>
-->
<div>Touches: {{ submission.version }}</div>
<div>History: <a href="{{ url_for('blockpy.load_history', assignment_id=submission.assignment_id,
user_id=submission.user_id, course_id=submission.course_id) }}">view</a></div>
<div>Estimated Duration: {{ (submission.version/60.0)|round(2) }} minutes</div>
{% set turtle_output = submission.get_image('turtle_output') %}
{% if turtle_output %}
Expand Down

0 comments on commit eab62ef

Please sign in to comment.