Permalink
Browse files

attempt fix scheduler, placebo register button added

  • Loading branch information...
1 parent e7b80cf commit 8e56676c179e5cd78d554c71159a374104e43292 @ngokevin ngokevin committed Jun 14, 2011
Binary file not shown.
@@ -107,6 +107,7 @@ <h3>
{% endifequal %}
Combination {{forloop.counter}}
</h4>
+
<table>
<tr>
<th>Class</th>
@@ -130,10 +131,13 @@ <h3>
<td>TBA</td>
{% endifnotequal %}
<td>{{course.crn}}</td>
- </tr>
+ </tr>
{% endfor %}
-
</table>
+ <form action='.' method='POST'>
+ <input type="hidden" name="courses" value="{{combination}}" />
+ <input type="submit" name="register" value="Register" />
+ </form>
<br/>
</div>
{% endfor %}
View
@@ -10,6 +10,16 @@ def index(request):
if request.method == 'GET':
return render_to_response('scheduler/index.html')
+
+ # if user chose to register a list of courses
+ try:
+ if request.session['courses']:
+ register(courses)
+ del(request.session['courses'])
+ return render_to_response('scheduler/index.html')
+ except:
+ pass
+
regclass = request.session['regclass']
#try:
classes = request.POST['classes'].split(', ')
@@ -23,3 +33,7 @@ def index(request):
return render_to_response('scheduler/index.html', {'combinations':combinations, 'json':combinations_json, 'range':range(24), 'classes_possible':classes_possible})
+def register(courses):
+ print courses
+
+

0 comments on commit 8e56676

Please sign in to comment.