Exemple #1
0
def Main():
	SEVERE2.setupPage("ClassAdmin for Sx Forecasting Activity")

	print """
	<H3>Edit Specific Hourly Questions:</H3>
	<blockquote>
	<B>Instructions:</B> This exercise comes pre-built with a standard set of questions that get asked at various hours.  You can add your
	own questions at any hour of your choice.  These questions are then asked when students work through the exercise and the results are
	emailed back to you.
	</blockquote>
	"""

	form = cgi.FormContent()
	if not form.has_key("caseNum"):
		print '<form method="POST" action="index.py">'
		print '<H3>Select Case to Edit Questions for:</H3>'
		SEVERE2.listGoodCases()
		print '<BR><input type="submit" value="Select Case">'
		print '</form>'
	else:
		caseNum = form["caseNum"][0]
		print '<form method="POST" action="edit.py">'
		print '<input type="hidden" value="'+caseNum+'" name="caseNum">'
		print '<H3>Select Hour to Add/Delete/Edit Specific Question For:</H3>'
		SEVERE2.listHours(caseNum)
		print '<BR><input type="submit" value="Select Specific Time">'
		print '</form>'


	print '<P>Links outta here:'
	print '<HR>'
	print '<a href="../index.py">ClassAdmin</a>'
	
	SEVERE2.finishPage()
Exemple #2
0
def Main():
	form = cgi.FormContent()
	SEVERE2.setupPage("classAdmin for Sx Wx Forecasting")
	print """
	<H3>Edit Annotations for the Exercise.</H3>
	<blockquote>
	<B>Instructions:</B> The exercise comes pre-built with comments and annotations for each hour during the duration of each case.
	These annontations can be edited with this dialog, first select the case and then select the hour.  Your changes will imediately start
	appearing once you make the submissions.
	
	</blockquote>
	"""
	if form.has_key("caseNum"):
		print """
		<HR>
		<a href="hourly.py">Select a different Case</a><BR><HR>"""

		print '<form method="post" action="editHourly.py">'
		print '<input type="hidden" value="'+form["caseNum"][0]+'" name="caseNum">'
		SEVERE2.listHours( form["caseNum"][0] )
	else:
		print '<form method="post" action="hourly.py">'
		SEVERE2.listGoodCases()

	print '<input type="submit" value="submit">'

	print '<P>Back to <a href="../index.py">ClassAdmin Homepage</a>'

	SEVERE2.finishPage()
Exemple #3
0
def Main():
	if form.has_key("type"):
		caseNum = form["caseNum"][0]
		type = form["type"][0]
		if type == "add":
			delete = mydb2.query("DELETE from basecases_custom WHERE caseNum = '"+caseNum+"' and className = '"+className+"' ")
			hello = mydb2.query("INSERT into basecases_custom(casenum, className) VALUES ('"+caseNum+"', '"+className+"')")
		else:
			hello = mydb2.query("DELETE from basecases_custom WHERE caseNum = '"+caseNum+"' and className = '"+className+"' ")


	SEVERE2.setupPage("Add/Revoke Cases to the System.")

	print """
	<blockquote>
	<B>Instructions:</B> This dialog releases and revokes which cases your students can work with.  When your students access the
	main page, they are presented with a listing of cases that you have released to them to work.  That listing is controled from 
	this dialog.  Removing or adding cases DOES NOT delete any work done on the specific questions nor the comments.
	</blockquote>
	"""

	print '<H3 align="CENTER">Pick A Case</H3>'

	print '<P>Release or remove cases to your hearts content.'

	print '<TABLE WIDTH="100%"><TR><TD>'
	print '<H3>Cases available</H3>'
	print '<FORM name="add" METHOD="POST" ACTION="release.py">'
	print '<input type="hidden" name="type" value="add">'
	print '<input type="hidden" name="className" value="'+className+'">'
	SEVERE2.listGoodCases()
	print '<input type="submit" value="Add This Case">'
	print '</form><BR>'

	print '</TD><TD>'
	
	print '<H3>Cases allready released</H3>'
	print '<FORM name="del" METHOD="POST" ACTION="release.py">'
	print '<input type="hidden" name="className" value="'+className+'">'
	print '<input type="hidden" name="type" value="del">'
	list_cases2(className)
	print '<input type="submit" value="Delete This Case">'
	print '</form><BR>'

	print '</TD></TR></TABLE>'

	print '<a href="../index.py">ClassAdmin Homepage</a>'

	SEVERE2.finishPage()