Esempio n. 1
0
 /**
  * Create the wizard
  * 
  * @return Wizard
  * @access public
  * @since 12/7/07
  */
 public function createWizard()
 {
     $wizard = SingleStepWizard::withDefaultLayout();
     $step = $wizard->addStep("slot", new WizardStep());
     $harmoni = Harmoni::instance();
     $harmoni->request->startNamespace("slots");
     $name = strtolower(RequestContext::value("name"));
     $harmoni->request->endNamespace();
     $slotMgr = SlotManager::instance();
     $slot = $slotMgr->getSlotByShortname($name);
     $wizard->slot = $slot;
     $property = $step->addComponent('type', new WSelectList());
     $property->setValue($slot->getType());
     foreach (array(Slot::custom, Slot::course, Slot::personal) as $type) {
         $property->addOption($type, ucfirst($type));
     }
     $property = $step->addComponent('name', new WTextField());
     $property->setValue($slot->getShortname());
     $property->setEnabled(false, true);
     $property = $step->addComponent('category', new WSelectList());
     $property->setValue($slot->getLocationCategory());
     foreach (SlotAbstract::getLocationCategories() as $category) {
         $property->addOption($category, ucfirst($category));
     }
     $property = $step->addComponent('quota', new WTextField());
     $property->setSize(10);
     if (!$slot->usesDefaultMediaQuota()) {
         $property->setValue($slot->getMediaQuota()->asString());
     }
     $property = $step->addComponent('owners', new WSearchList());
     $property->setSearchSource(new AgentSearchSource());
     $agentMgr = Services::getService("Agent");
     foreach ($slot->getOwners() as $ownerId) {
         $property->addValue(new AgentSearchResult($agentMgr->getAgentOrGroup($ownerId)));
     }
     ob_start();
     print "\n<h4>" . _("Edit Placeholder") . "</h4>";
     print "\n<p><strong>" . _("Owner Definition Type") . ":</strong> [[type]]</p>";
     print "<div style='margin-left: 10px;'>";
     print _("The 'Owner Definition Type' indicates to the system where to search for placeholder owners. 'Course' will force a lookup in the course information system. 'Personal' will match against a user's email address. 'Custom' will not do an external lookup. <br/><br/>Note: If there is a name collision between a 'Custom' placeholder and a 'Course' placeholder. Valid 'Course' owners will still have access to the placeholder.");
     print "</div>";
     print "\n<p><strong>" . _("Placeholder Name") . ":</strong> [[name]]</p>";
     print "<div style='margin-left: 10px;'>";
     print _("The placeholder name will be an identifier for the site. It must be globally unique. Choose wisely to avoid collisions between system-generated personal names and course names.");
     print "</div>";
     print "\n<p><strong>" . _("Location Category") . ":</strong> [[category]]</p>";
     print "<div style='margin-left: 10px;'>";
     print _("The 'Location Category' is the Segue location in which this site will be made available. In the default installation this is disregarded, however some installations will be divided into 'main' and 'community', or other combinations. This flag is what is used in that determination.");
     print "</div>";
     print "\n<p><strong>" . _("Media Library Quota") . ":</strong> [[quota]]</p>";
     print "<div style='margin-left: 10px;'>";
     print _("The 'Media Library Quota' is a limit on the size of media that can be uploaded to a Segue site. Quotas greater or smaller than the default can be set, leave blank for the default. Quotas can be specified in B, kB, MB, GB (e.g. 25MB).");
     print "</div>";
     print "\n<p><strong>" . _("Owners") . ":</strong> </p>";
     print "<div style='margin-left: 10px;'>";
     print _("Placeholder owners are people who can create a site for the placeholder and/or will be given full access to the site at the time of its creation. After the site has been created, changes to placeholder ownership will not change any roles or privileges.");
     print "</div>";
     print "[[owners]]";
     $step->setContent(ob_get_clean());
     return $wizard;
 }
Esempio n. 2
0
 /**
  * Create the wizard
  * 
  * @return Wizard
  * @access public
  * @since 10/20/08
  */
 public function createWizard()
 {
     $wizard = SingleStepWizard::withDefaultLayout();
     $step = $wizard->addStep("members_step", new WizardStep());
     $harmoni = Harmoni::instance();
     $property = $step->addComponent('members', new WSearchList());
     $property->setSearchSource(new AgentSearchSource());
     $agentMgr = Services::getService("Agent");
     $childGroups = $this->getGroup()->getGroups(false);
     while ($childGroups->hasNext()) {
         $property->addValue(new AgentSearchResult($childGroups->next()));
     }
     $members = $this->getGroup()->getMembers(false);
     while ($members->hasNext()) {
         $property->addValue(new AgentSearchResult($members->next()));
     }
     ob_start();
     print "\n<h2>" . _("Edit Site Members") . "</h2>";
     print "\n<p>";
     print _("Site members are users and/or groups of users who are affiliated with the site.");
     print "\n</p>\n<p>";
     print _("By adding users and groups to the list of site members, these users can all be given the same roles in one step. Additional roles can always be given to individual users or groups as well.");
     print "</p>";
     print "<p>" . str_replace('%1', Help::link('Site-Members'), _("For more details, see: %1")) . "</p>";
     print "[[members]]";
     $step->setContent(ob_get_clean());
     return $wizard;
 }