ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilExAssTypeWikiTeam Class Reference

Team wiki type. More...

+ Inheritance diagram for ilExAssTypeWikiTeam:
+ Collaboration diagram for ilExAssTypeWikiTeam:

Public Member Functions

 __construct (?ilLanguage $a_lng=null)
 Constructor. More...
 
 isActive ()
 
 usesTeams ()
 
 usesFileUpload ()
 
 getTitle ()
 
 getSubmissionType ()
 
 isSubmissionAssignedToTeam ()
 
 submitWiki (int $a_ass_id, int $a_user_id, int $a_wiki_ref_id)
 Submit wiki. More...
 
 cloneSpecificProperties (ilExAssignment $source, ilExAssignment $target)
 
 supportsWebDirAccess ()
 
 getStringIdentifier ()
 
 getExportObjIdForResourceId (int $resource_id)
 
 isActive ()
 
 usesTeams ()
 
 usesFileUpload ()
 
 getTitle ()
 
 getSubmissionType ()
 
 isSubmissionAssignedToTeam ()
 
 cloneSpecificProperties (ilExAssignment $source, ilExAssignment $target)
 
 supportsWebDirAccess ()
 
 getStringIdentifier ()
 

Protected Member Functions

 handleNewUpload (ilExAssignment $ass, ilExSubmission $submission, $a_no_notifications=false)
 

Protected Attributes

const STR_IDENTIFIER = "wiki"
 
ILIAS Exercise InternalDomainService $domain
 
ilLanguage $lng
 

Detailed Description

Team wiki type.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 26 of file class.ilExAssTypeWikiTeam.php.

Constructor & Destructor Documentation

◆ __construct()

ilExAssTypeWikiTeam::__construct ( ?ilLanguage  $a_lng = null)

Constructor.

Parameters
ilLanguage | null$a_lng

Definition at line 38 of file class.ilExAssTypeWikiTeam.php.

39 {
40 global $DIC;
41
42 $this->lng = ($a_lng)
43 ?: $DIC->language();
44 $this->domain = $DIC->exercise()->internal()->domain();
45 }
global $DIC
Definition: shib_login.php:26

References $DIC, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ cloneSpecificProperties()

ilExAssTypeWikiTeam::cloneSpecificProperties ( ilExAssignment  $source,
ilExAssignment  $target 
)

Implements ilExAssignmentTypeInterface.

Definition at line 155 of file class.ilExAssTypeWikiTeam.php.

