-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
361_fix_training_greeting_ui #378
Merged
Merged
Changes from 14 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
53e629c
training_greeting_ui: fixed
severus2293 537580c
definition_structure: refactoring
severus2293 ae8b6d6
Update criterion.py
severus2293 31a8fc6
Update criterion.py
severus2293 ca6c1d0
Update critetion.py
severus2293 3afee4c
Update critetion.py
severus2293 c8f19ec
Update critetion.py
severus2293 928a063
Update criterion.py
severus2293 aa1c6ec
Update criterion.py
severus2293 4d43496
Update criterion.py
severus2293 ad6e3a2
Update criterion.py
severus2293 aa989c0
Update criterion.py
severus2293 57b042d
Update criterion_pack_base.py
severus2293 347ecfb
Update training_greeting.js
severus2293 a47cb5e
Update criterion.py
severus2293 4f2a3be
Update criterion.py
severus2293 2ba9eda
Update critetion.py
severus2293 a71cc23
Update criterion.py
severus2293 d27524f
Update criterion.py
severus2293 22d41b5
Update critetion.py
severus2293 0ef7f9f
Update critetion.py
severus2293 c68c1b7
Update critetion.py
severus2293 9084b56
Update criterion.py
severus2293 e3c2796
Update criterion.py
severus2293 fbb2cc3
Update criterion.py
severus2293 067940d
Update criterion.py
severus2293 323b823
Update criterion.py
severus2293 05434d3
Update criterion.py
severus2293 93c9f57
Update trainings.py
severus2293 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,11 +126,28 @@ def view_all_trainings(): | |
or an empty dictionary if access was denied. | ||
""" | ||
username = request.args.get('username', '') | ||
full_name = request.args.get('full_name', '') | ||
|
||
page = 0 | ||
count = 10 | ||
|
||
try: | ||
page = int(request.args.get('page', '0')) | ||
except: | ||
pass | ||
|
||
try: | ||
count = int(request.args.get('count', '10')) | ||
except: | ||
pass | ||
|
||
authorized = check_auth() is not None | ||
if not (check_admin() or (authorized and session.get('session_id') == username)): | ||
return {}, 404 | ||
return render_template('show_all_trainings.html', username=username, full_name=full_name, is_admin="true" if check_admin() else 'false'), 200 | ||
|
||
raw_filters = request.args.getlist('f') | ||
filters_string = '&'.join(raw_filters) | ||
|
||
return render_template('show_all_trainings.html', username=username, filters=filters_string, is_admin="true" if check_admin() else 'false', page=str(page), count=str(count)), 200 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Откуда и для чего тут эти изменения? (не похоже на вашу задачу, но похоже на чужую) |
||
|
||
|
||
@routes_trainings.route('/training_greeting/', methods=['GET']) | ||
|
@@ -191,7 +208,7 @@ def view_training_greeting(): | |
training_number=training_number, | ||
attempt_count=attempt_count, | ||
criteria_pack_id=criteria_pack_id, | ||
criteria_pack_description=criteria_pack_description.replace('\n', '\\n').replace('\'', ''), | ||
criteria_pack_description=criteria_pack_description, | ||
training_id=training_id, | ||
presentation_id=presentation_id | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
body { | ||
margin-left: 10px; | ||
} | ||
td { | ||
text-align: center; | ||
vertical-align: middle; | ||
} | ||
th { | ||
text-align: center; | ||
vertical-align: middle; | ||
} | ||
h3 { | ||
text-align: center; | ||
} | ||
|
||
table{ | ||
margin-right: 10px; | ||
} | ||
#start-training-button{ | ||
margin-top: 10px; | ||
width: 150px; | ||
height: 30px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
function setCriteriaPackDescription(s) { | ||
document.getElementById('criteria-pack-description').innerText = `${s}`; | ||
} | ||
const criteriaTable = document.getElementById("criteria-table"); | ||
let criteriaRow = document.createElement("tr"); | ||
let HeadData = ["Критерий","Описание","Оценка","Вес критерия"]; | ||
HeadData.forEach(element =>{ | ||
let tableHead = document.createElement("th"); | ||
tableHead.innerText = element; | ||
criteriaRow.appendChild(tableHead); | ||
}); | ||
criteriaTable.appendChild(criteriaRow); | ||
for(let i = 0;i < s["Критерии"].length;i++){ | ||
criteriaRow = document.createElement("tr"); | ||
let criteriaData = document.createElement("td"); | ||
criteriaData.innerText = s["Критерии"][i]["Критерий"]; | ||
let descriptionData = document.createElement("td"); | ||
descriptionData.innerText = s["Критерии"][i]["Описание"]; | ||
let gradeData = document.createElement("td"); | ||
gradeData.innerText = s["Критерии"][i]["Оценка"]; | ||
let criterionWeightData = document.createElement("td"); | ||
criterionWeightData.innerText = s["Критерии"][i]["Вес"]; | ||
criteriaRow.appendChild(criteriaData); | ||
criteriaRow.appendChild(descriptionData); | ||
criteriaRow.appendChild(gradeData); | ||
criteriaRow.appendChild(criterionWeightData); | ||
criteriaTable.appendChild(criteriaRow); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Вес" - не относится к описанию критериев, это часть конфигурации набора критериев, зачем он тут?