Blackboard WebServices를 사용하여 프로그래밍 방식으로 과제를 Blackboard에 제출할 수 있는지 누구든지 확인할 수 있습니까? (문서화 된대로 here). 특히 Gradebook.WS, AttemptVO 및 studentSubmission 메서드를 사용하여 과제를 제출하는 올바른 방법을 알고 싶습니다. 여기 칠판 성적표에 지금까지 주로 시도가 attemptVO.studentSubmission 제외 비비 성적표에서 볼 수 있다는 점에서 작동하는 노력 것을 볼 수 없습니다입니다 :Blackboard WebServices를 사용하여 프로그래밍 방식으로 Blackboard에 과제를 제출할 수 있습니까?
from suds.client import Client
from suds.plugin import MessagePlugin
from suds.wsse import Timestamp, UsernameToken, Security
WS_BASE_URL = 'http://bbdev.bangor.ac.uk/webapps/ws/services/'
class Learn9Plugin(MessagePlugin):
def marshalled(self, context):
password = context.envelope.childAtPath('Header/Security/UsernameToken/Password')
password.set('Type', 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText')
security = Security()
security.tokens.append(Timestamp())
security.tokens.append(UsernameToken('session', 'nosession'))
plugin = Learn9Plugin()
context = Client( WS_BASE_URL + 'Context.WS?wsdl',
location = WS_BASE_URL + 'Context.WS',
autoblend = True,
wsse = security,
plugins = [plugin])
context.options.wsse.tokens[1].password = context.service.initialize()
result = context.service.loginTool('xxxxx', 'xxxx', 'xxxxx', '', 500)
course_id = '_15877_1'
gradebook = Client(WS_BASE_URL + 'Gradebook.WS?wsdl',
location=WS_BASE_URL + 'Gradebook.WS',
autoblend=True,
wsse=security,
plugins=[plugin])
attemptVO = gradebook.factory.create('ns0:AttemptVO')
attemptVO.override = False
attemptVO.publicFeedbackToUser = False
attemptVO.score = 0
attemptVO.gradeId = '_169_1' # Smith
attemptVO.studentSubmission = 'Some sample text representing an assignment'
attemptVO.studentSubmissionTextType = 'PLAIN_TEXT'
print attemptVO
attempt_result = gradebook.service.saveAttempts(course_id, [attemptVO,])
print attempt_result
결과 :
(AttemptVO){
attemptDate = None
creationDate = None
displayGrade = None
exempt = None
expansionData[] = <empty>
feedbackToUser = None
grade = None
gradeId = "_169_1"
groupAttemptId = None
id = None
instructorNotes = None
override = False
publicFeedbackToUser = False
score = 0
status = None
studentComments = None
studentSubmission = "Some sample text representing an assignment"
studentSubmissionTextType = "PLAIN_TEXT"
}
[_586_1]
많은 감사.
이 업데이트가 있습니까? – skippr
위에서 언급 한 API를 사용할 수 없으므로 업데이트가 필요하지 않습니다. 나는 문서가 업데이트되었는지 확인하지 않았다. – Sion