From 72b7193c03e19105764dfbd3c4bbc37dedf12a0a Mon Sep 17 00:00:00 2001 From: jmclaus Date: Sun, 3 Mar 2013 10:43:16 +0100 Subject: [PATCH] Genex is gradable --- common/lib/capa/capa/inputtypes.py | 7 +- .../capa/capa/templates/editageneinput.html | 1 + common/static/js/capa/edit-a-gene.js | 15 +- ...B3B0A256735176413A40727372820E6.cache.html | 633 ----------------- ...BFB2B59BF73690E64CA963B37E3E6C2.cache.html | 631 ----------------- ...DA5F49EF0DE7E7B1720F5F56CD2F9F3.cache.html | 640 +++++++++++++++++ ...EC2E5D94B410DDAB081BBAC4222386F.cache.html | 618 ----------------- ...D39C857C99EA0E0722C72B4A9A60272.cache.html | 650 +++++++++++++++++ ...504BC625F3CBFF0967F88C441871055.cache.html | 631 ----------------- ...8AB039AB796F1D6C3B133DAD892A057.cache.html | 607 ---------------- ...E6A498E963EF437B7FAFAFAD9F6A252.cache.html | 652 ++++++++++++++++++ ...66BAF3695DBE904ECE0FB5DC56AED92.cache.html | 621 ----------------- ...D3437123EB1250A9B0D3DD724676C7D.cache.html | 640 +++++++++++++++++ ...09CC241B930308C35EE3D52C93FA3F5.cache.html | 626 +++++++++++++++++ ...0126043DD1A3B0036CEE5B4C0118B81.cache.html | 650 +++++++++++++++++ common/static/js/capa/genex/genex.nocache.js | 4 +- .../static/js/capa/genex/images/circles.png | Bin 1492 -> 0 bytes .../js/capa/genex/images/circles_ie6.png | Bin 432 -> 0 bytes common/static/js/capa/genex/images/corner.png | Bin 1140 -> 0 bytes .../js/capa/genex/images/corner_ie6.png | Bin 412 -> 0 bytes .../static/js/capa/genex/images/hborder.png | Bin 1995 -> 0 bytes .../js/capa/genex/images/hborder_ie6.png | Bin 706 -> 0 bytes .../js/capa/genex/images/thumb_horz.png | Bin 222 -> 0 bytes .../js/capa/genex/images/thumb_vertical.png | Bin 231 -> 0 bytes .../static/js/capa/genex/images/vborder.png | Bin 298 -> 0 bytes .../js/capa/genex/images/vborder_ie6.png | Bin 189 -> 0 bytes 26 files changed, 3878 insertions(+), 3748 deletions(-) delete mode 100644 common/static/js/capa/genex/1B3B0A256735176413A40727372820E6.cache.html delete mode 100644 common/static/js/capa/genex/3BFB2B59BF73690E64CA963B37E3E6C2.cache.html create mode 100644 common/static/js/capa/genex/4DA5F49EF0DE7E7B1720F5F56CD2F9F3.cache.html delete mode 100644 common/static/js/capa/genex/4EC2E5D94B410DDAB081BBAC4222386F.cache.html create mode 100644 common/static/js/capa/genex/5D39C857C99EA0E0722C72B4A9A60272.cache.html delete mode 100644 common/static/js/capa/genex/7504BC625F3CBFF0967F88C441871055.cache.html delete mode 100644 common/static/js/capa/genex/88AB039AB796F1D6C3B133DAD892A057.cache.html create mode 100644 common/static/js/capa/genex/BE6A498E963EF437B7FAFAFAD9F6A252.cache.html delete mode 100644 common/static/js/capa/genex/C66BAF3695DBE904ECE0FB5DC56AED92.cache.html create mode 100644 common/static/js/capa/genex/CD3437123EB1250A9B0D3DD724676C7D.cache.html create mode 100644 common/static/js/capa/genex/E09CC241B930308C35EE3D52C93FA3F5.cache.html create mode 100644 common/static/js/capa/genex/F0126043DD1A3B0036CEE5B4C0118B81.cache.html delete mode 100644 common/static/js/capa/genex/images/circles.png delete mode 100644 common/static/js/capa/genex/images/circles_ie6.png delete mode 100644 common/static/js/capa/genex/images/corner.png delete mode 100644 common/static/js/capa/genex/images/corner_ie6.png delete mode 100644 common/static/js/capa/genex/images/hborder.png delete mode 100644 common/static/js/capa/genex/images/hborder_ie6.png delete mode 100644 common/static/js/capa/genex/images/thumb_horz.png delete mode 100644 common/static/js/capa/genex/images/thumb_vertical.png delete mode 100644 common/static/js/capa/genex/images/vborder.png delete mode 100644 common/static/js/capa/genex/images/vborder_ie6.png diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index 951104501a..6b0f2425d0 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -921,11 +921,12 @@ class EditAGeneInput(InputTypeBase): @classmethod def get_attributes(cls): """ - Note: width, hight, and dna_sequencee are required. - """ + Note: width, height, and dna_sequencee are required. + """ return [Attribute('width'), Attribute('height'), - Attribute('dna_sequence') + Attribute('dna_sequence'), + Attribute('genex_problem_number') ] def _extra_context(self): diff --git a/common/lib/capa/capa/templates/editageneinput.html b/common/lib/capa/capa/templates/editageneinput.html index 8dc9414aed..3465c62593 100644 --- a/common/lib/capa/capa/templates/editageneinput.html +++ b/common/lib/capa/capa/templates/editageneinput.html @@ -14,6 +14,7 @@
+

diff --git a/common/static/js/capa/edit-a-gene.js b/common/static/js/capa/edit-a-gene.js index aeb26237c4..0df2e08b2f 100644 --- a/common/static/js/capa/edit-a-gene.js +++ b/common/static/js/capa/edit-a-gene.js @@ -13,19 +13,30 @@ } //NOTE: - // Genex uses four global functions: + // Genex uses six global functions: // genexSetDNASequence (exported from GWT) // genexSetClickEvent (exported from GWT) // genexSetKeyEvent (exported from GWT) + // genexSetProblemNumber (exported from GWT) + // // It calls genexIsReady with a deferred command when it has finished // initialization and has drawn itself + // genexStoreAnswer(answer) is called when the GWT [Store Answer] button + // is clicked + genexIsReady = function() { //Load DNA sequence var dna_sequence = $('#dna_sequence').val(); genexSetDNASequence(dna_sequence); //Now load mouse and keyboard handlers genexSetClickEvent(); - genexSetKeyEvent(); + genexSetKeyEvent(); + //Now load problem + var genex_problem_number = $('#genex_problem_number').val(); + genexSetProblemNumber(genex_problem_number); + }; + genexStoreAnswer = function(ans) { + alert(ans); }; }).call(this); diff --git a/common/static/js/capa/genex/1B3B0A256735176413A40727372820E6.cache.html b/common/static/js/capa/genex/1B3B0A256735176413A40727372820E6.cache.html deleted file mode 100644 index 62c5b7a605..0000000000 --- a/common/static/js/capa/genex/1B3B0A256735176413A40727372820E6.cache.html +++ /dev/null @@ -1,633 +0,0 @@ - - - - \ No newline at end of file diff --git a/common/static/js/capa/genex/3BFB2B59BF73690E64CA963B37E3E6C2.cache.html b/common/static/js/capa/genex/3BFB2B59BF73690E64CA963B37E3E6C2.cache.html deleted file mode 100644 index f47030bf01..0000000000 --- a/common/static/js/capa/genex/3BFB2B59BF73690E64CA963B37E3E6C2.cache.html +++ /dev/null @@ -1,631 +0,0 @@ - - - - \ No newline at end of file diff --git a/common/static/js/capa/genex/4DA5F49EF0DE7E7B1720F5F56CD2F9F3.cache.html b/common/static/js/capa/genex/4DA5F49EF0DE7E7B1720F5F56CD2F9F3.cache.html new file mode 100644 index 0000000000..1272a53a74 --- /dev/null +++ b/common/static/js/capa/genex/4DA5F49EF0DE7E7B1720F5F56CD2F9F3.cache.html @@ -0,0 +1,640 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/genex/4EC2E5D94B410DDAB081BBAC4222386F.cache.html b/common/static/js/capa/genex/4EC2E5D94B410DDAB081BBAC4222386F.cache.html deleted file mode 100644 index 090d22b68c..0000000000 --- a/common/static/js/capa/genex/4EC2E5D94B410DDAB081BBAC4222386F.cache.html +++ /dev/null @@ -1,618 +0,0 @@ - - - \ No newline at end of file diff --git a/common/static/js/capa/genex/5D39C857C99EA0E0722C72B4A9A60272.cache.html b/common/static/js/capa/genex/5D39C857C99EA0E0722C72B4A9A60272.cache.html new file mode 100644 index 0000000000..cb510fbff2 --- /dev/null +++ b/common/static/js/capa/genex/5D39C857C99EA0E0722C72B4A9A60272.cache.html @@ -0,0 +1,650 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/genex/7504BC625F3CBFF0967F88C441871055.cache.html b/common/static/js/capa/genex/7504BC625F3CBFF0967F88C441871055.cache.html deleted file mode 100644 index 143af1d438..0000000000 --- a/common/static/js/capa/genex/7504BC625F3CBFF0967F88C441871055.cache.html +++ /dev/null @@ -1,631 +0,0 @@ - - - - \ No newline at end of file diff --git a/common/static/js/capa/genex/88AB039AB796F1D6C3B133DAD892A057.cache.html b/common/static/js/capa/genex/88AB039AB796F1D6C3B133DAD892A057.cache.html deleted file mode 100644 index a75fd5115e..0000000000 --- a/common/static/js/capa/genex/88AB039AB796F1D6C3B133DAD892A057.cache.html +++ /dev/null @@ -1,607 +0,0 @@ - - - \ No newline at end of file diff --git a/common/static/js/capa/genex/BE6A498E963EF437B7FAFAFAD9F6A252.cache.html b/common/static/js/capa/genex/BE6A498E963EF437B7FAFAFAD9F6A252.cache.html new file mode 100644 index 0000000000..7236a3af99 --- /dev/null +++ b/common/static/js/capa/genex/BE6A498E963EF437B7FAFAFAD9F6A252.cache.html @@ -0,0 +1,652 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/genex/C66BAF3695DBE904ECE0FB5DC56AED92.cache.html b/common/static/js/capa/genex/C66BAF3695DBE904ECE0FB5DC56AED92.cache.html deleted file mode 100644 index 545dcff856..0000000000 --- a/common/static/js/capa/genex/C66BAF3695DBE904ECE0FB5DC56AED92.cache.html +++ /dev/null @@ -1,621 +0,0 @@ - - - - \ No newline at end of file diff --git a/common/static/js/capa/genex/CD3437123EB1250A9B0D3DD724676C7D.cache.html b/common/static/js/capa/genex/CD3437123EB1250A9B0D3DD724676C7D.cache.html new file mode 100644 index 0000000000..41d6ac3260 --- /dev/null +++ b/common/static/js/capa/genex/CD3437123EB1250A9B0D3DD724676C7D.cache.html @@ -0,0 +1,640 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/genex/E09CC241B930308C35EE3D52C93FA3F5.cache.html b/common/static/js/capa/genex/E09CC241B930308C35EE3D52C93FA3F5.cache.html new file mode 100644 index 0000000000..38e8785086 --- /dev/null +++ b/common/static/js/capa/genex/E09CC241B930308C35EE3D52C93FA3F5.cache.html @@ -0,0 +1,626 @@ + + + \ No newline at end of file diff --git a/common/static/js/capa/genex/F0126043DD1A3B0036CEE5B4C0118B81.cache.html b/common/static/js/capa/genex/F0126043DD1A3B0036CEE5B4C0118B81.cache.html new file mode 100644 index 0000000000..a5d110176c --- /dev/null +++ b/common/static/js/capa/genex/F0126043DD1A3B0036CEE5B4C0118B81.cache.html @@ -0,0 +1,650 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/genex/genex.nocache.js b/common/static/js/capa/genex/genex.nocache.js index b130ea3689..a9128971d3 100644 --- a/common/static/js/capa/genex/genex.nocache.js +++ b/common/static/js/capa/genex/genex.nocache.js @@ -1,4 +1,4 @@ -function genex(){var P='',xb='" for "gwt:onLoadErrorFn"',vb='" for "gwt:onPropertyErrorFn"',ib='"><\/script>',Z='#',Xb='.cache.html',_='/',lb='//',Qb='1B3B0A256735176413A40727372820E6',Rb='3BFB2B59BF73690E64CA963B37E3E6C2',Sb='4EC2E5D94B410DDAB081BBAC4222386F',Tb='7504BC625F3CBFF0967F88C441871055',Ub='88AB039AB796F1D6C3B133DAD892A057',Wb=':',pb='::',dc='