/usr/lib/python2.7/dist-packages/schooltool/gradebook/browser/ftests/journal_average.txt is in python-schooltool.gradebook 2.6.3-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | Journal Average External Activity
---------------------------------
The user can add a column to the gradebook for displaying the student's
section journal average. To do this they have to add the journal average
external activity.
Import helper to print the gradebook:
>>> from schooltool.gradebook.browser.ftests import printGradebook
Log in as manager:
>>> manager = Browser('manager', 'schooltool')
Now, set up a school year (2005-2006) with two terms (Fall and
Spring):
>>> from schooltool.app.browser.ftests import setup
>>> setup.setUpBasicSchool()
Set up one course:
>>> setup.addCourse('Physics I', '2005-2006')
Set up persons:
>>> from schooltool.basicperson.browser.ftests.setup import addPerson
>>> addPerson('Claudia', 'Richter', 'claudia', 'pwd', browser=manager)
>>> addPerson('Stephan', 'Richter', 'stephan', 'pwd', browser=manager)
Set up a section with instructor and students for the Fall:
>>> setup.addSection('Physics I', '2005-2006', 'Fall',
... instructors=['Stephan'],
... members=['Claudia'])
Set up a timetable:
>>> manager.getLink('2005-2006').click()
>>> manager.getLink('School Timetables').click()
>>> manager.getLink('New Timetable').click()
>>> manager.getControl('Next').click()
>>> manager.getControl('Days of the week').click()
>>> manager.getControl('Same time each day').click()
>>> manager.getControl(name='field.times').value = \
... '8:00-9:00 \n 9:00-10:00 \n 10:00-11:00'
>>> manager.getControl('Next').click()
>>> manager.getControl('Have names').click()
>>> manager.getControl(name='field.periods').value = \
... 'First period \n Second period \n Third period'
>>> manager.getControl('Next').click()
>>> manager.getControl('Same').click()
>>> manager.getControl('Next').click()
>>> manager.getControl('No').click()
Define a schedule for our section:
>>> manager.getLink('2005-2006').click()
>>> manager.getLink('Fall').click()
>>> manager.getLink('Sections').click()
>>> manager.getLink('Physics I (1)').click()
>>> manager.getLink('Schedule').click()
>>> manager.getLink('Add Timetable').click()
>>> manager.getControl('Add').click()
>>> manager.getControl('First period', index=0).click()
>>> manager.getControl('First period', index=1).click()
>>> manager.getControl('First period', index=2).click()
>>> manager.getControl('First period', index=3).click()
>>> manager.getControl('First period', index=4).click()
>>> manager.getControl('Save').click()
Log in as teacher:
>>> stephan = Browser('stephan', 'pwd')
Click the 'New External Activity' button to add the external activitiy for the
journal average:
>>> stephan.getLink('Gradebook').click()
>>> stephan.getLink('New External Activity').click()
>>> stephan.getControl('External Activity').displayValue = ['Journal - Journal Average']
>>> stephan.getControl('Label').value = u"Att."
>>> stephan.getControl('Points').value = '10'
>>> stephan.getControl('Add').click()
Printing the gradebook, we see that the column is there but no data is in the
cell, and it cannot be edited:
>>> printGradebook(stephan.contents)
+----------+
| *Sheet1* |
+----------+
+-----------------+-------+------+------+
| Name | Total | Ave. | Att. |
+-----------------+-------+------+------+
| Claudia Richter | 0.0 | N/A | |
+-----------------+-------+------+------+
Let's add some grades for the student.
>>> stephan.getLink('Journal').click()
>>> stephan.getLink('Physics I (1)').click()
>>> stephan.getLink('Claudia').click()
>>> input_names = stephan.queryHTML('//input[@type="text"]/@name')
>>> stephan.getControl(name=input_names[0]).value = '9'
>>> stephan.getControl(name=input_names[1]).value = '8'
>>> stephan.getControl(name=input_names[2]).value = '8'
>>> stephan.getControl('Update').click()
Let's go back to the edit form of the external activity to update the
grades using the 'Update Grades' button:
>>> stephan.getLink('Gradebook').click()
>>> stephan.getLink('Manage Worksheet').click()
>>> stephan.getLink('Journal Average').click()
>>> stephan.getLink('Update Grades').click()
Now we see that the journal average will show up in the gradebook.
>>> printGradebook(stephan.contents)
+----------+
| *Sheet1* |
+----------+
+-----------------+-------+-------+------+
| Name | Total | Ave. | Att. |
+-----------------+-------+-------+------+
| Claudia Richter | 8.3 | 83.3% | 8.33 |
+-----------------+-------+-------+------+
|