Merge lp:~aelkner/schooltool.gradebook/flourish into lp:schooltool.gradebook/flourish

Proposed by Alan Elkner
Status: Merged
Merged at revision: 419
Proposed branch: lp:~aelkner/schooltool.gradebook/flourish
Merge into: lp:schooltool.gradebook/flourish
Diff against target: 94 lines (+27/-20)
4 files modified
src/schooltool/gradebook/browser/flourish.zcml (+0/-1)
src/schooltool/gradebook/browser/gradebook.py (+17/-2)
src/schooltool/gradebook/browser/resources/f_gradebook.css (+0/-6)
src/schooltool/gradebook/browser/templates/f_gradebook_overview.pt (+10/-11)
To merge this branch: bzr merge lp:~aelkner/schooltool.gradebook/flourish
Reviewer Review Type Date Requested Status
Gediminas Paulauskas (community) Approve
Review via email: mp+88632@code.launchpad.net

Description of the change

Gediminas,

Please look over the latest commit that I made to my branch which I didn't merge yet so that you could review it first. It passes all tests, so I will merge it to trunk after the meeting regardless of whether you have reviewed it, but I wanted to give you the chance to react to the code leading up to the meeting.

Note that I created three bugs in launchpad to explain what I did in the latest commit which actually was the result of work that I did last year in my personal branch that got lost from the trunk merge cycle due to my failed tests and your resultant commit rejection. I think I did a much better job of explaining with the three launchpad bugs and of making sure all tests pass.

Regarding new tests for the new course worksheets feature, I am ready to do that following the meeting, but I don't see the lack of tests as any basis for rejecting the code that I just committed, considering the fact that 99% of all the flourish code we wrote is as yet untested. I may be able to start reversing that trend by writing some gradebook tests this week.

Thanks,
Alan

To post a comment you must log in.
417. By Gediminas Paulauskas

Fix problems when all sheets are hidden (LP: #913055)

418. By Gediminas Paulauskas

Fixed edit category view to accept non-ascii text (LP: #913581)

419. By Alan Elkner

Deploy course worksheets feature (LP: #916678)

Revision history for this message
Gediminas Paulauskas (menesis) wrote :

Thank you. This is a lot of code, but I guess some copied from elsewhere.

I have tested it a little, and it all seems to work without problems.

I have merged this to flourish already.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/schooltool/gradebook/browser/flourish.zcml'
2--- src/schooltool/gradebook/browser/flourish.zcml 2011-12-20 23:49:21 +0000
3+++ src/schooltool/gradebook/browser/flourish.zcml 2012-01-16 16:26:27 +0000
4@@ -80,7 +80,6 @@
5 <flourish:page
6 name="index.html"
7 for="..interfaces.IGradebook"
8- title="Enter Grades"
9 content_template="templates/f_gradebook_overview.pt"
10 class=".gradebook.FlourishGradebookOverview"
11 permission="schooltool.view"
12
13=== modified file 'src/schooltool/gradebook/browser/gradebook.py'
14--- src/schooltool/gradebook/browser/gradebook.py 2012-01-16 01:25:04 +0000
15+++ src/schooltool/gradebook/browser/gradebook.py 2012-01-16 16:26:27 +0000
16@@ -788,8 +788,23 @@
17 flourish.page.WideContainerPage):
18 """flourish Gradebook Overview/Table"""
19
20- has_header = False
21- page_class = 'page grid'
22+ @property
23+ def page_class(self):
24+ if self.all_hidden:
25+ return 'page'
26+ else:
27+ return 'page grid'
28+
29+ @property
30+ def title(self):
31+ if self.all_hidden:
32+ return _('No Visible Worksheets')
33+ else:
34+ return _('Enter Grades')
35+
36+ @property
37+ def has_header(self):
38+ return self.all_hidden
39
40 @property
41 def journal_present(self):
42
43=== modified file 'src/schooltool/gradebook/browser/resources/f_gradebook.css'
44--- src/schooltool/gradebook/browser/resources/f_gradebook.css 2012-01-16 01:25:04 +0000
45+++ src/schooltool/gradebook/browser/resources/f_gradebook.css 2012-01-16 16:26:27 +0000
46@@ -34,12 +34,6 @@
47 width: 104px;
48 }
49
50-.empty_message {
51- padding: 10px;
52- font-size: 14pt;
53- line-height: 20px;
54-}
55-
56 li.deployed a {
57 font-style: italic;
58 }
59
60=== modified file 'src/schooltool/gradebook/browser/templates/f_gradebook_overview.pt'
61--- src/schooltool/gradebook/browser/templates/f_gradebook_overview.pt 2012-01-14 22:51:48 +0000
62+++ src/schooltool/gradebook/browser/templates/f_gradebook_overview.pt 2012-01-16 16:26:27 +0000
63@@ -1,3 +1,13 @@
64+<tal:block condition="view/all_hidden">
65+ <p i18n:translate="">
66+ This section contains only worksheets that are hidden.
67+ You can unhide a worksheet using the following link:
68+ <a class="empty_message" href="../.." i18n:translate="">Worksheets</a>
69+ </p>
70+ <p i18n:translate="">You can also add a new worksheet using this link:
71+ <a class="empty_message" href="../../addWorksheet.html" i18n:translate="">Add a New Worksheet</a>
72+ </p>
73+</tal:block>
74 <div i18n:domain="schooltool.gradebook"
75 tal:define="table view/table;
76 activities view/activities">
77@@ -24,17 +34,6 @@
78 window.onunload = checkChanges;
79 warningText = '<tal:block replace="view/warningText" />';
80 <metal:block tal:replace="structure string:&lt;/script&gt;" />
81- <div tal:condition="view/all_hidden">
82- <p class="empty_message" i18n:translate="">
83- This section contains only worksheets that are hidden.
84- You can unhide a worksheet using the following link:
85- </p>
86- <a class="empty_message" href="../.." i18n:translate="">Worksheets</a>
87- <p>&nbsp;</p>
88- <p class="empty_message" i18n:translate="">You can also add a new worksheet using this link:</p>
89- <a class="empty_message" href="../../addWorksheet.html" i18n:translate="">Add a New Worksheet</a>
90- <p>&nbsp;</p>
91- </div>
92 <form method="post" class="grid-form"
93 tal:condition="not: view/all_hidden"
94 tal:attributes="action string:${context/@@absolute_url}">

Subscribers

People subscribed via source and target branches

to all changes: