Revision: 4395 Author: hans URL: http://bknr.net/trac/changeset/4395
some fixes in participant adding U trunk/projects/lisp-ecoop/src/participant.lisp U trunk/projects/lisp-ecoop/src/tags.lisp _U trunk/projects/lisp-ecoop/website/
Modified: trunk/projects/lisp-ecoop/src/participant.lisp =================================================================== --- trunk/projects/lisp-ecoop/src/participant.lisp 2009-05-13 07:52:47 UTC (rev 4394) +++ trunk/projects/lisp-ecoop/src/participant.lisp 2009-05-13 08:24:11 UTC (rev 4395) @@ -86,7 +86,7 @@ :index-keys all-interest-keywords :attribute t) (text :update :documentation "Self descriptionary text" :element t)) - (:default-initargs :picture nil :submission nil :interests nil :text "")) + (:default-initargs :picture nil :submissions nil :interests nil :text ""))
(defun curry (fun &rest args) #'(lambda (&rest more) @@ -160,14 +160,14 @@ (user-login participant) password)))
-(defun make-participant (login &key full-name email text submission) +(defun make-participant (login &key full-name email text submissions) (let* ((initial-password (generate-random-password)) (participant (make-user login :full-name full-name :email email :password initial-password :class 'participant))) (with-transaction (:initialize-participant) (when text (setf (participant-text participant) text)) - (when submission + (dolist (submission submissions) (submission-add-submitter submission participant))) (send-welcome-mail participant initial-password) participant))
Modified: trunk/projects/lisp-ecoop/src/tags.lisp =================================================================== --- trunk/projects/lisp-ecoop/src/tags.lisp 2009-05-13 07:52:47 UTC (rev 4394) +++ trunk/projects/lisp-ecoop/src/tags.lisp 2009-05-13 08:24:11 UTC (rev 4395) @@ -156,7 +156,7 @@ (error "user ~A already exists" login)) (when submission (setf submission (find-store-object (parse-integer submission)))) - (make-participant login :full-name full-name :email email :text text :submission submission) + (make-participant login :full-name full-name :email email :text text :submissions (list submission)) (html (:princ-safe #?"The participant $(login) has been created in the database and a welcome mail has been sent."))))) (emit-tag-children))
Property changes on: trunk/projects/lisp-ecoop/website ___________________________________________________________________ Name: svn:ignore + html