← Back to team overview

schooltool-developers team mailing list archive

Re: Custom Score Systems

 

Just a quick comment:

Users enter the title of the score system, so they can influence its __name__. Your vocabulary should encode tokens like the old implementation did (using punycode), so your tokens won't break when the user creates a score system with a non-ASCII title.

You can reproduce it:

1. Empty instance
2. Add new scoresystem with title 'Notas de niños'
3. Add new report sheet template
4. Add new report activity and see the encode error

Douglas

"... allí­ es cuando te das cuenta que las cosas malas pueden resultar bastante buenas..." - Lionel Messi

Por favor, evite enviarme adjuntos de Word, Excel o PowerPoint.
Vea http://www.gnu.org/philosophy/no-word-attachments.es.html


--- On Tue, 4/26/11, Alan Elkner <aelkner@xxxxxxxxx> wrote:

> From: Alan Elkner <aelkner@xxxxxxxxx>
> Subject: [Schooltool-developers] Custom Score Systems
> To: "SchoolTool Developers" <schooltool-developers@xxxxxxxxxxxxxxxxxxx>
> Date: Tuesday, April 26, 2011, 2:36 AM
> Hey Justas,
> 
> Could you please review my latest schooltool.gradebook
> branch,
> lp:~aelkner/schooltool.gradebook/custom_scoresystems? 
> Sorry for the
> size of the last commit, but I had so many related changes
> that I had
> to make in order for tests to pass.  I broke them down
> briefly in the
> multi-line commit message, but I'll expound on some of the
> points
> here.
> 
> First, I was able to get rid of the ScoreSystemsProxy all
> together.
> This meant having to change the two existing evolve scripts
> to
> register utilities manually.  Also, some of the
> changes to the tests
> resulted from the names, which used to be the utility name
> (same as
> title), but now are the __name__ of the scoresystem in its
> container.
> 
> A big part of the diff is a consequence of the decision I
> made to move
> the scoresystems views to the gradebook package.  I
> did this because
> they use the gradebook root now, and I didn't want to have
> the
> requirement package depend on the gradebook package. 
> As it turns out,
> cando only uses the requirement package, not even including
> the zcml
> for the gradebook, so I didn't want to have any includes of
> gradebook
> code that would turn out not to be registered in
> cando.  Also, since
> it was only the views and widgets that I was moving, it was
> a simple
> enough change requiring no evolution in its own right.
> 
> Lastly, I continue to follow your request to break out zcml
> files as I
> change them, so I created scoresystems.zcml for all the
> scoresystem
> views and widgets.  I decided to keep the vocabularies
> there because
> break them out into vocabularies.py and vocabularies.zcml
> seemed like
> overkill for such a small set of code/registration. 
> Also, they all
> have to do with scoresystems, anyway.
> 
> Please do what you can to look my branch over and give me
> feedback as
> soon as possible.
> 
> Thanks,
> Alan
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~schooltool-developers
> Post to     : schooltool-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~schooltool-developers
> More help   : https://help.launchpad.net/ListHelp
>


Follow ups

References