diff options
author | Prabhu Ramachandran | 2017-11-14 19:03:36 +0530 |
---|---|---|
committer | GitHub | 2017-11-14 19:03:36 +0530 |
commit | 1996f5d6409a5f936700a906f7da1afacb664ce6 (patch) | |
tree | 4a747aac76728a342dc9440b06eff3fb20c87a8f /yaksh/templates | |
parent | a7afd20e83bff405baf643647afb16a4569481aa (diff) | |
parent | 29e358a6fcd438fa7ddf3d3bccb2af1839158ba6 (diff) | |
download | online_test-1996f5d6409a5f936700a906f7da1afacb664ce6.tar.gz online_test-1996f5d6409a5f936700a906f7da1afacb664ce6.tar.bz2 online_test-1996f5d6409a5f936700a906f7da1afacb664ce6.zip |
Merge pull request #378 from prathamesh920/upload_users_csv
Upload users csv
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/course_detail.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html index d8aeb2e..93a7048 100644 --- a/yaksh/templates/yaksh/course_detail.html +++ b/yaksh/templates/yaksh/course_detail.html @@ -45,6 +45,27 @@ </div> </div> <div class="col-md-9 col-md-offset-2 main"> + <form id="upload_users" action="{{ URL_ROOT }}/exam/manage/upload_users/{{course.id}}/" + method="POST" enctype="multipart/form-data"> + {% csrf_token %} + <input type="file" name="csv_file" /> + <button class="btn btn-primary" type=submit> Upload Users <span class="glyphicon glyphicon-open"/></button> + </form> + <div class="alert alert-info" role="alert"> + <p> + - The uploaded csv should have headers exactly same as mentioned below:<br /> + <b>firstname, lastname, email, username, password, institute, roll_no, department, + remove</b><br /> + - Mandatory fields are <b> firstname, lastname and email. </b><br /> + - Other fields are optional. <br /> + - If username and password are not provided then + <b>Users created will have username and password same as their email</b> + </p> + <p> + <b> Click <a class="btn btn-success" href="{{ URL_ROOT }}/exam/manage/download_sample_csv/ +">here</a> to download a sample CSV, edit and upload it</b> + </p> + </div> <div class="row"> {% if message %} <div class="alert alert-warning" role="alert"> @@ -53,6 +74,14 @@ </center> </div> {% endif %} + {% if upload_details %} + <div class="alert alert-info" role="info"> + {% for detail in upload_details %} + <strong> {{ detail }} </strong><br> + {% endfor %} + </div> + {% endif %} + <hr> {% if state == 'mail' %} <div id="enrolled-students"> <center><b><u>Send Mails to Students</u></b></center><br> @@ -218,6 +247,7 @@ {% endif %} </div> </div> + <!-- Dialog to display error message --> <div id="dialog" title="Alert"> <p id="error_msg"></p> |