158 : void {
159 $source_ar = new ilExAssWikiTeamAR($source->getId());
160 $target_ar = new ilExAssWikiTeamAR();
161 $target_ar->setId($target->getId());
162 $target_ar->setTemplateRefId($source_ar->getTemplateRefId());
163 $target_ar->setContainerRefId($source_ar->getContainerRefId());
164 $target_ar->save();
165 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getExportObjIdForResourceId()

ilExAssTypeWikiTeam::getExportObjIdForResourceId ( int  $resource_id)

Definition at line 178 of file class.ilExAssTypeWikiTeam.php.

178 : int
179 {
180 return ilObject::_lookupObjectId($resource_id);
181 }
static _lookupObjectId(int $ref_id)

References ilObject\_lookupObjectId().

+ Here is the call graph for this function:

◆ getStringIdentifier()

ilExAssTypeWikiTeam::getStringIdentifier ( )

Implements ilExAssignmentTypeInterface.

Definition at line 172 of file class.ilExAssTypeWikiTeam.php.

172 : string
173 {
175 }

◆ getSubmissionType()

ilExAssTypeWikiTeam::getSubmissionType ( )

Implements ilExAssignmentTypeInterface.

Definition at line 69 of file class.ilExAssTypeWikiTeam.php.

69 : string
70 {
72 }

References ilExSubmission\TYPE_REPO_OBJECT.

◆ getTitle()

ilExAssTypeWikiTeam::getTitle ( )

Implements ilExAssignmentTypeInterface.

Definition at line 62 of file class.ilExAssTypeWikiTeam.php.

62 : string
63 {
65 $lng->loadLanguageModule("wiki");
66 return $lng->txt("wiki_type_wiki_team");
67 }
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...

References $lng, ilLanguage\loadLanguageModule(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ handleNewUpload()

ilExAssTypeWikiTeam::handleNewUpload ( ilExAssignment  $ass,
ilExSubmission  $submission,
  $a_no_notifications = false 
)
protected

Definition at line 128 of file class.ilExAssTypeWikiTeam.php.

132 : void {
133 $has_submitted = $submission->hasSubmitted();
134
135 // we need one ref id here
136 $exc_ref_ids = ilObject::_getAllReferences($ass->getExerciseId());
137 $exc_ref_id = current($exc_ref_ids);
138
139 $exc = new ilObjExercise($ass->getExerciseId(), false);
140
141 $exc->processExerciseStatus(
142 $ass,
143 $submission->getUserIds(),
144 $has_submitted,
145 $submission->validatePeerReviews()
146 );
147
148 if ($has_submitted &&
149 !$a_no_notifications) {
150 $notification = $this->domain->notification($exc_ref_id);
151 $notification->sendUploadNotification($ass->getId());
152 }
153 }
Class ilObjExercise.
static _getAllReferences(int $id)
get all reference ids for object ID

Referenced by submitWiki().

+ Here is the caller graph for this function:

◆ isActive()

ilExAssTypeWikiTeam::isActive ( )

Implements ilExAssignmentTypeInterface.

Definition at line 47 of file class.ilExAssTypeWikiTeam.php.

47 : bool
48 {
49 return true;
50 }

◆ isSubmissionAssignedToTeam()

ilExAssTypeWikiTeam::isSubmissionAssignedToTeam ( )

Implements ilExAssignmentTypeInterface.

Definition at line 74 of file class.ilExAssTypeWikiTeam.php.

74 : bool
75 {
76 return true;
77 }

◆ submitWiki()

ilExAssTypeWikiTeam::submitWiki ( int  $a_ass_id,
int  $a_user_id,
int  $a_wiki_ref_id 
)

Submit wiki.

Exceptions
ilTemplateException
ilWikiExportException

Definition at line 85 of file class.ilExAssTypeWikiTeam.php.

85 : void
86 {
87 $ass = new ilExAssignment($a_ass_id);
88 $submission = new ilExSubmission($ass, $a_user_id);
89 $subm = $this->domain->submission($a_ass_id);
90
91 if (!$submission->canSubmit()) {
92 return;
93 }
94
95 $wiki = new ilObjWiki($a_wiki_ref_id);
96 $exp = new WikiHtmlExport($wiki);
97 //$exp->setMode(ilWikiHTMLExport::MODE_USER);
98 $collector = $exp->buildExportFile();
99 $file = $collector->getFilePath();
100 $size = filesize($file);
101 if ($size) {
102 $submission->deleteAllFiles();
103
104 $subm->addLocalFile(
105 $a_user_id,
106 $file,
107 $a_wiki_ref_id . ".zip"
108 );
109 $collector->delete();
110 // print version
111 $collector = $exp->buildExportFile(true);
112 $file = $collector->getFilePath();
113 $size = filesize($file);
114 if ($size) {
115 $subm->addLocalFile(
116 $a_user_id,
117 $file,
118 $a_wiki_ref_id . "print.zip"
119 );
120 $collector->delete();
121 }
122
123 $this->handleNewUpload($ass, $submission);
124 }
125 }
Wiki HTML exporter class.
handleNewUpload(ilExAssignment $ass, ilExSubmission $submission, $a_no_notifications=false)
Exercise assignment.
Exercise submission //TODO: This class has many static methods related to delivered "files".
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References handleNewUpload().

+ Here is the call graph for this function:

◆ supportsWebDirAccess()

ilExAssTypeWikiTeam::supportsWebDirAccess ( )

Implements ilExAssignmentTypeInterface.

Definition at line 167 of file class.ilExAssTypeWikiTeam.php.

167 : bool
168 {
169 return true;
170 }

◆ usesFileUpload()

ilExAssTypeWikiTeam::usesFileUpload ( )

Implements ilExAssignmentTypeInterface.

Definition at line 57 of file class.ilExAssTypeWikiTeam.php.

57 : bool
58 {
59 return false;
60 }

◆ usesTeams()

ilExAssTypeWikiTeam::usesTeams ( )

Implements ilExAssignmentTypeInterface.

Definition at line 52 of file class.ilExAssTypeWikiTeam.php.

52 : bool
53 {
54 return true;
55 }

Field Documentation

◆ $domain

ILIAS Exercise InternalDomainService ilExAssTypeWikiTeam::$domain
protected

Definition at line 29 of file class.ilExAssTypeWikiTeam.php.

◆ $lng

ilLanguage ilExAssTypeWikiTeam::$lng
protected

Definition at line 31 of file class.ilExAssTypeWikiTeam.php.

Referenced by getTitle().

◆ STR_IDENTIFIER

const ilExAssTypeWikiTeam::STR_IDENTIFIER = "wiki"
protected

Definition at line 28 of file class.ilExAssTypeWikiTeam.php.


The documentation for this class was generated from the following file: