/usr/lib/python2.7/dist-packages/schooltool/gradebook/browser/stests/mygrades.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 | Student gradebook tests
=======================
Log in as manager:
>>> manager = browsers.manager
>>> manager.ui.login('manager', 'schooltool')
Set up a section:
>>> manager.ui.person.add('Jeffrey', 'Elkner', 'jeffrey', 'pwd')
>>> manager.ui.person.add('Camila', 'Cerna', 'camila', 'pwd')
>>> manager.ui.person.add('Liliana', 'Vividor', 'liliana', 'pwd')
>>> manager.ui.person.add('Mario', 'Tejada', 'mario', 'pwd')
>>> manager.ui.schoolyear.add('2012', '2012-01-01', '2012-12-31')
>>> manager.ui.term.add('2012', '2012', '2012-01-01', '2012-12-31')
>>> manager.ui.course.add('2012', 'Math')
>>> manager.ui.section.add('2012', '2012', 'Math')
>>> manager.ui.section.instructors.add('2012', '2012', 'Math (1)',
... ['jeffrey'])
>>> manager.ui.section.students.add('2012', '2012', 'Math (1)',
... ['camila', 'liliana', 'mario'])
Log in as teacher:
>>> teacher = browsers.teacher
>>> teacher.ui.login('jeffrey', 'pwd')
Let's add some activities to the default worksheet:
>>> teacher.query.link('Gradebook').click()
>>> teacher.query.link('Activity').click()
>>> teacher.query.id('form-widgets-title').type('Multiply two fractions')
>>> teacher.query.button('Submit').click()
>>> teacher.query.link('Activity').click()
>>> teacher.query.id('form-widgets-title').type('Divide a fraction by a mixed number')
>>> teacher.query.id('form-widgets-label').type('02')
>>> teacher.query.button('Submit').click()
>>> teacher.query.link('Activity').click()
>>> teacher.query.id('form-widgets-title').type('Divide a fraction by a whole number')
>>> teacher.query.button('Submit').click()
>>> teacher.query.link('Activity').click()
>>> teacher.query.id('form-widgets-title').type('Read and write fractions')
>>> teacher.query.id('form-widgets-label').type('04')
>>> teacher.query.button('Submit').click()
Grade the activities:
>>> teacher.ui.gradebook.worksheet.score('Camila Cerna', 'Multi', '90')
>>> teacher.ui.gradebook.worksheet.score('Camila Cerna', '02', '100')
>>> teacher.ui.gradebook.worksheet.score('Camila Cerna', 'Divid', '90')
>>> teacher.ui.gradebook.worksheet.score('Camila Cerna', '04', '80')
>>> teacher.ui.gradebook.worksheet.score('Mario Tejada', 'Multi', '80')
>>> teacher.ui.gradebook.worksheet.score('Mario Tejada', 'Divid', '75')
>>> teacher.ui.gradebook.worksheet.score('Mario Tejada', '04', '70')
>>> teacher.query.button('Save').click()
Print the default worksheet:
>>> teacher.ui.gradebook.worksheet.pprint()
+----------+
| *Sheet1* |
+----------+
+-----------+------------+-------+-----+-------+-----+-------+-------+
| Last Name | First Name | Multi | 02 | Divid | 04 | Total | Ave. |
| | | 100 | 100 | 100 | 100 | | |
+-----------+------------+-------+-----+-------+-----+-------+-------+
| Cerna | Camila | 90 | 100 | 90 | 80 | 360.0 | 90.0% |
| Tejada | Mario | 80 | | 75 | 70 | 225.0 | 75.0% |
| Vividor | Liliana | | | | | 0.0 | N/A |
+-----------+------------+-------+-----+-------+-----+-------+-------+
Log in as Camila and check the default worksheet:
>>> camila = browsers.camila
>>> camila.ui.login('camila', 'pwd')
>>> camila.query.link('Gradebook').click()
>>> print camila.query.tag('h3').text
Ave.: 90.0%
>>> sel = 'table tbody tr'
>>> for row in camila.query_all.css(sel):
... activity, score = row.query_all.tag('td')
... print '%s, %s' % (activity.text, score.text)
Multiply two fractions, 90 / 100
Divide a fraction by a mixed number, 100 / 100
Divide a fraction by a whole number, 90 / 100
Read and write fractions, 80 / 100
Log in as Mario and check the default worksheet:
>>> mario = browsers.mario
>>> mario.ui.login('mario', 'pwd')
>>> mario.query.link('Gradebook').click()
>>> print mario.query.tag('h3').text
Ave.: 75.0%
>>> sel = 'table tbody tr'
>>> for row in mario.query_all.css(sel):
... activity, score = row.query_all.tag('td')
... print '%s, %s' % (activity.text, score.text)
Multiply two fractions, 80 / 100
Divide a fraction by a mixed number,
Divide a fraction by a whole number, 75 / 100
Read and write fractions, 70 / 100
Log in as Liliana and check the default worksheet:
>>> liliana = browsers.liliana
>>> liliana.ui.login('liliana', 'pwd')
>>> liliana.query.link('Gradebook').click()
>>> print liliana.query.tag('h3').text
Nothing Graded
>>> sel = 'table tbody tr'
>>> for row in liliana.query_all.css(sel):
... activity, score = row.query_all.tag('td')
... print '%s, %s' % (activity.text, score.text)
Multiply two fractions,
Divide a fraction by a mixed number,
Divide a fraction by a whole number,
Read and write fractions,
|