Änderungen von Dokument 08 Schnittstelle ONYX Reporter

Zuletzt geändert von Carina Enke am 13.02.2024

Von Version 396.1
bearbeitet von Carina Enke
am 13.02.2024
Änderungskommentar: Es gibt keinen Kommentar für diese Version
Auf Version 398.1
bearbeitet von Carina Enke
am 13.02.2024
Änderungskommentar: Es gibt keinen Kommentar für diese Version

Zusammenfassung

Details

Seiteneigenschaften
Inhalt
... ... @@ -7,6 +7,10 @@
7 7  {{layout-cell}}
8 8  {{panel borderColor="#ddd" bgColor="#f0f0f0" borderStyle="solid" title="Inhalt"}}
9 9  {{toc start="2"/}}
10 +
11 + **Weitere Informationen:**
12 +
13 +* [[Schnittstelle ONYX Player>>doc:ONYX.Systeminformationen.Schnittstelle ONYX Player.WebHome]]
10 10  {{/panel}}
11 11  {{/layout-cell}}
12 12  {{/layout-section}}
... ... @@ -361,346 +361,3 @@
361 361  {{/layout-cell}}
362 362  {{/layout-section}}
363 363  {{/layout}}
364 -
365 -{{layout}}
366 -{{layout-section ac:type="two_equal"}}
367 -{{layout-cell}}
368 -====== Content: ======
369 -
370 -{{toc start="2"/}}
371 -{{/layout-cell}}
372 -
373 -{{layout-cell}}
374 -
375 -{{/layout-cell}}
376 -{{/layout-section}}
377 -
378 -{{layout-section ac:type="single"}}
379 -{{layout-cell}}
380 -== General information ==
381 -
382 -The API to the ONYX WebReporter enables the communication between the LMS and the Reporter. Therefore, a couple of commands will be executed:
383 -
384 -|(((
385 -armSite
386 -)))|(((
387 -Registration of sequence requests at the ONYX Reporter
388 -)))
389 -|(((
390 -initiateSite
391 -)))|(((
392 -Initiates the Reporter session (transmission of the CP).
393 -)))
394 -|(((
395 -disarmSite
396 -)))|(((
397 -Release of all Reporter resources for this session.
398 -)))
399 -|(((
400 -getResultValues
401 -)))|(((
402 -Returns all (requested) results for the test. Condition: There is only one student in the list transmitted with initiateSite.
403 -)))
404 -|(% colspan="1" %)(% colspan="1" %)
405 -(((
406 -getResultVariables
407 -)))|(% colspan="1" %)(% colspan="1" %)
408 -(((
409 -Returns all (requested) outcome variables for the test. No armSite, initiateSite, or disarmSite is required.
410 -)))
411 -
412 -== Login through the LMS ==
413 -
414 -{{code language="xml" title="Login through the LMS"}}
415 -@WebMethod(operationName = „armSite")
416 -public String armSite(
417 -@WebParam(name = „version") final Integer version,
418 -@WebParam(name = „userId") final String userId,
419 -@WebParam(name = „optionalRole") final Integer role,
420 -@WebParam(name = „secretToShare") final String secretToShare,
421 -@WebParam(name = „optionalUserLastName") final String userLastName,
422 -@WebParam(name = „optionalUserFirstName") final String userFirstName,
423 -@WebParam(name = „additionalParams") final HashMapWrapper additionalParams) {
424 -}
425 -{{/code}}
426 -
427 -=== Parameter armSite ===
428 -
429 -|(((
430 -version
431 -)))|(((
432 -Requested version: 1
433 -)))
434 -|(((
435 -userId
436 -)))|(((
437 -UserId of the requested Reporter user
438 -)))
439 -|(((
440 -optionalRole
441 -)))|(((
442 -Optional. User role. 0 = student, 1 = tutor
443 -)))
444 -|(((
445 -secretToShare
446 -)))|(((
447 -A secret string that allows the server and client to encrypt their communication. Must remain the same for any further communication.
448 -)))
449 -|(((
450 -optionalUserLastName
451 -)))|(((
452 -Optional. Last name of the user.
453 -)))
454 -|(% colspan="1" %)(% colspan="1" %)
455 -(((
456 -optionalUserFirstName
457 -)))|(% colspan="1" %)(% colspan="1" %)
458 -(((
459 -Optional. First name of the user.
460 -)))
461 -|(% colspan="1" %)(% colspan="1" %)
462 -(((
463 -additionalParams
464 -)))|(% colspan="1" %)(% colspan="1" %)
465 -(((
466 -Reserved for future use.
467 -)))
468 -
469 -=== ReturnValue armSite ===
470 -
471 -|(((
472 -String
473 -)))|(((
474 -Session ID which has to be used to mark any other Reporter call.
475 -)))
476 -
477 -== Initialisation through LMS ==
478 -
479 -{{code language="xml" title="Initialisation through LMS"}}
480 -@WebMethod(operationName = „initiateSite")
481 -public String initiateSite(
482 -@WebParam(name = „version") final Integer version,
483 -@WebParam(name = „sessionId") final String sessionId,
484 -@WebParam(name = „secretToShare") final String secretToShare,
485 -@WebParam(name = „students") final ArrayList<ResultsForStudent> students,
486 -@WebParam(name = „optionalContentPackage") final byte[] contentPackage,
487 -@WebParam(name = „additionalParams") final HashMapWrapper additionalParams) {
488 -}
489 -{{/code}}
490 -
491 -=== Parameter initiateSite ===
492 -
493 -|(((
494 -version
495 -)))|(((
496 -Requested version: 1
497 -)))
498 -|(% colspan="1" %)(% colspan="1" %)
499 -(((
500 -sessionId
501 -)))|(% colspan="1" %)(% colspan="1" %)
502 -(((
503 -SessionId, as returned by armSite.
504 -)))
505 -|(((
506 -secretToShare
507 -)))|(((
508 -A secret string that allows the server and client to encrypt their communication. Must remain the same for any further communication.
509 -)))
510 -|(((
511 -students
512 -)))|(((
513 -List of students and their results. See below.
514 -)))
515 -|(((
516 -optionalContentPackage
517 -)))|(((
518 -Optional. Content package (zipped) as byte array.
519 -)))
520 -|(((
521 -additionalParams
522 -)))|(((
523 -Reserved for future use.
524 -)))
525 -
526 -=== ReturnValue initiateSite ===
527 -
528 -|(((
529 -String
530 -)))|(((
531 -Absolute URL of the Reporter site for the IFrame. The URL has to be amended by the LMS with the following URL parameters:
532 -
533 -* sid: Session ID, as returned by armSite
534 -* (((
535 -uid: Student ID, as registrated in the initiateSite at the ONYX Reporter
536 -)))
537 -)))
538 -
539 -{{code language="xml"}}
540 -public class ResultsForStudent {
541 -   private String studentId = „";
542 -   private String firstname = „";
543 -   private String lastname = „";
544 -   private String groupname = „";
545 -   private String tutorname = „";
546 -   private File contentFile = null;
547 -   private byte[] resultsFile = null;
548 -}
549 -{{/code}}
550 -
551 -== Logout through the LMS ==
552 -
553 -
554 -{{code}}
555 -@WebMethod(operationName = „disarmSite")
556 -public Boolean disarmSite(
557 -@WebParam(name = „version") final Integer version,
558 -@WebParam(name = „sessionId") final String sessionId,
559 -@WebParam(name = „secretToShare") final String secretToShare,
560 -@WebParam(name = „additionalParams") final HashMapWrapper additionalParams) {
561 -}
562 -{{/code}}
563 -
564 -
565 -=== Parameter disarmSite ===
566 -
567 -|(((
568 -version
569 -)))|(((
570 -Requested version: 1
571 -)))
572 -|(% colspan="1" %)(% colspan="1" %)
573 -(((
574 -sessionId
575 -)))|(% colspan="1" %)(% colspan="1" %)
576 -(((
577 -SessionId, as returned by armSite.
578 -)))
579 -|(((
580 -secretToShare
581 -)))|(((
582 -A secret string that allows the server and client to encrypt their communication. Must remain the same for any further communication.
583 -)))
584 -|(((
585 -additionalParams
586 -)))|(((
587 -Reserved for future use.
588 -)))
589 -
590 -=== ReturnValue disarmSite ===
591 -
592 -|(((
593 -Boolean
594 -)))|(((
595 -True in the case of success, otherwise false.
596 -)))
597 -
598 -== Request of learner results through the LMS ==
599 -
600 -{{code language="xml" title="Request of learner results through the LMS"}}
601 - @WebMethod(operationName = „getResultValues")
602 -public HashMapWrapper getResultValues(
603 - @WebParam(name = „version") final Integer version,
604 - @WebParam(name = „sessionId") final String sessionId,
605 - @WebParam(name = „secretToShare") final String secretToShare,
606 - @WebParam(name = „requestedValues") final HashMap<String, String>
607 - requestedValues,
608 - @WebParam(name = „additionalParams") final HashMapWrapper additionalParams) {
609 -}
610 -{{/code}}
611 -
612 -=== Parameter getResultValues ===
613 -
614 -|(((
615 -version
616 -)))|(((
617 -Requested version: 1
618 -)))
619 -|(% colspan="1" %)(% colspan="1" %)
620 -(((
621 -sessionId
622 -)))|(% colspan="1" %)(% colspan="1" %)
623 -(((
624 -SessionId, as returned by armSite.
625 -)))
626 -|(((
627 -secretToShare
628 -)))|(((
629 -A secret string that allows the server and client to encrypt their communication. Must remain the same for any further communication.
630 -)))
631 -|(((
632 -requestedValues
633 -)))|(((
634 -Can be empty, in which case all result variables are returned. If keys are included, only the keys will be returned.
635 -)))
636 -|(((
637 -additionalParams
638 -)))|(((
639 -Reserved for future use.
640 -)))
641 -
642 -=== ReturnValue getResultValues ===
643 -
644 -|(((
645 -HashMap<String, String>
646 -)))|(((
647 -Map of result variables, key is the variable name, value is the respective variable's value (HashMap is wrapped)
648 -)))
649 -
650 -== Request of result variables through the LMS ==
651 -
652 -{{code language="xml" title="Request of result variables through the LMS"}}
653 - @WebMethod(operationName = „getResultVariables")
654 -public HashMapWrapper getResultVariables(
655 -@WebParam(name = „version") final Integer version,
656 -@WebParam(name = „contentPackage") final byte[] contentPackage,
657 -@WebParam(name = „additionalParams") final HashMapWrapper additionalParams) {
658 -}
659 -{{/code}}
660 -
661 -=== Parameter getResultVariables ===
662 -
663 -|(((
664 -version
665 -)))|(((
666 -Requested version: 1
667 -)))
668 -|(((
669 -contentPackage
670 -)))|(((
671 -Content package (zipped) as byte array.
672 -)))
673 -|(((
674 -additionalParams
675 -)))|(((
676 -Reserved for future use.
677 -)))
678 -
679 -=== ReturnValue getResultVariables ===
680 -
681 -|(((
682 -HashMap<String, String>
683 -)))|(((
684 -Map of result variables, key is the variable name, value is the respective variable's value (HashMap is wrapped)
685 -)))
686 -
687 -== Wrapper ==
688 -
689 -Since the transmission of maps and lists via JAX-WS can cause problems, they have to be wrapped.
690 -
691 -=== Wrapper for HashMap<String, String> ===
692 -
693 -HashMapWrapper.java:
694 -
695 -[[image:attach:HashMapWrapperjava.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
696 -
697 -[[image:attach:HashMapWrapperjava2.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
698 -
699 -=== Wrapper for the ArrayList<ResultsForStudent> ===
700 -
701 -ResultsForStudentsWrapper.java:
702 -
703 -[[image:attach:ResultsForStudentsWrapperjava.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
704 -{{/layout-cell}}
705 -{{/layout-section}}
706 -{{/layout}}