Update of
/cvsroot/eduplone/EduploneLearningSequence/skins/EduploneLearningSequence
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29486/skins/EduploneLearningSequence
Modified Files:
lsq_start_form.pt
Added Files:
lsq_start_script.py lsq_start_teamselect.pt
Log Message:
Lots of fixes, but still unstable.
--- NEW FILE: lsq_start_teamselect.pt ---
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
lang="en-US"
metal:use-macro="here/main_template/macros/master"
i18n:domain="plone">
<body>
<metal:main fill-slot="main">
<h1>
Select team
</h1>
<div id="description">
Please choose the team that contains your participants
</div>
<form action="lsq_start_script" method="post">
<div>Team:</div>
<select name="team">
<tal:block repeat="team options/teams">
<option tal:attributes="value python:team[0]"
tal:content="python:team[1]">Name of team</option>
</tal:block>
</select>
<input type="submit" value="start" name="submit" />
</form>
<div>
You can alternatively select the participants from the
<a href="./lsq_start_script?team=__NO_TEAM__">full list</a>.
</div>
</metal:main>
</body>
</html>
Index: lsq_start_form.pt
===================================================================
RCS file:
/cvsroot/eduplone/EduploneLearningSequence/skins/EduploneLearningSequence/lsq_start_form.pt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** lsq_start_form.pt 27 Jun 2004 16:09:24 -0000 1.2
--- lsq_start_form.pt 4 Jul 2004 13:39:50 -0000 1.3
***************
*** 8,26 ****
<h1>
! Students selection
</h1>
<div id="description">
! Please choose the students who will attend to the course:
</div>
! <form action="lsq_start" method="post">
! <select multiple name="students">
! <div tal:repeat="learner python:context.getStudents()">
! <option tal:content="learner" ></option>
! </div>
! </select>
! <input type="submit" value="start" name="submit" />
</form>
--- 8,36 ----
<h1>
! Course participants
</h1>
<div id="description">
! Please choose the tutor and students for this course:
</div>
! <form action="lsq_start_script" method="post">
! <div>Tutor:</div>
! <select name="tutor">
! <tal:block repeat="tutor options/tutors">
! <option tal:content="tutor">Name of tutor</option>
! </tal:block>
! </select>
!
! <div>Students:</div>
! <select name="students:list"
! multiple="multiple">
! <tal:block repeat="student options/students">
! <option tal:content="student">Name of student</option>
! </tal:block>
! </select>
!
! <input type="submit" value="start" name="submit" />
</form>
--- NEW FILE: lsq_start_script.py ---
## Script (Python) "lsq_start_script"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=team=None, tutor=None, students=None
##title=Script that is invoked on lsq_start
redirect=context.REQUEST.RESPONSE.redirect
abs_url=context.absolute_url()
if tutor is not None and students is not None: # tutor and students given
if not students:
redirect(abs_url +
"?portal_status_message=Please+provide+at+least+one+student.")
context.lsq_start(tutor, students)
redirect(abs_url + "?portal_status_message=Learning+Sequence+started.")
elif team: # team selected
if team == '__NO_TEAM__':
tutors, students = context.getAllTutorsAndStudents()
else:
tutors, students = context.getTutorsAndStudentsByTeam(team)
return context.lsq_start_form(tutors=tutors, students=students)
else: # nothing done yet
teams = context.getQualifiedTeams()
if teams:
return context.lsq_start_teamselect(teams=teams)
else:
tutors, students = context.getAllTutorsAndStudents()
return context.lsq_start_form(tutors=tutors, students=students)
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
|