2016-01-25 14:52:33 +08:00
@core_grades
Feature : Editing a grade item
I n o r d e r t o e n s u r e v a l i d a t i o n i s p r o v i d e d t o t h e t e a c h e r
A s a t e a c h e r
I n e e d t o k n o w w h y I c a n n o t a d d / e d i t v a l u e s o n t h e g r a d e i t e m f o r m
Background :
Given t h e f o l l o w i n g " u s e r s " e x i s t :
| u s e r n a m e | f i r s t n a m e | l a s t n a m e | e m a i l |
| s t u d e n t 1 | S t u d e n t | 1 | s t u d e n t 1 @ e x a m p l e . c o m |
| t e a c h e r 1 | T e a c h e r | 1 | t e a c h e r 1 @ e x a m p l e . c o m |
And t h e f o l l o w i n g " c o u r s e s " e x i s t :
| f u l l n a m e | s h o r t n a m e | c a t e g o r y | g r o u p m o d e |
| C o u r s e 1 | C 1 | 0 | 1 |
And t h e f o l l o w i n g " c o u r s e e n r o l m e n t s " e x i s t :
| u s e r | c o u r s e | r o l e |
| t e a c h e r 1 | C 1 | e d i t i n g t e a c h e r |
| s t u d e n t 1 | C 1 | s t u d e n t |
And I l o g i n a s " a d m i n "
And I n a v i g a t e t o " S c a l e s " n o d e i n " S i t e a d m i n i s t r a t i o n > G r a d e s "
And I p r e s s " A d d a n e w s c a l e "
And I s e t t h e f o l l o w i n g f i e l d s t o t h e s e v a l u e s :
| N a m e | A B C D E F |
| S c a l e | F , E , D , C , B , A |
And I p r e s s " S a v e c h a n g e s "
And I p r e s s " A d d a n e w s c a l e "
And I s e t t h e f o l l o w i n g f i e l d s t o t h e s e v a l u e s :
| N a m e | L e t t e r s c a l e |
| S c a l e | D i s a p p o i n t i n g , G o o d , V e r y g o o d , E x c e l l e n t |
And I p r e s s " S a v e c h a n g e s "
And I a m o n s i t e h o m e p a g e
And I f o l l o w " C o u r s e 1 "
2016-12-06 11:30:51 +08:00
And I n a v i g a t e t o " S e t u p > G r a d e b o o k s e t u p " i n t h e c o u r s e g r a d e b o o k
2016-01-25 14:52:33 +08:00
And I p r e s s " A d d g r a d e i t e m "
And I s e t t h e f o l l o w i n g f i e l d s t o t h e s e v a l u e s :
| I t e m n a m e | M I 1 |
And I p r e s s " S a v e c h a n g e s "
Scenario : Being able to change the grade type, scale and maximum grade for a manual grade item when there are no grades
Given I c l i c k o n " E d i t " " l i n k " i n t h e " M I 1 " " t a b l e _ r o w "
When I c l i c k o n " E d i t s e t t i n g s " " l i n k " i n t h e " M I 1 " " t a b l e _ r o w "
Then I s h o u l d n o t s e e " S o m e g r a d e s h a v e a l r e a d y b e e n a w a r d e d , s o t h e g r a d e t y p e "
And I s e t t h e f i e l d " G r a d e t y p e " t o " S c a l e "
And I p r e s s " S a v e c h a n g e s "
And I s h o u l d s e e " S c a l e m u s t b e s e l e c t e d "
And I s e t t h e f i e l d " S c a l e " t o " A B C D E F "
And I p r e s s " S a v e c h a n g e s "
And I s h o u l d n o t s e e " Y o u c a n n o t c h a n g e t h e t y p e , a s g r a d e s a l r e a d y e x i s t f o r t h i s i t e m "
And I c l i c k o n " E d i t " " l i n k " i n t h e " M I 1 " " t a b l e _ r o w "
And I c l i c k o n " E d i t s e t t i n g s " " l i n k " i n t h e " M I 1 " " t a b l e _ r o w "
And I s h o u l d n o t s e e " S o m e g r a d e s h a v e a l r e a d y b e e n a w a r d e d , s o t h e g r a d e t y p e "
And I s e t t h e f i e l d " S c a l e " t o " L e t t e r s c a l e "
And I p r e s s " S a v e c h a n g e s "
And I s h o u l d n o t s e e " Y o u c a n n o t c h a n g e t h e s c a l e , a s g r a d e s a l r e a d y e x i s t f o r t h i s i t e m "
Scenario : Attempting to change a manual item's grade type when grades already exist
2016-12-06 11:30:51 +08:00
Given I n a v i g a t e t o " V i e w > G r a d e r r e p o r t " i n t h e c o u r s e g r a d e b o o k
2016-01-25 14:52:33 +08:00
And I t u r n e d i t i n g m o d e o n
And I g i v e t h e g r a d e " 2 0 . 0 0 " t o t h e u s e r " S t u d e n t 1 " f o r t h e g r a d e i t e m " M I 1 "
And I p r e s s " S a v e c h a n g e s "
2016-12-06 11:30:51 +08:00
And I n a v i g a t e t o " S e t u p > G r a d e b o o k s e t u p " i n t h e c o u r s e g r a d e b o o k
2016-01-25 14:52:33 +08:00
And I c l i c k o n " E d i t " " l i n k " i n t h e " M I 1 " " t a b l e _ r o w "
When I c l i c k o n " E d i t s e t t i n g s " " l i n k " i n t h e " M I 1 " " t a b l e _ r o w "
Then I s h o u l d s e e " S o m e g r a d e s h a v e a l r e a d y b e e n a w a r d e d , s o t h e g r a d e t y p e c a n n o t b e c h a n g e d . I f y o u w i s h t o c h a n g e t h e m a x i m u m g r a d e , y o u m u s t f i r s t c h o o s e w h e t h e r o r n o t t o r e s c a l e e x i s t i n g g r a d e s . "
2016-08-29 14:57:46 +08:00
And " / / d i v [ c o n t a i n s ( c o n c a t ( ' ' , n o r m a l i z e - s p a c e ( @ c l a s s ) , ' ' ) , ' f e l e m e n t ' ) a n d c o n t a i n s ( t e x t ( ) , ' V a l u e ' ) ] " " x p a t h _ e l e m e n t " s h o u l d e x i s t
2016-01-25 14:52:33 +08:00
Scenario : Attempting to change a manual item's scale when grades already exist
Given I c l i c k o n " E d i t " " l i n k " i n t h e " M I 1 " " t a b l e _ r o w "
And I c l i c k o n " E d i t s e t t i n g s " " l i n k " i n t h e " M I 1 " " t a b l e _ r o w "
And I s e t t h e f i e l d " G r a d e t y p e " t o " S c a l e "
And I s e t t h e f i e l d " S c a l e " t o " A B C D E F "
And I p r e s s " S a v e c h a n g e s "
2016-12-06 11:30:51 +08:00
And I n a v i g a t e t o " V i e w > G r a d e r r e p o r t " i n t h e c o u r s e g r a d e b o o k
2016-01-25 14:52:33 +08:00
And I t u r n e d i t i n g m o d e o n
And I g i v e t h e g r a d e " C " t o t h e u s e r " S t u d e n t 1 " f o r t h e g r a d e i t e m " M I 1 "
And I p r e s s " S a v e c h a n g e s "
2016-12-06 11:30:51 +08:00
And I n a v i g a t e t o " S e t u p > G r a d e b o o k s e t u p " i n t h e c o u r s e g r a d e b o o k
2016-01-25 14:52:33 +08:00
And I c l i c k o n " E d i t " " l i n k " i n t h e " M I 1 " " t a b l e _ r o w "
When I c l i c k o n " E d i t s e t t i n g s " " l i n k " i n t h e " M I 1 " " t a b l e _ r o w "
Then I s h o u l d s e e " S o m e g r a d e s h a v e a l r e a d y b e e n a w a r d e d , s o t h e g r a d e t y p e a n d s c a l e c a n n o t b e c h a n g e d . "
2016-08-29 14:57:46 +08:00
And " / / d i v [ c o n t a i n s ( c o n c a t ( ' ' , n o r m a l i z e - s p a c e ( @ c l a s s ) , ' ' ) , ' f e l e m e n t ' ) a n d c o n t a i n s ( t e x t ( ) , ' A B C D E F ' ) ] " " x p a t h _ e l e m e n t " s h o u l d e x i s t
2016-01-25 14:52:33 +08:00
Scenario : Attempting to change a manual item's maximum grade when no rescaling option has been chosen
2016-12-06 11:30:51 +08:00
Given I n a v i g a t e t o " V i e w > G r a d e r r e p o r t " i n t h e c o u r s e g r a d e b o o k
2016-01-25 14:52:33 +08:00
And I t u r n e d i t i n g m o d e o n
And I g i v e t h e g r a d e " 2 0 . 0 0 " t o t h e u s e r " S t u d e n t 1 " f o r t h e g r a d e i t e m " M I 1 "
And I p r e s s " S a v e c h a n g e s "
2016-12-06 11:30:51 +08:00
And I n a v i g a t e t o " S e t u p > G r a d e b o o k s e t u p " i n t h e c o u r s e g r a d e b o o k
2016-01-25 14:52:33 +08:00
And I c l i c k o n " E d i t " " l i n k " i n t h e " M I 1 " " t a b l e _ r o w "
And I c l i c k o n " E d i t s e t t i n g s " " l i n k " i n t h e " M I 1 " " t a b l e _ r o w "
And I s e t t h e f i e l d " M a x i m u m g r a d e " t o " 5 0 "
When I p r e s s " S a v e c h a n g e s "
Then I s h o u l d s e e " Y o u m u s t c h o o s e w h e t h e r t o r e s c a l e e x i s t i n g g r a d e s o r n o t . "