cvsimport fixups - new files
authorMartin Langhoff <martin@catalyst.net.nz>
Sat, 7 Jul 2007 02:30:55 +0000 (14:30 +1200)
committerMartin Langhoff <martin@catalyst.net.nz>
Sat, 7 Jul 2007 02:30:55 +0000 (14:30 +1200)
auth/cas/CAS/domxml-php4-php5.php [new file with mode: 0644]
auth/cas/CAS/languages/english.php [new file with mode: 0644]
auth/cas/CAS/languages/french.php [new file with mode: 0644]
auth/cas/CAS/languages/german.php [new file with mode: 0644]
auth/cas/CAS/languages/greek.php [new file with mode: 0644]
auth/cas/CAS/languages/japanese.php [new file with mode: 0644]
auth/cas/CAS/languages/languages.php [new file with mode: 0644]
auth/cas/cas_form.html [new file with mode: 0644]
auth/cas/cas_ldap_sync_users.php [new file with mode: 0644]
group/printgrouping.php [new file with mode: 0644]

diff --git a/auth/cas/CAS/domxml-php4-php5.php b/auth/cas/CAS/domxml-php4-php5.php
new file mode 100644 (file)
index 0000000..d647475
--- /dev/null
@@ -0,0 +1,277 @@
+<?php\r
+/**\r
+ * @file domxml-php4-php5.php\r
+ * Require PHP5, uses built-in DOM extension.\r
+ * To be used in PHP4 scripts using DOMXML extension.\r
+ * Allows PHP4/DOMXML scripts to run on PHP5/DOM.\r
+ * (Requires PHP5/XSL extension for domxml_xslt functions)\r
+ *\r
+ * Typical use:\r
+ * <pre>\r
+ * {\r
+ *  if (version_compare(PHP_VERSION,'5','>='))\r
+ *   require_once('domxml-php4-to-php5.php');\r
+ * }\r
+ * </pre>\r
+ *\r
+ * Version 1.5.5, 2005-01-18, http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/\r
+ *\r
+ * ------------------------------------------------------------------<br>\r
+ * Written by Alexandre Alapetite, http://alexandre.alapetite.net/cv/\r
+ *\r
+ * Copyright 2004, Licence: Creative Commons "Attribution-ShareAlike 2.0 France" BY-SA (FR),\r
+ * http://creativecommons.org/licenses/by-sa/2.0/fr/\r
+ * http://alexandre.alapetite.net/divers/apropos/#by-sa\r
+ * - Attribution. You must give the original author credit\r
+ * - Share Alike. If you alter, transform, or build upon this work,\r
+ *   you may distribute the resulting work only under a license identical to this one\r
+ * - The French law is authoritative\r
+ * - Any of these conditions can be waived if you get permission from Alexandre Alapetite\r
+ * - Please send to Alexandre Alapetite the modifications you make,\r
+ *   in order to improve this file for the benefit of everybody\r
+ *\r
+ * If you want to distribute this code, please do it as a link to:\r
+ * http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/\r
+ */\r
+\r
+function domxml_new_doc($version) {return new php4DOMDocument('');}\r
+function domxml_open_file($filename) {return new php4DOMDocument($filename);}\r
+function domxml_open_mem($str)\r
+{\r
+ $dom=new php4DOMDocument('');\r
+ $dom->myDOMNode->loadXML($str);\r
+ return $dom;\r
+}\r
+function xpath_eval($xpath_context,$eval_str,$contextnode=null) {return $xpath_context->query($eval_str,$contextnode);}\r
+function xpath_new_context($dom_document) {return new php4DOMXPath($dom_document);}\r
+\r
+class php4DOMAttr extends php4DOMNode\r
+{\r
+ function php4DOMAttr($aDOMAttr) {$this->myDOMNode=$aDOMAttr;}\r
+ function Name() {return $this->myDOMNode->name;}\r
+ function Specified() {return $this->myDOMNode->specified;}\r
+ function Value() {return $this->myDOMNode->value;}\r
+}\r
+\r
+class php4DOMDocument extends php4DOMNode\r
+{\r
+ function php4DOMDocument($filename='')\r
+ {\r
+  $this->myDOMNode=new DOMDocument();\r
+  if ($filename!='') $this->myDOMNode->load($filename);\r
+ }\r
+ function create_attribute($name,$value)\r
+ {\r
+  $myAttr=$this->myDOMNode->createAttribute($name);\r
+  $myAttr->value=$value;\r
+  return new php4DOMAttr($myAttr,$this);\r
+ }\r
+ function create_cdata_section($content) {return new php4DOMNode($this->myDOMNode->createCDATASection($content),$this);}\r
+ function create_comment($data) {return new php4DOMNode($this->myDOMNode->createComment($data),$this);}\r
+ function create_element($name) {return new php4DOMElement($this->myDOMNode->createElement($name),$this);}\r
+ function create_text_node($content) {return new php4DOMNode($this->myDOMNode->createTextNode($content),$this);}\r
+ function document_element() {return new php4DOMElement($this->myDOMNode->documentElement,$this);}\r
+ function dump_file($filename,$compressionmode=false,$format=false) {return $this->myDOMNode->save($filename);}\r
+ function dump_mem($format=false,$encoding=false) {return $this->myDOMNode->saveXML();}\r
+ function get_element_by_id($id) {return new php4DOMElement($this->myDOMNode->getElementById($id),$this);}\r
+ function get_elements_by_tagname($name)\r
+ {\r
+  $myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);\r
+  $nodeSet=array();\r
+  $i=0;\r
+  if (isset($myDOMNodeList))\r
+   while ($node=$myDOMNodeList->item($i))\r
+   {\r
+    $nodeSet[]=new php4DOMElement($node,$this);\r
+    $i++;\r
+   }\r
+  return $nodeSet;\r
+ }\r
+ function html_dump_mem() {return $this->myDOMNode->saveHTML();}\r
+ function root() {return new php4DOMElement($this->myDOMNode->documentElement,$this);}\r
+}\r
+\r
+class php4DOMElement extends php4DOMNode\r
+{\r
+ function get_attribute($name) {return $this->myDOMNode->getAttribute($name);}\r
+ function get_elements_by_tagname($name)\r
+ {\r
+  $myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);\r
+  $nodeSet=array();\r
+  $i=0;\r
+  if (isset($myDOMNodeList))\r
+   while ($node=$myDOMNodeList->item($i))\r
+   {\r
+    $nodeSet[]=new php4DOMElement($node,$this->myOwnerDocument);\r
+    $i++;\r
+   }\r
+  return $nodeSet;\r
+ }\r
+ function has_attribute($name) {return $this->myDOMNode->hasAttribute($name);}\r
+ function remove_attribute($name) {return $this->myDOMNode->removeAttribute($name);}\r
+ function set_attribute($name,$value) {return $this->myDOMNode->setAttribute($name,$value);}\r
+ function tagname() {return $this->myDOMNode->tagName;}\r
+}\r
+\r
+class php4DOMNode\r
+{\r
+ var $myDOMNode;\r
+ var $myOwnerDocument;\r
+ function php4DOMNode($aDomNode,$aOwnerDocument)\r
+ {\r
+  $this->myDOMNode=$aDomNode;\r
+  $this->myOwnerDocument=$aOwnerDocument;\r
+ }\r
+ function __get($name)\r
+ {\r
+  if ($name=='type') return $this->myDOMNode->nodeType;\r
+  elseif ($name=='tagname') return $this->myDOMNode->tagName;\r
+  elseif ($name=='content') return $this->myDOMNode->textContent;\r
+  else\r
+  {\r
+   $myErrors=debug_backtrace();\r
+   trigger_error('Undefined property: '.get_class($this).'::$'.$name.' ['.$myErrors[0]['file'].':'.$myErrors[0]['line'].']',E_USER_NOTICE);\r
+   return false;\r
+  }\r
+ }\r
+ function append_child($newnode) {return new php4DOMElement($this->myDOMNode->appendChild($newnode->myDOMNode),$this->myOwnerDocument);}\r
+ function append_sibling($newnode) {return new php4DOMElement($this->myDOMNode->parentNode->appendChild($newnode->myDOMNode),$this->myOwnerDocument);}\r
+ function attributes()\r
+ {\r
+  $myDOMNodeList=$this->myDOMNode->attributes;\r
+  $nodeSet=array();\r
+  $i=0;\r
+  if (isset($myDOMNodeList))\r
+   while ($node=$myDOMNodeList->item($i))\r
+   {\r
+    $nodeSet[]=new php4DOMAttr($node,$this->myOwnerDocument);\r
+    $i++;\r
+   }\r
+  return $nodeSet;\r
+ }\r
+ function child_nodes()\r
+ {\r
+  $myDOMNodeList=$this->myDOMNode->childNodes;\r
+  $nodeSet=array();\r
+  $i=0;\r
+  if (isset($myDOMNodeList))\r
+   while ($node=$myDOMNodeList->item($i))\r
+   {\r
+    $nodeSet[]=new php4DOMElement($node,$this->myOwnerDocument);\r
+    $i++;\r
+   }\r
+  return $nodeSet;\r
+ }\r
+ function children() {return $this->child_nodes();}\r
+ function clone_node($deep=false) {return new php4DOMElement($this->myDOMNode->cloneNode($deep),$this->myOwnerDocument);}\r
+ function first_child() {return new php4DOMElement($this->myDOMNode->firstChild,$this->myOwnerDocument);}\r
+ function get_content() {return $this->myDOMNode->textContent;}\r
+ function has_attributes() {return $this->myDOMNode->hasAttributes();}\r
+ function has_child_nodes() {return $this->myDOMNode->hasChildNodes();}\r
+ function insert_before($newnode,$refnode) {return new php4DOMElement($this->myDOMNode->insertBefore($newnode->myDOMNode,$refnode->myDOMNode),$this->myOwnerDocument);}\r
+ function is_blank_node()\r
+ {\r
+  $myDOMNodeList=$this->myDOMNode->childNodes;\r
+  $i=0;\r
+  if (isset($myDOMNodeList))\r
+   while ($node=$myDOMNodeList->item($i))\r
+   {\r
+    if (($node->nodeType==XML_ELEMENT_NODE)||\r
+        (($node->nodeType==XML_TEXT_NODE)&&!ereg('^([[:cntrl:]]|[[:space:]])*$',$node->nodeValue)))\r
+     return false;\r
+    $i++;\r
+   }\r
+  return true;\r
+ }\r
+ function last_child() {return new php4DOMElement($this->myDOMNode->lastChild,$this->myOwnerDocument);}\r
+ function new_child($name,$content)\r
+ {\r
+  $mySubNode=$this->myDOMNode->ownerDocument->createElement($name);\r
+  $mySubNode->appendChild($this->myDOMNode->ownerDocument->createTextNode($content));\r
+  $this->myDOMNode->appendChild($mySubNode);\r
+  return new php4DOMElement($mySubNode,$this->myOwnerDocument);\r
+ }\r
+ function next_sibling() {return new php4DOMElement($this->myDOMNode->nextSibling,$this->myOwnerDocument);}\r
+ function node_name() {return $this->myDOMNode->localName;}\r
+ function node_type() {return $this->myDOMNode->nodeType;}\r
+ function node_value() {return $this->myDOMNode->nodeValue;}\r
+ function owner_document() {return $this->myOwnerDocument;}\r
+ function parent_node() {return new php4DOMElement($this->myDOMNode->parentNode,$this->myOwnerDocument);}\r
+ function prefix() {return $this->myDOMNode->prefix;}\r
+ function previous_sibling() {return new php4DOMElement($this->myDOMNode->previousSibling,$this->myOwnerDocument);}\r
+ function remove_child($oldchild) {return new php4DOMElement($this->myDOMNode->removeChild($oldchild->myDOMNode),$this->myOwnerDocument);}\r
+ function replace_child($oldnode,$newnode) {return new php4DOMElement($this->myDOMNode->replaceChild($oldnode->myDOMNode,$newnode->myDOMNode),$this->myOwnerDocument);}\r
+ function set_content($text)\r
+ {\r
+  if (($this->myDOMNode->hasChildNodes())&&($this->myDOMNode->firstChild->nodeType==XML_TEXT_NODE))\r
+   $this->myDOMNode->removeChild($this->myDOMNode->firstChild);\r
+  return $this->myDOMNode->appendChild($this->myDOMNode->ownerDocument->createTextNode($text));\r
+ }\r
+}\r
+\r
+class php4DOMNodelist\r
+{\r
+ var $myDOMNodelist;\r
+ var $nodeset;\r
+ function php4DOMNodelist($aDOMNodelist,$aOwnerDocument)\r
+ {\r
+  $this->myDOMNodelist=$aDOMNodelist;\r
+  $this->nodeset=array();\r
+  $i=0;\r
+  if (isset($this->myDOMNodelist))\r
+   while ($node=$this->myDOMNodelist->item($i))\r
+   {\r
+    $this->nodeset[]=new php4DOMElement($node,$aOwnerDocument);\r
+    $i++;\r
+   }\r
+ }\r
+}\r
+\r
+class php4DOMXPath\r
+{\r
+ var $myDOMXPath;\r
+ var $myOwnerDocument;\r
+ function php4DOMXPath($dom_document)\r
+ {\r
+  $this->myOwnerDocument=$dom_document;\r
+  $this->myDOMXPath=new DOMXPath($dom_document->myDOMNode);\r
+ }\r
+ function query($eval_str,$contextnode)\r
+ {\r
+  if (isset($contextnode)) return new php4DOMNodelist($this->myDOMXPath->query($eval_str,$contextnode->myDOMNode),$this->myOwnerDocument);\r
+  else return new php4DOMNodelist($this->myDOMXPath->query($eval_str),$this->myOwnerDocument);\r
+ }\r
+ function xpath_register_ns($prefix,$namespaceURI) {return $this->myDOMXPath->registerNamespace($prefix,$namespaceURI);}\r
+}\r
+\r
+if (extension_loaded('xsl'))\r
+{//See also: http://alexandre.alapetite.net/doc-alex/xslt-php4-php5/\r
+ function domxml_xslt_stylesheet($xslstring) {return new php4DomXsltStylesheet(DOMDocument::loadXML($xslstring));}\r
+ function domxml_xslt_stylesheet_doc($dom_document) {return new php4DomXsltStylesheet($dom_document);}\r
+ function domxml_xslt_stylesheet_file($xslfile) {return new php4DomXsltStylesheet(DOMDocument::load($xslfile));}\r
+ class php4DomXsltStylesheet\r
+ {\r
+  var $myxsltProcessor;\r
+  function php4DomXsltStylesheet($dom_document)\r
+  {\r
+   $this->myxsltProcessor=new xsltProcessor();\r
+   $this->myxsltProcessor->importStyleSheet($dom_document);\r
+  }\r
+  function process($dom_document,$xslt_parameters=array(),$param_is_xpath=false)\r
+  {\r
+   foreach ($xslt_parameters as $param=>$value)\r
+    $this->myxsltProcessor->setParameter('',$param,$value);\r
+   $myphp4DOMDocument=new php4DOMDocument();\r
+   $myphp4DOMDocument->myDOMNode=$this->myxsltProcessor->transformToDoc($dom_document->myDOMNode);\r
+   return $myphp4DOMDocument;\r
+  }\r
+  function result_dump_file($dom_document,$filename)\r
+  {\r
+   $html=$dom_document->myDOMNode->saveHTML();\r
+   file_put_contents($filename,$html);\r
+   return $html;\r
+  }\r
+  function result_dump_mem($dom_document) {return $dom_document->myDOMNode->saveHTML();}\r
+ }\r
+}\r
+?>
\ No newline at end of file
diff --git a/auth/cas/CAS/languages/english.php b/auth/cas/CAS/languages/english.php
new file mode 100644 (file)
index 0000000..c143450
--- /dev/null
@@ -0,0 +1,27 @@
+<?php\r
+\r
+/**\r
+ * @file languages/english.php\r
+ * @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>\r
+ * @sa @link internalLang Internationalization @endlink\r
+ * @ingroup internalLang\r
+ */\r
+\r
+$this->_strings = array(\r
+ CAS_STR_USING_SERVER \r
+ => 'using server',\r
+ CAS_STR_AUTHENTICATION_WANTED \r
+ => 'CAS Authentication wanted!',\r
+ CAS_STR_LOGOUT \r
+ => 'CAS logout wanted!',\r
+ CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED \r
+ => 'You should already have been redirected to the CAS server. Click <a href="%s">here</a> to continue.',\r
+ CAS_STR_AUTHENTICATION_FAILED \r
+ => 'CAS Authentication failed!',\r
+ CAS_STR_YOU_WERE_NOT_AUTHENTICATED \r
+ => '<p>You were not authenticated.</p><p>You may submit your request again by clicking <a href="%s">here</a>.</p><p>If the problem persists, you may contact <a href="mailto:%s">the administrator of this site</a>.</p>',\r
+ CAS_STR_SERVICE_UNAVAILABLE\r
+ => 'The service `<b>%s</b>\' is not available (<b>%s</b>).'\r
+);\r
+\r
+?>
\ No newline at end of file
diff --git a/auth/cas/CAS/languages/french.php b/auth/cas/CAS/languages/french.php
new file mode 100644 (file)
index 0000000..675a7fc
--- /dev/null
@@ -0,0 +1,28 @@
+<?php\r
+\r
+/**\r
+ * @file languages/english.php\r
+ * @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>\r
+ * @sa @link internalLang Internationalization @endlink\r
+ * @ingroup internalLang\r
+ */\r
+\r
+$this->_strings = array(\r
+ CAS_STR_USING_SERVER \r
+ => 'utilisant le serveur',\r
+ CAS_STR_AUTHENTICATION_WANTED \r
+ => 'Authentication CAS nécessaire&nbsp;!',\r
+ CAS_STR_LOGOUT \r
+ => 'Déconnexion demandée&nbsp;!',\r
+ CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED \r
+ => 'Vous auriez du etre redirigé(e) vers le serveur CAS. Cliquez <a href="%s">ici</a> pour continuer.',\r
+ CAS_STR_AUTHENTICATION_FAILED \r
+ => 'Authentification CAS infructueuse&nbsp;!',\r
+ CAS_STR_YOU_WERE_NOT_AUTHENTICATED \r
+ => '<p>Vous n\'avez pas été authentifié(e).</p><p>Vous pouvez soumettre votre requete à nouveau en cliquant <a href="%s">ici</a>.</p><p>Si le problème persiste, vous pouvez contacter <a href="mailto:%s">l\'administrateur de ce site</a>.</p>',\r
+ CAS_STR_SERVICE_UNAVAILABLE\r
+ => 'Le service `<b>%s</b>\' est indisponible (<b>%s</b>)'\r
+\r
+);\r
+\r
+?>
\ No newline at end of file
diff --git a/auth/cas/CAS/languages/german.php b/auth/cas/CAS/languages/german.php
new file mode 100644 (file)
index 0000000..29daeb3
--- /dev/null
@@ -0,0 +1,27 @@
+<?php\r
+\r
+/**\r
+ * @file languages/german.php\r
+ * @author Henrik Genssen <hg at mediafactory.de>\r
+ * @sa @link internalLang Internationalization @endlink\r
+ * @ingroup internalLang\r
+ */\r
+\r
+$this->_strings = array(\r
+ CAS_STR_USING_SERVER \r
+ => 'via Server',\r
+ CAS_STR_AUTHENTICATION_WANTED \r
+ => 'CAS Authentifizierung erforderlich!',\r
+ CAS_STR_LOGOUT \r
+ => 'CAS Abmeldung!',\r
+ CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED \r
+ => 'eigentlich h&auml;ten Sie zum CAS Server weitergeleitet werden sollen. Dr&uuml;cken Sie <a href="%s">hier</a> um fortzufahren.',\r
+ CAS_STR_AUTHENTICATION_FAILED \r
+ => 'CAS Anmeldung fehlgeschlagen!',\r
+ CAS_STR_YOU_WERE_NOT_AUTHENTICATED \r
+ => '<p>Sie wurden nicht angemeldet.</p><p>Um es erneut zu versuchen klicken Sie <a href="%s">hier</a>.</p><p>Wenn das Problem bestehen bleibt, kontkatieren Sie den <a href="mailto:%s">Administrator</a> dieser Seite.</p>',\r
+ CAS_STR_SERVICE_UNAVAILABLE\r
+ => 'Der Dienst `<b>%s</b>\' ist nicht verf&uuml;gbar (<b>%s</b>).'\r
+);\r
+\r
+?>
\ No newline at end of file
diff --git a/auth/cas/CAS/languages/greek.php b/auth/cas/CAS/languages/greek.php
new file mode 100644 (file)
index 0000000..c17b1d6
--- /dev/null
@@ -0,0 +1,27 @@
+<?php\r
+\r
+/**\r
+ * @file languages/greek.php\r
+ * @author Vangelis Haniotakis <haniotak at ucnet.uoc.gr>\r
+ * @sa @link internalLang Internationalization @endlink\r
+ * @ingroup internalLang\r
+ */\r
+\r
+$this->_strings = array(\r
+ CAS_STR_USING_SERVER \r
+ => '÷ñçóéìïðïéåßôáé ï åîõðçñåôçôÞò',\r
+ CAS_STR_AUTHENTICATION_WANTED \r
+ => 'Áðáéôåßôáé ç ôáõôïðïßçóç CAS!',\r
+ CAS_STR_LOGOUT \r
+ => 'Áðáéôåßôáé ç áðïóýíäåóç áðü CAS!',\r
+ CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED \r
+ => 'Èá Ýðñåðå íá åß÷áôå áíáêáôåõèõíèåß óôïí åîõðçñåôçôÞ CAS. ÊÜíôå êëßê <a href="%s">åäþ</a> ãéá íá óõíå÷ßóåôå.',\r
+ CAS_STR_AUTHENTICATION_FAILED \r
+ => 'Ç ôáõôïðïßçóç CAS áðÝôõ÷å!',\r
+ CAS_STR_YOU_WERE_NOT_AUTHENTICATED \r
+ => '<p>Äåí ôáõôïðïéçèÞêáôå.</p><p>Ìðïñåßôå íá îáíáðñïóðáèÞóåôå, êÜíïíôáò êëßê <a href="%s">åäþ</a>.</p><p>Åáí ôï ðñüâëçìá åðéìåßíåé, åëÜôå óå åðáöÞ ìå ôïí <a href="mailto:%s">äéá÷åéñéóôÞ</a>.</p>',\r
+ CAS_STR_SERVICE_UNAVAILABLE\r
+ => 'Ç õðçñåóßá `<b>%s</b>\' äåí åßíáé äéáèÝóéìç (<b>%s</b>).'\r
+);\r
+\r
+?>
\ No newline at end of file
diff --git a/auth/cas/CAS/languages/japanese.php b/auth/cas/CAS/languages/japanese.php
new file mode 100644 (file)
index 0000000..333bb17
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+/**
+ * @file languages/japanese.php
+ * @author fnorif (fnorif@yahoo.co.jp)
+ * 
+ * Now Encoding is EUC-JP and LF
+ **/
+
+$this->_strings = array(
+ CAS_STR_USING_SERVER 
+ => 'using server',
+ CAS_STR_AUTHENTICATION_WANTED 
+ => 'CAS¤Ë¤è¤ëǧ¾Ú¤ò¹Ô¤¤¤Þ¤¹',
+ CAS_STR_LOGOUT 
+ => 'CAS¤«¤é¥í¥°¥¢¥¦¥È¤·¤Þ¤¹!',
+ CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED 
+ => 'CAS¥µ¡¼¥Ð¤Ë¹Ô¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¡£¼«Æ°Åª¤ËžÁ÷¤µ¤ì¤Ê¤¤¾ì¹ç¤Ï <a href="%s">¤³¤Á¤é</a> ¤ò¥¯¥ê¥Ã¥¯¤·¤Æ³¹Ô¤·¤Þ¤¹¡£',
+ CAS_STR_AUTHENTICATION_FAILED 
+ => 'CAS¤Ë¤è¤ëǧ¾Ú¤Ë¼ºÇÔ¤·¤Þ¤·¤¿',
+ CAS_STR_YOU_WERE_NOT_AUTHENTICATED 
+ => '<p>ǧ¾Ú¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿.</p><p>¤â¤¦°ìÅ٥ꥯ¥¨¥¹¥È¤òÁ÷¿®¤¹¤ë¾ì¹ç¤Ï<a href="%s">¤³¤Á¤é</a>¤ò¥¯¥ê¥Ã¥¯.</p><p>ÌäÂ꤬²ò·è¤·¤Ê¤¤¾ì¹ç¤Ï <a href="mailto:%s">¤³¤Î¥µ¥¤¥È¤Î´ÉÍý¼Ô</a>¤ËÌ䤤¹ç¤ï¤»¤Æ¤¯¤À¤µ¤¤.</p>',
+ CAS_STR_SERVICE_UNAVAILABLE
+ => '¥µ¡¼¥Ó¥¹ `<b>%s</b>\' ¤ÏÍøÍѤǤ­¤Þ¤»¤ó (<b>%s</b>).'
+);
+
+?>
\ No newline at end of file
diff --git a/auth/cas/CAS/languages/languages.php b/auth/cas/CAS/languages/languages.php
new file mode 100644 (file)
index 0000000..2c6f8bb
--- /dev/null
@@ -0,0 +1,24 @@
+<?php\r
+\r
+/**\r
+ * @file languages/languages.php\r
+ * Internationalization constants\r
+ * @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>\r
+ * @sa @link internalLang Internationalization @endlink\r
+ * @ingroup internalLang\r
+ */\r
+\r
+//@{\r
+/**\r
+ * a phpCAS string index\r
+ */\r
+define("CAS_STR_USING_SERVER",                1);\r
+define("CAS_STR_AUTHENTICATION_WANTED",       2);\r
+define("CAS_STR_LOGOUT",                      3);\r
+define("CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED", 4);\r
+define("CAS_STR_AUTHENTICATION_FAILED",       5);\r
+define("CAS_STR_YOU_WERE_NOT_AUTHENTICATED",  6);\r
+define("CAS_STR_SERVICE_UNAVAILABLE",         7);\r
+//@}\r
+\r
+?>
\ No newline at end of file
diff --git a/auth/cas/cas_form.html b/auth/cas/cas_form.html
new file mode 100644 (file)
index 0000000..43eb05f
--- /dev/null
@@ -0,0 +1,12 @@
+\r
+<div class="loginbox clearfix">\r
+<div class="loginpanel">\r
+<div>\r
+<a href="<?php echo $CFG->wwwroot.'/login/index.php?authCAS=CAS';?>"><?php print_string("accesCAS","auth");?></a>\r
+</div>\r
+<br/>\r
+<div>\r
+<a href="<?php echo $CFG->wwwroot.'/login/index.php?authCAS=NOCAS';?>"><?php print_string("accesNOCAS","auth");?></a>\r
+</div>\r
+</div>\r
+</div>\r
diff --git a/auth/cas/cas_ldap_sync_users.php b/auth/cas/cas_ldap_sync_users.php
new file mode 100644 (file)
index 0000000..e4caec4
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+/** auth_ldap_sync_users.php
+ *  Modified for cas Module
+ *
+ * This script is meant to be called from a cronjob to sync moodle with the LDAP
+ * backend in those setups where the LDAP backend acts as 'master'.
+ *
+ * Recommended cron entry:
+ * # 5 minutes past 4am
+ * 5 4 * * * /usr/bin/php -c /etc/php4/cli/php.ini /var/www/moodle/auth/ldap/auth_ldap_sync_users.php
+ *
+ * Notes:
+ *   - If you have a large number of users, you may want to raise the memory limits
+ *     by passing -d momory_limit=256M
+ *   - For debugging & better logging, you are encouraged to use in the command line:
+ *     -d log_errors=1 -d error_reporting=E_ALL -d display_errors=0 -d html_errors=0
+ *
+ * Performance notes:
+ * We have optimized it as best as we could for Postgres and mySQL, with 27K students
+ * we have seen this take 10 minutes.
+ *
+ */
+
+
+if (isset($_SERVER['REMOTE_ADDR'])) {
+    error_log("should not be called from web server!");
+    exit;
+}
+
+$nomoodlecookie = true; // cookie not needed
+
+require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); // global moodle config file.
+
+require_once($CFG->dirroot.'/course/lib.php');
+require_once($CFG->dirroot.'/lib/blocklib.php');
+require_once($CFG->dirroot.'/mod/resource/lib.php');
+require_once($CFG->dirroot.'/mod/forum/lib.php');
+require_once($CFG->dirroot.'/lib/moodlelib.php');
+
+if (!is_enabled_auth('cas')) {
+    echo "Plugin not enabled!";
+    die;
+}
+
+$casauth = get_auth_plugin('cas');
+$casauth->sync_users(1000, true);
+
+?>
\ No newline at end of file
diff --git a/group/printgrouping.php b/group/printgrouping.php
new file mode 100644 (file)
index 0000000..7a42b04
--- /dev/null
@@ -0,0 +1,91 @@
+<?php
+/**
+ * Print groups in groupings, and members of groups.
+ *
+ * @copyright &copy; 2006 The Open University
+ * @author J.White AT open.ac.uk
+ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
+ * @package groups
+ */
+require_once('../config.php');
+require_once('lib.php');
+
+$success = true;
+
+$courseid   = required_param('courseid', PARAM_INT);
+$groupingid = required_param('groupingid', PARAM_INT);
+
+// Get the course information so we can print the header and
+// check the course id is valid
+$course = groups_get_course_info($courseid);
+if (! $course) {
+    $success = false;
+    print_error('invalidcourse');
+}
+
+
+if ($success) {
+    // Make sure that the user has permissions to manage groups.
+    require_login($courseid);
+
+    $context = get_context_instance(CONTEXT_COURSE, $courseid);
+    if (! has_capability('moodle/course:managegroups', $context)) {
+        redirect();
+    }
+
+    //( confirm_sesskey checks that this is a POST request.)
+
+    // Print the page and form
+    $strgroups = get_string('groups');
+    $strparticipants = get_string('participants');
+    print_header("$course->shortname: $strgroups", $course->fullname,
+                 "<a href=\"$CFG->wwwroot/course/view.php?id=$courseid\">$course->shortname</a> ".
+                 "-> <a href=\"$CFG->wwwroot/user/index.php?id=$courseid\">$strparticipants</a> ".
+                 "-> <a href=\"$CFG->wwwroot/group/index.php?id=$courseid\">$strgroups</a>".
+                 "-> ".get_string('printerfriendly', 'group'), "", "", true, '', user_login_string($course, $USER));
+
+    $groupingname = groups_get_grouping_name($groupingid);
+    if (! $groupingname) {
+        print_error('errorinvalidgrouping', 'group', groups_home_url($courseid));
+    } else {
+       // Print the name of the grouping
+        if (!empty($CFG->enablegroupings)) {
+            // NO GROUPINGS YET!
+           echo "<h1>$groupingname</h1>\n";
+        }
+    }
+
+    // Get the groups and group members for the grouping.
+    if (GROUP_NOT_IN_GROUPING == $groupingid) {
+        $groupids = groups_get_groups_not_in_any_grouping($courseid);
+    } else {
+        $groupids = groups_get_groups_in_grouping($groupingid);
+    }
+
+    if ($groupids) {
+        // Make sure the groups are in the right order
+        $group_names = groups_groupids_to_group_names($groupids);
+
+        // Go through each group in turn and print the group name and then the members
+        foreach ($group_names as $group) {
+
+            echo "<h2>{$group->name}</h2>\n";
+            $userids = groups_get_members($group->id);
+            if ($userids != false) {
+                // Make sure the users are in the right order
+                $user_names = groups_userids_to_user_names($userids, $courseid);
+
+                echo "<ol>\n";
+                foreach ($user_names as $user) {
+
+                    echo "<li>{$user->name}</li>\n";
+                }
+                echo "</ol>\n";
+            }
+        }
+    }
+
+    print_footer($course);
+}
+
+?>