fix: progress access by students

This commit is contained in:
Jannat Patel
2023-08-09 10:13:02 +05:30
5 changed files with 7 additions and 2615 deletions

View File

@@ -328,10 +328,10 @@
</div>
</div>
{% for student in class_students %}
{% set allow_progress = is_moderator or student.student == frappe.session.user or is_evaluator %}
{% set allow_progress = is_moderator or is_evaluator %}
<div class="grid-row">
<div class="data-row row">
<a class="col grid-static-col {% if allow_progress %} clickable {% endif %}" {% if allow_progress %} href="/classes/{{ class_info.name }}/students/{{ student.username }}" {% endif %}>
<a class="col grid-static-col button-links {% if allow_progress %} clickable {% endif %}" {% if allow_progress %} href="/classes/{{ class_info.name }}/students/{{ student.username }}" {% endif %}>
{{ student.student_name }}
</a>
<div class="col grid-static-col col-xs-2 text-right">

View File

@@ -648,7 +648,6 @@ const submit_evaluation_form = (values) => {
frappe.throw(__("Please select a slot"));
}
this.eval_form.hide();
frappe.call({
method: "lms.lms.doctype.lms_certificate_request.lms_certificate_request.create_certificate_request",
args: {
@@ -660,6 +659,7 @@ const submit_evaluation_form = (values) => {
class_name: $(".class-details").data("class"),
},
callback: (r) => {
this.eval_form.hide();
frappe.show_alert({
message: __("Evaluation scheduled successfully"),
indicator: "green",