-
Notifications
You must be signed in to change notification settings - Fork 983
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added feature for adding courses for acadadmin without providing the …
…batch
- Loading branch information
1 parent
16fd1a3
commit a8b2cb6
Showing
5 changed files
with
411 additions
and
0 deletions.
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
125 changes: 125 additions & 0 deletions
125
FusionIIIT/templates/academic_procedures/allot_courses_after_add_and_drop.html
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,125 @@ | ||
{% load static %} | ||
{% block allot_courses_after_add_and_drop %} | ||
|
||
{% if messages %} | ||
<ul class="messages"> | ||
{% for message in messages %} | ||
<h2> | ||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li> | ||
</h2> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
|
||
<div class="ui pointing secondary menu"> | ||
<a class="active item" data-tab="allotment"> | ||
Allot Student Courses After Add and Drop | ||
</a> | ||
</div> | ||
|
||
|
||
|
||
<div class="ui active tab segment" data-tab="allotment"> | ||
|
||
<form class="ui form" method="POST" action='/academic-procedures/acad_person/allot_courses_after_add_and_drop/' | ||
enctype="multipart/form-data" id='allot_courses_form_after_add_and_drop'> | ||
{% csrf_token %} | ||
<div class="field"> | ||
<h4 class="ui blue header">Note : Provide the data in Excel Sheet in following format:</h4> | ||
RollNo | CourseSlot Name | CourseCode | ||
<h4 class="ui dividing header"><a href="../media/Administrator/academic_procedures/sample_courses_allotment.xls">Download</a> | ||
the sample Excel, fill the data accordingly and then upload the same</h4> | ||
</div> | ||
|
||
<div class="field"> | ||
<label>Semester</label> | ||
<select class="ui dropdown" required="true" name="semester"> | ||
<option value="NULL" class="sem">Select Semester</option> | ||
<option value="1" class="sem">1</option> | ||
<option value="2" class="sem">2</option> | ||
<option value="3" class="sem">3</option> | ||
<option value="4" class="sem">4</option> | ||
<option value="5" class="sem">5</option> | ||
<option value="6" class="sem">6</option> | ||
<option value="7" class="sem">7</option> | ||
<option value="8" class="sem">8</option> | ||
</select> | ||
</div> | ||
<div class="field"> | ||
<label>Working Year</label> | ||
<input type="number" id="working_year" name="working_year" required="true"> | ||
|
||
</div> | ||
|
||
<div class="field"> | ||
<input type="file" name="allotedCourses" required | ||
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" id="alloted_courses"> | ||
</div> | ||
|
||
<div class="field"> | ||
<button class="ui primary button" type="submit"><i class="upload icon"></i> Upload</button> | ||
</div> | ||
</form> | ||
|
||
</div> | ||
{% endblock %} | ||
|
||
{% block javascript %} | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" type="text/javascript"> | ||
|
||
$(function() { | ||
$("#allot_courses_form_after_add_and_drop").submit(function(event) { | ||
|
||
event.preventDefault(); | ||
var friendForm = $(this); | ||
|
||
var posting = $.post( friendForm.attr('action'), friendForm.serialize() ); | ||
// if success: | ||
posting.done(function(data) { | ||
alert('Posted'); | ||
window.location = "/academic-procedures/main/"; | ||
}); | ||
// if failure | ||
posting.fail(function(data) { | ||
alert('Queries does not match'); | ||
// window.location = "/academic-procedures/main/"; | ||
}); | ||
}); | ||
}); | ||
|
||
// $(document).ready(function () { | ||
// $(document).on('submit','#allot_courses_form',function (event) { | ||
// event.preventDefault(); | ||
// $.ajax({ | ||
// url: '/academic_procedures/acad_person/allot_courses/', | ||
// type: 'POST', | ||
// data: { | ||
// allotedCourses: $('#alloted_courses').val(), | ||
// batch: $('#batch').val(), | ||
// semester: $('.sem').val(), | ||
// csrfmiddlewaretoken: $('input[name=csrfmiddlewaretoken]').val() | ||
// }, | ||
// success: function (response) { | ||
// console.log(response) | ||
// console.log(data) | ||
// if(response.result==='Success'){ | ||
// $( '#allot_courses_form' ).each(function(){ | ||
// this.reset(); | ||
// }); | ||
// } | ||
// else{ | ||
// alert(response.message); | ||
// } | ||
// } | ||
// }); | ||
// }); | ||
// }); | ||
|
||
|
||
</script> | ||
{% endblock %} | ||
|
||
|
||
{% comment %} | ||
Display course slot codes, and their course as per batch and semester | ||
{% endcomment %} |
Oops, something went wrong.