Fixed datamap and statistical tests
All checks were successful
ci/woodpecker/release/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/release/woodpecker Pipeline was successful
This commit is contained in:
parent
be17df22f0
commit
af4fde1c18
|
|
@ -155,8 +155,8 @@ def run_tests(survey_id):
|
|||
@login_required
|
||||
def findings():
|
||||
form = EditForm()
|
||||
notifications = mongo.db.temp_results.find({"user": current_user._id})
|
||||
# If user chooses to save a test
|
||||
notifications = list(mongo.db.temp_results.find({"user": current_user._id}))
|
||||
|
||||
if form.validate_on_submit():
|
||||
result_id = request.args.get("result_id")
|
||||
mongo.db.tests.insert_one({
|
||||
|
|
@ -168,10 +168,14 @@ def findings():
|
|||
"dependentVariable" : request.args.get("dependent_variable"),
|
||||
"p" : request.args.get("p")})
|
||||
mongo.db.temp_results.delete_one({'_id': ObjectId(result_id)})
|
||||
notifications = mongo.db.temp_results.find({"user": current_user._id})
|
||||
notifications = list(mongo.db.temp_results.find({"user": current_user._id}))
|
||||
flash("Statistical test saved to your survey dashboard", "success")
|
||||
return redirect(url_for("surveys.findings"))
|
||||
return render_template("surveys/findings.html", title="Findings", form=form, notifications=notifications, count=notifications.count())
|
||||
return render_template("surveys/findings.html",
|
||||
title="Findings",
|
||||
form=form,
|
||||
notifications=notifications,
|
||||
count=len(notifications))
|
||||
|
||||
|
||||
# Delete a temporary result
|
||||
|
|
|
|||
|
|
@ -47,7 +47,12 @@
|
|||
<!-- handsontable -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/handsontable@7.4.2/dist/handsontable.full.min.js"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/handsontable@7.4.2/dist/handsontable.full.min.css" rel="stylesheet" media="screen">
|
||||
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/topojson/1.6.9/topojson.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/datamaps/0.5.9/datamaps.all.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/save-svg-as-png@1.4.17/lib/saveSvgAsPng.min.js"></script>
|
||||
<script src="https://unpkg.com/canvg@3.0.4/lib/umd.js"></script>
|
||||
|
||||
{{ JSGlue.include() }}
|
||||
</head>
|
||||
|
|
@ -106,5 +111,7 @@
|
|||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
|
||||
{% block content %} {% endblock %}
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in a new issue