Skip to content
This repository has been archived by the owner on Aug 21, 2018. It is now read-only.

Commit

Permalink
[#995] Save answer for take test (#1001)
Browse files Browse the repository at this point in the history
  • Loading branch information
razu9861 authored and Rupesh87 committed Aug 29, 2017
1 parent 791aa3c commit 363b303
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion app/MyApp/app/views/takeTestView.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ $(function() {
saveanswer.set('MemberID',memberId);
saveanswer.set('StepID',this.stepId);
saveanswer.save(null, {
success:function(){
console.log("saved")
},
error: function() {
console.log("Not Saved")
}
Expand Down Expand Up @@ -317,12 +320,12 @@ $(function() {

this.myModel.save(null, {
success: function(res, revInfo) {
location.reload()
},
error: function() {
console.log("Not Saved")
}
});
location.reload();
}
},

Expand Down
6 changes: 3 additions & 3 deletions app/MyApp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1526,14 +1526,14 @@ <h3 class="bigheader">
</tr>
<tr>
<td>
<input type="text" value="<%=answer%>" name="singleLineAnswer" style="margin-bottom: -45px;">
<input type="text" value="<%=answer%>" name="singleLineAnswer">
</td>
</tr>
</table>
</div>
<% } else if (Type == "Comment/Essay Box") { %>
<style>
textarea{margin: 0px 0px -45px;width: 616px;height: 298px;}
textarea{width: 616px;height: 298px;}
</style>
<div class="commentEssay">
<table>
Expand Down Expand Up @@ -1571,7 +1571,7 @@ <h3 class="bigheader">
<input type="hidden" name="_attachment" id="attachmentId" value="">
<input type="hidden" value=<%=stepId%> id="stepId<%=_id%>">
<input type="hidden" value=<%=_id%> id="questionId<%=_id%>">
<input class='btn btn-primary' style="font-size: 15px; margin-bottom: -45px;" type="button" value="<%=languageDict.attributes.Upload%> <%=Type%>" id="fakeBrowse" onclick="HandleBrowseClick1('<%=_id%>')" />
<input class='btn btn-primary' style="font-size: 15px;" type="button" value="<%=languageDict.attributes.Upload%> <%=Type%>" id="fakeBrowse" onclick="HandleBrowseClick1('<%=_id%>')" />
<% if (answer[0] != null && answer[0] != "") { %>
<a id="downloadAttac" class="btn btn-primary" href="/assignmentpaper/<%=answer[0]%>/<%=attachmentName%>" target="_blank" ><%=App.languageDict.attributes.Download %></a>
<% } %>
Expand Down

0 comments on commit 363b303

Please sign in to comment.