sakai-cle-test-api 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -5
- data/lib/sakai-cle-test-api.rb +4 -8
- data/lib/sakai-cle-test-api/admin_page_elements.rb +1 -433
- data/lib/sakai-cle-test-api/announcements.rb +59 -0
- data/lib/sakai-cle-test-api/assessments.rb +194 -0
- data/lib/sakai-cle-test-api/assignments.rb +113 -0
- data/lib/sakai-cle-test-api/basic_lti.rb +5 -0
- data/lib/sakai-cle-test-api/blogs.rb +5 -0
- data/lib/sakai-cle-test-api/calendar.rb +65 -0
- data/lib/sakai-cle-test-api/calendar_summary.rb +0 -0
- data/lib/sakai-cle-test-api/common_page_elements.rb +1 -817
- data/lib/sakai-cle-test-api/drop_box.rb +0 -0
- data/lib/sakai-cle-test-api/email_archive.rb +10 -0
- data/lib/sakai-cle-test-api/forums.rb +39 -0
- data/lib/sakai-cle-test-api/gradebook.rb +10 -0
- data/lib/sakai-cle-test-api/gradebook2.rb +6 -0
- data/lib/sakai-cle-test-api/messages.rb +119 -0
- data/lib/sakai-cle-test-api/news.rb +9 -0
- data/lib/sakai-cle-test-api/polls.rb +24 -0
- data/lib/sakai-cle-test-api/post_em.rb +0 -0
- data/lib/sakai-cle-test-api/profile.rb +17 -0
- data/lib/sakai-cle-test-api/profile2.rb +43 -0
- data/lib/sakai-cle-test-api/resources_roster.rb +0 -0
- data/lib/sakai-cle-test-api/rwiki.rb +0 -0
- data/lib/sakai-cle-test-api/sections.rb +43 -0
- data/lib/sakai-cle-test-api/single_user.rb +0 -0
- data/lib/sakai-cle-test-api/site_page_elements.rb +1236 -5017
- data/lib/sakai-cle-test-api/site_statistics.rb +0 -0
- data/lib/sakai-cle-test-api/syllabus.rb +77 -0
- data/lib/sakai-cle-test-api/tools_menu.rb +415 -0
- data/sakai-cle-test-api.gemspec +2 -2
- metadata +30 -6
- data/lib/sakai-cle-test-api/app_functions.rb +0 -753
@@ -0,0 +1,59 @@
|
|
1
|
+
# The Announcements list page for a Site.
|
2
|
+
class Announcements
|
3
|
+
include ToolsMenu
|
4
|
+
include AnnouncementsMethods
|
5
|
+
end
|
6
|
+
|
7
|
+
# Show Announcements from Another Site. On this page you select what announcements
|
8
|
+
# you want to merge into the current Site.
|
9
|
+
class AnnouncementsMerge
|
10
|
+
include ToolsMenu
|
11
|
+
include AnnouncementsMergeMethods
|
12
|
+
end
|
13
|
+
|
14
|
+
# This Class does double-duty. It's for the Preview page when editing an
|
15
|
+
# Announcement, plus for when you just click an Announcement to view it.
|
16
|
+
class PreviewAnnouncements
|
17
|
+
include ToolsMenu
|
18
|
+
include PreviewAnnouncementsMethods
|
19
|
+
end
|
20
|
+
|
21
|
+
# The page where an announcement is created or edited.
|
22
|
+
class AddEditAnnouncements
|
23
|
+
include ToolsMenu
|
24
|
+
include AddEditAnnouncementsMethods
|
25
|
+
end
|
26
|
+
|
27
|
+
# The page for attaching files and links to Announcements.
|
28
|
+
class AnnouncementsAttach < AddFiles
|
29
|
+
|
30
|
+
include ToolsMenu
|
31
|
+
|
32
|
+
def initialize(browser)
|
33
|
+
@browser = browser
|
34
|
+
|
35
|
+
@@classes= {
|
36
|
+
:this => "AnnouncementsAttach",
|
37
|
+
:parent => "AddEditAnnouncements"
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
# Page for merging announcements from other sites
|
44
|
+
class AnnouncementsMerge
|
45
|
+
include ToolsMenu
|
46
|
+
include AnnouncementsMergeMethods
|
47
|
+
end
|
48
|
+
|
49
|
+
# Page for setting up options for announcements
|
50
|
+
class AnnouncementsOptions
|
51
|
+
include ToolsMenu
|
52
|
+
include AnnouncementsOptionsMethods
|
53
|
+
end
|
54
|
+
|
55
|
+
# Page containing permissions options for announcements
|
56
|
+
class AnnouncementsPermissions
|
57
|
+
include ToolsMenu
|
58
|
+
include AnnouncementsPermissionsMethods
|
59
|
+
end
|
@@ -0,0 +1,194 @@
|
|
1
|
+
|
2
|
+
#================
|
3
|
+
# Assessments pages - "Samigo", a.k.a., "Tests & Quizzes"
|
4
|
+
#================
|
5
|
+
|
6
|
+
# The Course Tools "Tests and Quizzes" page for a given site.
|
7
|
+
# (Instructor view)
|
8
|
+
class AssessmentsList
|
9
|
+
include PageObject
|
10
|
+
include ToolsMenu
|
11
|
+
CLEElements.modularize(AssessmentsListMethods, :class=>"portletMainIframe")
|
12
|
+
end
|
13
|
+
|
14
|
+
# Page that appears when previewing an assessment.
|
15
|
+
# It shows the basic information about the assessment.
|
16
|
+
class PreviewOverview
|
17
|
+
include PageObject
|
18
|
+
include ToolsMenu
|
19
|
+
CLEElements.modularize(PreviewOverviewMethods, :class=>"portletMainIframe")
|
20
|
+
end
|
21
|
+
|
22
|
+
# The Settings page for a particular Assessment
|
23
|
+
class AssessmentSettings
|
24
|
+
include PageObject
|
25
|
+
include ToolsMenu
|
26
|
+
CLEElements.modularize(AssessmentSettingsMethods, :class=>"portletMainIframe")
|
27
|
+
end
|
28
|
+
|
29
|
+
# Instructor's view of Students' assessment scores
|
30
|
+
class AssessmentTotalScores
|
31
|
+
include PageObject
|
32
|
+
include ToolsMenu
|
33
|
+
include AssessmentTotalScoresMethods
|
34
|
+
end
|
35
|
+
|
36
|
+
# The page that appears when you're creating a new quiz
|
37
|
+
# or editing an existing one
|
38
|
+
class EditAssessment
|
39
|
+
include PageObject
|
40
|
+
include ToolsMenu
|
41
|
+
CLEElements.modularize(EditAssessmentMethods, :class=>"portletMainIframe")
|
42
|
+
end
|
43
|
+
|
44
|
+
# This is the page for adding and editing a part of an assessment
|
45
|
+
class AddEditAssessmentPart
|
46
|
+
include PageObject
|
47
|
+
include ToolsMenu
|
48
|
+
CLEElements.modularize(AddEditAssessmentPartMethods, :class=>"portletMainIframe")
|
49
|
+
end
|
50
|
+
|
51
|
+
# The review page once you've selected to Save and Publish
|
52
|
+
# the assessment
|
53
|
+
class PublishAssessment
|
54
|
+
include PageObject
|
55
|
+
include ToolsMenu
|
56
|
+
CLEElements.modularize(PublishAssessmentMethods, :class=>"portletMainIframe")
|
57
|
+
end
|
58
|
+
|
59
|
+
# The page for setting up a multiple choice question
|
60
|
+
class MultipleChoice
|
61
|
+
include PageObject
|
62
|
+
include ToolsMenu
|
63
|
+
CLEElements.modularize(MultipleChoiceMethods, :class=>"portletMainIframe")
|
64
|
+
end
|
65
|
+
|
66
|
+
# The page for setting up a Survey question
|
67
|
+
class Survey
|
68
|
+
include PageObject
|
69
|
+
include ToolsMenu
|
70
|
+
CLEElements.modularize(SurveyMethods, :class=>"portletMainIframe")
|
71
|
+
end
|
72
|
+
|
73
|
+
# The page for setting up a Short Answer/Essay question
|
74
|
+
class ShortAnswer
|
75
|
+
include PageObject
|
76
|
+
include ToolsMenu
|
77
|
+
CLEElements.modularize(ShortAnswerMethods, :class=>"portletMainIframe")
|
78
|
+
end
|
79
|
+
|
80
|
+
# The page for setting up a Fill-in-the-blank question
|
81
|
+
class FillInBlank
|
82
|
+
include PageObject
|
83
|
+
include ToolsMenu
|
84
|
+
CLEElements.modularize(FillInBlankMethods, :class=>"portletMainIframe")
|
85
|
+
end
|
86
|
+
|
87
|
+
# The page for setting up a numeric response question
|
88
|
+
class NumericResponse
|
89
|
+
include PageObject
|
90
|
+
include ToolsMenu
|
91
|
+
CLEElements.modularize(NumericResponseMethods, :class=>"portletMainIframe")
|
92
|
+
end
|
93
|
+
|
94
|
+
# The page for setting up a matching question
|
95
|
+
class Matching
|
96
|
+
include PageObject
|
97
|
+
include ToolsMenu
|
98
|
+
CLEElements.modularize(MatchingMethods, :class=>"portletMainIframe")
|
99
|
+
end
|
100
|
+
|
101
|
+
# The page for setting up a True/False question
|
102
|
+
class TrueFalse
|
103
|
+
include PageObject
|
104
|
+
include ToolsMenu
|
105
|
+
CLEElements.modularize(TrueFalseMethods, :class=>"portletMainIframe")
|
106
|
+
end
|
107
|
+
|
108
|
+
# The page for setting up a question that requires an audio response
|
109
|
+
class AudioRecording
|
110
|
+
include PageObject
|
111
|
+
include ToolsMenu
|
112
|
+
CLEElements.modularize(AudioRecordingMethods, :class=>"portletMainIframe")
|
113
|
+
end
|
114
|
+
|
115
|
+
# The page for setting up a question that requires
|
116
|
+
# attaching a file
|
117
|
+
class FileUpload
|
118
|
+
include PageObject
|
119
|
+
include ToolsMenu
|
120
|
+
CLEElements.modularize(FileUploadMethods, :class=>"portletMainIframe")
|
121
|
+
end
|
122
|
+
|
123
|
+
# The page that appears when you are editing a type of assessment
|
124
|
+
class EditAssessmentType
|
125
|
+
include PageObject
|
126
|
+
include ToolsMenu
|
127
|
+
CLEElements.modularize(EditAssessmentTypeMethods, :class=>"portletMainIframe")
|
128
|
+
end
|
129
|
+
|
130
|
+
# The Page that appears when adding a new question pool
|
131
|
+
class AddQuestionPool
|
132
|
+
include PageObject
|
133
|
+
include ToolsMenu
|
134
|
+
CLEElements.modularize(AddQuestionPoolMethods, :class=>"portletMainIframe")
|
135
|
+
end
|
136
|
+
|
137
|
+
# The Page that appears when editing an existing question pool
|
138
|
+
class EditQuestionPool
|
139
|
+
include PageObject
|
140
|
+
include ToolsMenu
|
141
|
+
CLEElements.modularize(EditQuestionPoolMethods, :class=>"portletMainIframe")
|
142
|
+
end
|
143
|
+
|
144
|
+
# The page with the list of existing Question Pools
|
145
|
+
class QuestionPoolsList
|
146
|
+
include PageObject
|
147
|
+
include ToolsMenu
|
148
|
+
CLEElements.modularize(QuestionPoolsListMethods, :class=>"portletMainIframe")
|
149
|
+
end
|
150
|
+
|
151
|
+
# The page that appears when you click to import
|
152
|
+
# a pool.
|
153
|
+
class PoolImport
|
154
|
+
include PageObject
|
155
|
+
include ToolsMenu
|
156
|
+
include PoolImportMethods
|
157
|
+
end
|
158
|
+
|
159
|
+
# This page appears when adding a question to a pool
|
160
|
+
class SelectQuestionType
|
161
|
+
include PageObject
|
162
|
+
include ToolsMenu
|
163
|
+
CLEElements.modularize(SelectQuestionTypeMethods, :class=>"portletMainIframe")
|
164
|
+
end
|
165
|
+
|
166
|
+
# Page of Assessments accessible to a student user
|
167
|
+
#
|
168
|
+
# It may be that we want to deprecate this class and simply use
|
169
|
+
# the AssessmentsList class alone.
|
170
|
+
class TakeAssessmentList
|
171
|
+
include PageObject
|
172
|
+
include ToolsMenu
|
173
|
+
include TakeAssessmentListMethods
|
174
|
+
end
|
175
|
+
|
176
|
+
# The student view of the overview page of an Assessment
|
177
|
+
class BeginAssessment
|
178
|
+
include PageObject
|
179
|
+
include ToolsMenu
|
180
|
+
include BeginAssessmentMethods
|
181
|
+
end
|
182
|
+
|
183
|
+
# The confirmation page that appears when submitting an Assessment.
|
184
|
+
# The last step before actually submitting the the Assessment.
|
185
|
+
class ConfirmSubmission
|
186
|
+
include ToolsMenu
|
187
|
+
CLEElements.modularize(ConfirmSubmissionMethods, :class=>"portletMainIframe")
|
188
|
+
end
|
189
|
+
|
190
|
+
# The summary page that appears when an Assessment has been submitted.
|
191
|
+
class SubmissionSummary
|
192
|
+
include ToolsMenu
|
193
|
+
CLEElements.modularize(SubmissionSummaryMethods, :class=>"portletMainIframe")
|
194
|
+
end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
|
2
|
+
#================
|
3
|
+
# Assignments Pages
|
4
|
+
#================
|
5
|
+
|
6
|
+
# The page where you create a new assignment
|
7
|
+
class AssignmentAdd
|
8
|
+
include PageObject
|
9
|
+
include ToolsMenu
|
10
|
+
CLEElements.modularize(AssignmentAddMethods, :class=>"portletMainIframe")
|
11
|
+
end
|
12
|
+
|
13
|
+
# Page that appears when you first click the Assignments link
|
14
|
+
class AssignmentsList
|
15
|
+
include PageObject
|
16
|
+
include ToolsMenu
|
17
|
+
CLEElements.modularize(AssignmentsListMethods, :class=>"portletMainIframe")
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
# The Permissions Page in Assignments
|
22
|
+
class AssignmentsPermissions
|
23
|
+
include PageObject
|
24
|
+
include ToolsMenu
|
25
|
+
CLEElements.modularize(AssignmentsPermissionsMethods, :class=>"portletMainIframe")
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
# Page that appears when you click to preview an Assignment
|
30
|
+
class AssignmentsPreview
|
31
|
+
include PageObject
|
32
|
+
include ToolsMenu
|
33
|
+
CLEElements.modularize(AssignmentsPreviewMethods, :class=>"portletMainIframe")
|
34
|
+
end
|
35
|
+
|
36
|
+
# The reorder page for Assignments
|
37
|
+
class AssignmentsReorder
|
38
|
+
include PageObject
|
39
|
+
include ToolsMenu
|
40
|
+
CLEElements.modularize(AssignmentsReorderMethods, :class=>"portletMainIframe")
|
41
|
+
end
|
42
|
+
|
43
|
+
# A Student user's page for editing/submitting/view an assignment.
|
44
|
+
class AssignmentStudent
|
45
|
+
include PageObject
|
46
|
+
include ToolsMenu
|
47
|
+
CLEElements.modularize(AssignmentStudentMethods, :class=>"portletMainIframe")
|
48
|
+
end
|
49
|
+
|
50
|
+
# Page that appears when a Student User clicks to Preview an
|
51
|
+
# assignment that is in progress.
|
52
|
+
class AssignmentStudentPreview
|
53
|
+
include PageObject
|
54
|
+
include ToolsMenu
|
55
|
+
include AssignmentStudentPreviewMethods
|
56
|
+
end
|
57
|
+
|
58
|
+
# The page that appears when a Student user has fully submitted an assignment
|
59
|
+
# or saves it as a draft.
|
60
|
+
class SubmissionConfirmation
|
61
|
+
include PageObject
|
62
|
+
include ToolsMenu
|
63
|
+
include SubmissionConfirmationMethods
|
64
|
+
end
|
65
|
+
|
66
|
+
# The page that appears when you click on an assignment's "Grade" or "View Submission" link
|
67
|
+
# as an instructor. Shows the list of students and their
|
68
|
+
# assignment submission status.
|
69
|
+
class AssignmentSubmissionList
|
70
|
+
include PageObject
|
71
|
+
include ToolsMenu
|
72
|
+
CLEElements.modularize(AssignmentSubmissionListMethods, :class=>"portletMainIframe")
|
73
|
+
end
|
74
|
+
|
75
|
+
# The page that shows a student's submitted assignment to an instructor user.
|
76
|
+
class AssignmentSubmission
|
77
|
+
include PageObject
|
78
|
+
include ToolsMenu
|
79
|
+
CLEElements.modularize(AssignmentSubmissionMethods, :class=>"portletMainIframe")
|
80
|
+
end
|
81
|
+
|
82
|
+
# The Grade Report page accessed from the Assignments page
|
83
|
+
class GradeReport
|
84
|
+
include PageObject
|
85
|
+
include ToolsMenu
|
86
|
+
CLEElements.modularize(GradeReportMethods, :class=>"portletMainIframe")
|
87
|
+
end
|
88
|
+
|
89
|
+
# The Student View page accessed from the Assignments page
|
90
|
+
class StudentView
|
91
|
+
include PageObject
|
92
|
+
include ToolsMenu
|
93
|
+
CLEElements.modularize(StudentViewMethods, :class=>"portletMainIframe")
|
94
|
+
end
|
95
|
+
|
96
|
+
# Page for attaching files to Assignments
|
97
|
+
class AssignmentAttachments < AddFiles
|
98
|
+
include PageObject
|
99
|
+
include ToolsMenu
|
100
|
+
|
101
|
+
def initialize(browser)
|
102
|
+
@browser = browser
|
103
|
+
|
104
|
+
@@classes = {
|
105
|
+
:this => "AssignmentAttachments",
|
106
|
+
:parent => "AssignmentAdd",
|
107
|
+
:second => "AssignmentStudent",
|
108
|
+
:third => "AssignmentSubmission"
|
109
|
+
}
|
110
|
+
end
|
111
|
+
|
112
|
+
end
|
113
|
+
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# Top page of the Calendar
|
2
|
+
# For now it includes all views, though that probably
|
3
|
+
# means it will have to be re-instantiated every time
|
4
|
+
# a new view is selected.
|
5
|
+
class Calendar
|
6
|
+
include ToolsMenu
|
7
|
+
include CalendarTools
|
8
|
+
include CalendarMethods
|
9
|
+
end
|
10
|
+
|
11
|
+
# The page that appears when you click on an event in the Calendar
|
12
|
+
class EventDetail
|
13
|
+
include ToolsMenu
|
14
|
+
include CalendarTools
|
15
|
+
include EventDetailMethods
|
16
|
+
end
|
17
|
+
|
18
|
+
#
|
19
|
+
class AddEditEvent
|
20
|
+
include ToolsMenu
|
21
|
+
CLEElements.modularize(AddEditEventMethods, :class=>"portletMainIframe")
|
22
|
+
end
|
23
|
+
|
24
|
+
# The page that appears when the Frequency button is clicked on the Add/Edit
|
25
|
+
# Event page.
|
26
|
+
class EventFrequency
|
27
|
+
include ToolsMenu
|
28
|
+
CLEElements.modularize(EventFrequencyMethods, :class=>"portletMainIframe")
|
29
|
+
end
|
30
|
+
|
31
|
+
class AddEditFields
|
32
|
+
include ToolsMenu
|
33
|
+
CLEElements.modularize(AddEditFieldsMethods, :class=>"portletMainIframe")
|
34
|
+
end
|
35
|
+
|
36
|
+
class ImportStepOne
|
37
|
+
include ToolsMenu
|
38
|
+
CLEElements.modularize(ImportStepOneMethods, :class=>"portletMainIframe")
|
39
|
+
end
|
40
|
+
|
41
|
+
class ImportStepTwo
|
42
|
+
include ToolsMenu
|
43
|
+
include ImportStepTwoMethods
|
44
|
+
end
|
45
|
+
|
46
|
+
class ImportStepThree
|
47
|
+
include ToolsMenu
|
48
|
+
CLEElements.modularize(ImportStepThreeMethods, :class=>"portletMainIframe")
|
49
|
+
end
|
50
|
+
|
51
|
+
# TODO: Rethink this!!!
|
52
|
+
class EventAttach < AddFiles
|
53
|
+
|
54
|
+
include ToolsMenu
|
55
|
+
|
56
|
+
def initialize(browser)
|
57
|
+
@browser = browser
|
58
|
+
|
59
|
+
@@classes = {
|
60
|
+
:this=>"EventAttach",
|
61
|
+
:parent=>"AddEditEvent"
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
File without changes
|