From edfa4564838416182c3424678b1a775cd6929cb5 Mon Sep 17 00:00:00 2001 From: jmclaus Date: Mon, 15 Apr 2013 14:05:39 +0200 Subject: [PATCH] Grading works when sequence is loaded from saved state --- common/static/js/capa/edit-a-gene.js | 25 +- ...1B31BA00E7CE7B6BD63DD13A8586A45.cache.html | 652 +++++++++++++++++ ...6DBCB09BEC38A6DEE76494C6517111B.cache.html | 641 ----------------- ...57C7018CDCA52B163256408948A1722.cache.html | 651 ----------------- ...3308EE54E8033A708B414CAC05B0C32.cache.html | 642 +++++++++++++++++ ...AC57DC6EC8C1D8672DDF6E6D4EF57CC.cache.html | 628 +++++++++++++++++ ...66AF633CAA7EA4DA7E906456CDEC65A.cache.html | 627 ----------------- ...F9C3F1A91187AA8391FD08BA7F8716D.cache.html | 641 ----------------- ...B4F4D4EFA24CDE2E4287CC07897F249.cache.html | 654 ++++++++++++++++++ ...016796CF7FB22261AE1160531B5CF82.cache.html | 653 ----------------- ...069AC107D79C29D6237614AC340F0C0.cache.html | 652 +++++++++++++++++ ...6220FCC8B9234FEAD8D826A73C6D2A4.cache.html | 642 +++++++++++++++++ ...28D6C3D881F6C18E3357AAB004477EF.cache.html | 651 ----------------- common/static/js/capa/genex/genex.nocache.js | 4 +- 14 files changed, 3886 insertions(+), 3877 deletions(-) create mode 100644 common/static/js/capa/genex/21B31BA00E7CE7B6BD63DD13A8586A45.cache.html delete mode 100644 common/static/js/capa/genex/46DBCB09BEC38A6DEE76494C6517111B.cache.html delete mode 100644 common/static/js/capa/genex/557C7018CDCA52B163256408948A1722.cache.html create mode 100644 common/static/js/capa/genex/63308EE54E8033A708B414CAC05B0C32.cache.html create mode 100644 common/static/js/capa/genex/7AC57DC6EC8C1D8672DDF6E6D4EF57CC.cache.html delete mode 100644 common/static/js/capa/genex/866AF633CAA7EA4DA7E906456CDEC65A.cache.html delete mode 100644 common/static/js/capa/genex/8F9C3F1A91187AA8391FD08BA7F8716D.cache.html create mode 100644 common/static/js/capa/genex/9B4F4D4EFA24CDE2E4287CC07897F249.cache.html delete mode 100644 common/static/js/capa/genex/A016796CF7FB22261AE1160531B5CF82.cache.html create mode 100644 common/static/js/capa/genex/A069AC107D79C29D6237614AC340F0C0.cache.html create mode 100644 common/static/js/capa/genex/C6220FCC8B9234FEAD8D826A73C6D2A4.cache.html delete mode 100644 common/static/js/capa/genex/F28D6C3D881F6C18E3357AAB004477EF.cache.html diff --git a/common/static/js/capa/edit-a-gene.js b/common/static/js/capa/edit-a-gene.js index eb404de881..fa0b491886 100644 --- a/common/static/js/capa/edit-a-gene.js +++ b/common/static/js/capa/edit-a-gene.js @@ -15,7 +15,7 @@ // NOTE: // Genex uses 8 global functions, all prefixed with genex: // 6 are exported from GWT: - // genexSetInitialDNASequence + // genexSetDefaultDNASequence // genexSetDNASequence // genexGetDNASequence // genexSetClickEvent @@ -36,32 +36,35 @@ genexIsReady = function() { var input_field = genexGetInputField(); var genex_saved_state = input_field.val(); - var genex_initial_dna_sequence; + var genex_default_dna_sequence; var genex_dna_sequence; - //Get the sequence from xml file - genex_initial_dna_sequence = $('#genex_dna_sequence').val(); - //Call this function to set the value used by reset button - genexSetInitialDNASequence(genex_initial_dna_sequence); + //Get the DNA sequence from xml file + genex_default_dna_sequence = $('#genex_dna_sequence').val(); + //Set the default DNA + genexSetDefaultDNASequence(genex_default_dna_sequence); + //Now load problem + var genex_problem_number = $('#genex_problem_number').val(); + genexSetProblemNumber(genex_problem_number); + + //Set the DNA sequence that is displayed if (genex_saved_state === '') { //Load DNA sequence from xml file - genex_dna_sequence = genex_initial_dna_sequence; + genex_dna_sequence = genex_default_dna_sequence; } else { //Load DNA sequence from saved value genex_saved_state = JSON.parse(genex_saved_state); genex_dna_sequence = genex_saved_state.genex_dna_sequence; } - genexSetDNASequence(genex_dna_sequence); + //Now load mouse and keyboard handlers genexSetClickEvent(); genexSetKeyEvent(); - //Now load problem - var genex_problem_number = $('#genex_problem_number').val(); - genexSetProblemNumber(genex_problem_number); }; + genexStoreAnswer = function(answer) { var input_field = genexGetInputField(); var value = {'genex_dna_sequence': genexGetDNASequence(), 'genex_answer': answer}; diff --git a/common/static/js/capa/genex/21B31BA00E7CE7B6BD63DD13A8586A45.cache.html b/common/static/js/capa/genex/21B31BA00E7CE7B6BD63DD13A8586A45.cache.html new file mode 100644 index 0000000000..ec8170eb47 --- /dev/null +++ b/common/static/js/capa/genex/21B31BA00E7CE7B6BD63DD13A8586A45.cache.html @@ -0,0 +1,652 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/genex/46DBCB09BEC38A6DEE76494C6517111B.cache.html b/common/static/js/capa/genex/46DBCB09BEC38A6DEE76494C6517111B.cache.html deleted file mode 100644 index 054ef6c31a..0000000000 --- a/common/static/js/capa/genex/46DBCB09BEC38A6DEE76494C6517111B.cache.html +++ /dev/null @@ -1,641 +0,0 @@ - - - - \ No newline at end of file diff --git a/common/static/js/capa/genex/557C7018CDCA52B163256408948A1722.cache.html b/common/static/js/capa/genex/557C7018CDCA52B163256408948A1722.cache.html deleted file mode 100644 index 3862093b1b..0000000000 --- a/common/static/js/capa/genex/557C7018CDCA52B163256408948A1722.cache.html +++ /dev/null @@ -1,651 +0,0 @@ - - - - \ No newline at end of file diff --git a/common/static/js/capa/genex/63308EE54E8033A708B414CAC05B0C32.cache.html b/common/static/js/capa/genex/63308EE54E8033A708B414CAC05B0C32.cache.html new file mode 100644 index 0000000000..952e3b5f37 --- /dev/null +++ b/common/static/js/capa/genex/63308EE54E8033A708B414CAC05B0C32.cache.html @@ -0,0 +1,642 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/genex/7AC57DC6EC8C1D8672DDF6E6D4EF57CC.cache.html b/common/static/js/capa/genex/7AC57DC6EC8C1D8672DDF6E6D4EF57CC.cache.html new file mode 100644 index 0000000000..95cb962805 --- /dev/null +++ b/common/static/js/capa/genex/7AC57DC6EC8C1D8672DDF6E6D4EF57CC.cache.html @@ -0,0 +1,628 @@ + + + \ No newline at end of file diff --git a/common/static/js/capa/genex/866AF633CAA7EA4DA7E906456CDEC65A.cache.html b/common/static/js/capa/genex/866AF633CAA7EA4DA7E906456CDEC65A.cache.html deleted file mode 100644 index 472502dde2..0000000000 --- a/common/static/js/capa/genex/866AF633CAA7EA4DA7E906456CDEC65A.cache.html +++ /dev/null @@ -1,627 +0,0 @@ - - - \ No newline at end of file diff --git a/common/static/js/capa/genex/8F9C3F1A91187AA8391FD08BA7F8716D.cache.html b/common/static/js/capa/genex/8F9C3F1A91187AA8391FD08BA7F8716D.cache.html deleted file mode 100644 index f488b6fcf6..0000000000 --- a/common/static/js/capa/genex/8F9C3F1A91187AA8391FD08BA7F8716D.cache.html +++ /dev/null @@ -1,641 +0,0 @@ - - - - \ No newline at end of file diff --git a/common/static/js/capa/genex/9B4F4D4EFA24CDE2E4287CC07897F249.cache.html b/common/static/js/capa/genex/9B4F4D4EFA24CDE2E4287CC07897F249.cache.html new file mode 100644 index 0000000000..5c828c1209 --- /dev/null +++ b/common/static/js/capa/genex/9B4F4D4EFA24CDE2E4287CC07897F249.cache.html @@ -0,0 +1,654 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/genex/A016796CF7FB22261AE1160531B5CF82.cache.html b/common/static/js/capa/genex/A016796CF7FB22261AE1160531B5CF82.cache.html deleted file mode 100644 index f799ecf5b7..0000000000 --- a/common/static/js/capa/genex/A016796CF7FB22261AE1160531B5CF82.cache.html +++ /dev/null @@ -1,653 +0,0 @@ - - - - \ No newline at end of file diff --git a/common/static/js/capa/genex/A069AC107D79C29D6237614AC340F0C0.cache.html b/common/static/js/capa/genex/A069AC107D79C29D6237614AC340F0C0.cache.html new file mode 100644 index 0000000000..bcf15330d9 --- /dev/null +++ b/common/static/js/capa/genex/A069AC107D79C29D6237614AC340F0C0.cache.html @@ -0,0 +1,652 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/genex/C6220FCC8B9234FEAD8D826A73C6D2A4.cache.html b/common/static/js/capa/genex/C6220FCC8B9234FEAD8D826A73C6D2A4.cache.html new file mode 100644 index 0000000000..5ab12af718 --- /dev/null +++ b/common/static/js/capa/genex/C6220FCC8B9234FEAD8D826A73C6D2A4.cache.html @@ -0,0 +1,642 @@ + + + + \ No newline at end of file diff --git a/common/static/js/capa/genex/F28D6C3D881F6C18E3357AAB004477EF.cache.html b/common/static/js/capa/genex/F28D6C3D881F6C18E3357AAB004477EF.cache.html deleted file mode 100644 index 0c242fde9c..0000000000 --- a/common/static/js/capa/genex/F28D6C3D881F6C18E3357AAB004477EF.cache.html +++ /dev/null @@ -1,651 +0,0 @@ - - - - \ 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 f457e80b6c..11f9714afb 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='46DBCB09BEC38A6DEE76494C6517111B',Rb='557C7018CDCA52B163256408948A1722',Sb='866AF633CAA7EA4DA7E906456CDEC65A',Tb='8F9C3F1A91187AA8391FD08BA7F8716D',Wb=':',pb='::',dc='