'))
.append(create('')
.append(create(user.picture)))
diff --git a/enrol/paypal/ipn.php b/enrol/paypal/ipn.php
index 2a28c245e90..67fb06fa997 100644
--- a/enrol/paypal/ipn.php
+++ b/enrol/paypal/ipn.php
@@ -34,6 +34,7 @@ require("../../config.php");
require_once("lib.php");
require_once($CFG->libdir.'/eventslib.php');
require_once($CFG->libdir.'/enrollib.php');
+require_once($CFG->libdir . '/filelib.php');
/// Keep out casual intruders
@@ -89,14 +90,17 @@ if (! $plugin_instance = $DB->get_record("enrol", array("id"=>$data->instanceid,
$plugin = enrol_get_plugin('paypal');
/// Open a connection back to PayPal to validate the data
-$header = '';
-$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
-$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
-$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
+$c = new curl();
+$options = array(
+ 'returntransfer' => true,
+ 'httpheader' => array('application/x-www-form-urlencoded'),
+ 'timeout' => 30,
+);
$paypaladdr = empty($CFG->usepaypalsandbox) ? 'www.paypal.com' : 'www.sandbox.paypal.com';
-$fp = fsockopen ($paypaladdr, 80, $errno, $errstr, 30);
+$location = "https://$paypaladdr/cgi-bin/webscr";
+$result = $c->post($location, $req, $options);
-if (!$fp) { /// Could not open a socket to PayPal - FAIL
+if (!$result) { /// Could not connect to PayPal - FAIL
echo "
Error: could not access paypal.com
";
message_paypal_error_to_admin("Could not access paypal.com to verify payment", $data);
die;
@@ -104,12 +108,9 @@ if (!$fp) { /// Could not open a socket to PayPal - FAIL
/// Connection is OK, so now we post the data to validate it
-fputs ($fp, $header.$req);
-
/// Now read the response and check if everything is OK.
-while (!feof($fp)) {
- $result = fgets($fp, 1024);
+if (strlen($result) > 0) {
if (strcmp($result, "VERIFIED") == 0) { // VALID PAYMENT!
@@ -296,7 +297,6 @@ while (!feof($fp)) {
}
}
-fclose($fp);
exit;
diff --git a/filter/mediaplugin/tests/filter_test.php b/filter/mediaplugin/tests/filter_test.php
index 86876102204..c0044fb6ab5 100644
--- a/filter/mediaplugin/tests/filter_test.php
+++ b/filter/mediaplugin/tests/filter_test.php
@@ -57,6 +57,9 @@ class filter_mediaplugin_testcase extends advanced_testcase {
'test mpg',
'test',
'test file',
+ 'test file',
+ 'test file',
+ 'test file',
'test file',
'test flv',
'test file',
diff --git a/grade/edit/tree/category_form.php b/grade/edit/tree/category_form.php
index 5a1d8f7c30e..c155565ffe4 100644
--- a/grade/edit/tree/category_form.php
+++ b/grade/edit/tree/category_form.php
@@ -225,7 +225,7 @@ class edit_category_form extends moodleform {
$mform->addElement('header', 'headerparent', get_string('parentcategory', 'grades'));
$options = array();
- $default = '';
+ $default = -1;
$categories = grade_category::fetch_all(array('courseid'=>$COURSE->id));
foreach ($categories as $cat) {
@@ -238,6 +238,7 @@ class edit_category_form extends moodleform {
if (count($categories) > 1) {
$mform->addElement('select', 'parentcategory', get_string('parentcategory', 'grades'), $options);
+ $mform->setDefault('parentcategory', $default);
$mform->addElement('static', 'currentparentaggregation', get_string('currentparentaggregation', 'grades'));
}
diff --git a/install/lang/ko/install.php b/install/lang/ko/install.php
index c8574b51f01..0dd2488181e 100644
--- a/install/lang/ko/install.php
+++ b/install/lang/ko/install.php
@@ -34,7 +34,8 @@ $string['admindirname'] = '관리 디렉토리';
$string['availablelangs'] = '가능한 언어 목록';
$string['chooselanguagehead'] = '언어를 선택하시오';
$string['chooselanguagesub'] = '설치 과정에서 사용할 언어를 선택하십시오. 선택한 언어는 사이트의 기본 언어로 사용할 수 있으며, 추후 다른 언어로 바꿀 수도 있습니다.';
-$string['clialreadyinstalled'] = '이미 config.php 파일이 존재함. 사이트를 업데이트하려면 admin/cli/upgrade.php를 사용하십시오';
+$string['clialreadyconfigured'] = '만일 이 사이트를 설치하고 싶은데 이미 config.php파일이 있다면, admin/cli/install_database.php 를 이용하시기 바랍니다.';
+$string['clialreadyinstalled'] = '이미 config.php 파일이 존재함. 사이트를 업그레이드하려면 admin/cli/upgrade.php를 사용하시기 바랍니다.';
$string['cliinstallheader'] = '무들 {$a} 명령 입력 설치 프로그램';
$string['databasehost'] = '데이터베이스 호스트';
$string['databasename'] = '데이터베이스 명칭';
@@ -82,10 +83,10 @@ $string['phpversionhelp'] = '
무들은 적어도 PHP4.3.0 혹은 5.1.0. 이
PHP를 업그레이드 하시거나 새버전을 제공하는 웹호스팅 업체로 이전하기를 권합니다! (만일 5.0.x버전을 사용 중이라면 4.4.x 버전으로 다운그레이드 할 수 있습니다)
';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = '당신의 컴퓨터에 {$a->packname} {$a->packversion} 패키지를 성공적으로 설치한 것을 축하합니다!';
-$string['welcomep30'] = '{$a->installername} 의 이 릴리스는 무들이 그 속에서 동작하는 환경을 생성하기 위한 어플리케이션을 포함하고 있습니다.';
+$string['welcomep30'] = '{$a->installername} 판본은 무들이 동작하는 환경을 생성하기 위한 어플리케이션을 포함하고 있습니다.';
$string['welcomep40'] = '이 패키지는 무들 {$a->moodlerelease} ({$a->moodleversion}) 을 포함하고 있습니다.';
$string['welcomep50'] = '이 패키지에 있는 모든 어플리케이션을 사용하는 것은 각각의 라이센스에의해 지배받습니다. 완전한{$a->installername} 패키지는
공개 소스이며 GPL 라이선스에 의해 배포됩니다.';
-$string['welcomep60'] = '다음 페이지들은 당신의 컴퓨터에 무들을 설정하고 설치하는 길라잡이 역할을 할 것입니다. 기본 설정을 선택하거나 목적에 맞게 선택적으로 수정할 수 있습니다.';
+$string['welcomep60'] = '다음 페이지들은 컴퓨터에 무들을 설치하고 설정하는 길라잡이 역할을 할 것입니다. 기본 설정을 선택하거나 목적에 맞게 선택적으로 수정할 수 있습니다.';
$string['welcomep70'] = '무들 설정을 계속하기 위해서는 "다음" 버튼을 클릭하세요.';
$string['wwwroot'] = '웹 주소';
diff --git a/lang/en/admin.php b/lang/en/admin.php
index 7f8972a8564..5e7b0d98264 100644
--- a/lang/en/admin.php
+++ b/lang/en/admin.php
@@ -68,7 +68,7 @@ $string['availablelicenses'] = 'Available licences';
$string['backgroundcolour'] = 'Transparent colour';
$string['backups'] = 'Backups';
$string['backup_shortname'] = 'Use course name in backup filename';
-$string['backup_shortnamehelp'] = 'Use the course name as part of the backup filename instead of the course id number.';
+$string['backup_shortnamehelp'] = 'Use the course name as part of the backup filename.';
$string['badwordsconfig'] = 'Enter your list of bad words separated by commas.';
$string['badwordsdefault'] = 'If the custom list is empty, a default list from the language pack will be used.';
$string['badwordslist'] = 'Custom bad words list';
diff --git a/lang/en/backup.php b/lang/en/backup.php
index 5fde19e8722..e053c96bdee 100644
--- a/lang/en/backup.php
+++ b/lang/en/backup.php
@@ -163,6 +163,7 @@ $string['lockedbypermission'] = 'You don\'t have sufficient permissions to chang
$string['lockedbyconfig'] = 'This setting has been locked by the default backup settings';
$string['lockedbyhierarchy'] = 'Locked by dependencies';
$string['managefiles'] = 'Manage backup files';
+$string['missingfilesinpool'] = 'Some files could not be saved during the backup, it won\'t be possible to restore them.';
$string['moodleversion'] = 'Moodle version';
$string['moreresults'] = 'There are too many results, enter a more specific search.';
$string['nomatchingcourses'] = 'There are no courses to display';
@@ -177,6 +178,7 @@ $string['restoreactivity'] = 'Restore activity';
$string['restorecourse'] = 'Restore course';
$string['restorecoursesettings'] = 'Course settings';
$string['restoreexecutionsuccess'] = 'The course was restored successfully, clicking the continue button below will take you to view the course you restored.';
+$string['restorefileweremissing'] = 'Some files could not be restored because they were missing in the backup.';
$string['restorenewcoursefullname'] = 'New course name';
$string['restorenewcourseshortname'] = 'New course short name';
$string['restorenewcoursestartdate'] = 'New start date';
diff --git a/lang/en/block.php b/lang/en/block.php
index c0b8f01c1f6..a685f0ef0e6 100644
--- a/lang/en/block.php
+++ b/lang/en/block.php
@@ -37,6 +37,8 @@ $string['defaultregion'] = 'Default region';
$string['defaultregion_help'] = 'Themes may define one or more named block regions where blocks are displayed. This setting defines which of these you want this block to appear in by default. The region may be overridden on specific pages if required.';
$string['defaultweight'] = 'Default weight';
$string['defaultweight_help'] = 'The default weight allows you to choose roughly where you want the block to appear in the chosen region, either at the top or the bottom. The final location is calculated from all the blocks in that region (for example, only one block can actually be at the top). This value can be overridden on specific pages if required.';
+$string['deletecheck'] = 'Delete {$a} block?';
+$string['deleteblockcheck'] = 'Are you sure that you want to delete this block titled {$a}?';
$string['moveblockhere'] = 'Move block here';
$string['movingthisblockcancel'] = 'Moving this block ({$a})';
$string['onthispage'] = 'On this page';
diff --git a/lang/en/moodle.php b/lang/en/moodle.php
index 2fc4fac2df5..f7f308401d6 100644
--- a/lang/en/moodle.php
+++ b/lang/en/moodle.php
@@ -1802,6 +1802,7 @@ $string['virusfounduser'] = 'The file you have uploaded, {$a->filename}, has bee
$string['virusplaceholder'] = 'This file that has been uploaded was found to contain a virus and has been moved or deleted and the user notified.';
$string['visible'] = 'Visible';
$string['visibletostudents'] = 'Visible to {$a}';
+$string['warning'] = 'Warning';
$string['warningdeleteresource'] = 'Warning: {$a} is referred in a resource. Would you like to update the resource?';
$string['webpage'] = 'Web page';
$string['week'] = 'Week';
diff --git a/lib/accesslib.php b/lib/accesslib.php
index 523086375fe..2163435043d 100644
--- a/lib/accesslib.php
+++ b/lib/accesslib.php
@@ -6676,7 +6676,7 @@ class context_module extends context {
if ($withprefix){
$name = get_string('modulename', $cm->modname).': ';
}
- $name .= $mod->name;
+ $name .= format_string($mod->name, true, array('context' => $this));
}
}
return $name;
diff --git a/lib/adodb/adodb-active-record.inc.php b/lib/adodb/adodb-active-record.inc.php
index bf20639d3f4..9ea8175a4c4 100644
--- a/lib/adodb/adodb-active-record.inc.php
+++ b/lib/adodb/adodb-active-record.inc.php
@@ -1,7 +1,7 @@
RecordCount() is used.
@@ -3499,23 +3499,22 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1
*
* $upper 0 = lowercase, 1 = uppercase, 2 = whatever is returned by FetchField
*/
- function GetRowAssoc($upper=1)
+ function GetRowAssoc($upper=1)
{
$record = array();
- // if (!$this->fields) return $record;
-
- if (!$this->bind) {
+ if (!$this->bind) {
$this->GetAssocKeys($upper);
}
-
foreach($this->bind as $k => $v) {
- $record[$k] = $this->fields[$v];
+ if( isset( $this->fields[$v] ) ) {
+ $record[$k] = $this->fields[$v];
+ } else if (isset($this->fields[$k])) {
+ $record[$k] = $this->fields[$k];
+ }
}
-
return $record;
}
-
/**
* Clean up recordset
*
diff --git a/lib/adodb/drivers/adodb-access.inc.php b/lib/adodb/drivers/adodb-access.inc.php
index f5685f347e5..c9efb1fd8f8 100644
--- a/lib/adodb/drivers/adodb-access.inc.php
+++ b/lib/adodb/drivers/adodb-access.inc.php
@@ -1,6 +1,6 @@
$argDatabasename,'UID'=>$argUsername,'PWD'=>$argPassword);
+ $connectionInfo = $this->connectionInfo;
+ $connectionInfo["Database"]=$argDatabasename;
+ $connectionInfo["UID"]=$argUsername;
+ $connectionInfo["PWD"]=$argPassword;
if ($this->debug) error_log("connecting... hostname: $argHostname params: ".var_export($connectionInfo,true));
//if ($this->debug) error_log("_connectionID before: ".serialize($this->_connectionID));
if(!($this->_connectionID = sqlsrv_connect($argHostname,$connectionInfo))) {
diff --git a/lib/adodb/drivers/adodb-mssqlpo.inc.php b/lib/adodb/drivers/adodb-mssqlpo.inc.php
index 76dfe245a21..60bc9c7c3aa 100644
--- a/lib/adodb/drivers/adodb-mssqlpo.inc.php
+++ b/lib/adodb/drivers/adodb-mssqlpo.inc.php
@@ -1,6 +1,6 @@
rsPrefix .= 'ext_';
}
-
+
+
+ // SetCharSet - switch the client encoding
+ function SetCharSet($charset_name)
+ {
+ if (!function_exists('mysql_set_charset'))
+ return false;
+
+ if ($this->charSet !== $charset_name) {
+ $ok = @mysql_set_charset($charset_name,$this->_connectionID);
+ if ($ok) {
+ $this->charSet = $charset_name;
+ return true;
+ }
+ return false;
+ }
+ return true;
+ }
+
function ServerInfo()
{
$arr['description'] = ADOConnection::GetOne("select version()");
diff --git a/lib/adodb/drivers/adodb-mysqli.inc.php b/lib/adodb/drivers/adodb-mysqli.inc.php
index b1d5d4d35d8..bb556a131a9 100644
--- a/lib/adodb/drivers/adodb-mysqli.inc.php
+++ b/lib/adodb/drivers/adodb-mysqli.inc.php
@@ -1,6 +1,6 @@
_hasOCIFetchStatement = ADODB_PHPVER >= 0x4200;
+ $this->_hasOciFetchStatement = ADODB_PHPVER >= 0x4200;
if (defined('ADODB_EXTENSION')) $this->rsPrefix .= 'ext_';
}
@@ -201,7 +201,7 @@ NATSOFT.DOMAIN =
*/
function _connect($argHostname, $argUsername, $argPassword, $argDatabasename,$mode=0)
{
- if (!function_exists('OCIPLogon')) return null;
+ if (!function_exists('oci_pconnect')) return null;
#adodb_backtrace();
$this->_errorMsg = false;
@@ -235,22 +235,22 @@ NATSOFT.DOMAIN =
//if ($argHostname) print "
Connect: 1st argument should be left blank for $this->databaseType
";
if ($mode==1) {
$this->_connectionID = ($this->charSet) ?
- OCIPLogon($argUsername,$argPassword, $argDatabasename,$this->charSet)
+ oci_pconnect($argUsername,$argPassword, $argDatabasename,$this->charSet)
:
- OCIPLogon($argUsername,$argPassword, $argDatabasename)
+ oci_pconnect($argUsername,$argPassword, $argDatabasename)
;
- if ($this->_connectionID && $this->autoRollback) OCIrollback($this->_connectionID);
+ if ($this->_connectionID && $this->autoRollback) oci_rollback($this->_connectionID);
} else if ($mode==2) {
$this->_connectionID = ($this->charSet) ?
- OCINLogon($argUsername,$argPassword, $argDatabasename,$this->charSet)
+ oci_new_connect($argUsername,$argPassword, $argDatabasename,$this->charSet)
:
- OCINLogon($argUsername,$argPassword, $argDatabasename);
+ oci_new_connect($argUsername,$argPassword, $argDatabasename);
} else {
$this->_connectionID = ($this->charSet) ?
- OCILogon($argUsername,$argPassword, $argDatabasename,$this->charSet)
+ oci_connect($argUsername,$argPassword, $argDatabasename,$this->charSet)
:
- OCILogon($argUsername,$argPassword, $argDatabasename);
+ oci_connect($argUsername,$argPassword, $argDatabasename);
}
if (!$this->_connectionID) return false;
if ($this->_initdate) {
@@ -259,7 +259,7 @@ NATSOFT.DOMAIN =
// looks like:
// Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production With the Partitioning option JServer Release 8.1.7.0.0 - Production
- // $vers = OCIServerVersion($this->_connectionID);
+ // $vers = oci_server_version($this->_connectionID);
// if (strpos($vers,'8i') !== false) $this->ansiOuter = true;
return true;
}
@@ -267,7 +267,7 @@ NATSOFT.DOMAIN =
function ServerInfo()
{
$arr['compat'] = $this->GetOne('select value from sys.database_compatible_level');
- $arr['description'] = @OCIServerVersion($this->_connectionID);
+ $arr['description'] = @oci_server_version($this->_connectionID);
$arr['version'] = ADOConnection::_findvers($arr['description']);
return $arr;
}
@@ -285,7 +285,7 @@ NATSOFT.DOMAIN =
function _affectedrows()
{
- if (is_resource($this->_stmt)) return @OCIRowCount($this->_stmt);
+ if (is_resource($this->_stmt)) return @oci_num_rows($this->_stmt);
return 0;
}
@@ -386,6 +386,13 @@ NATSOFT.DOMAIN =
$false = false;
$rs = $this->Execute(sprintf("SELECT * FROM ALL_CONSTRAINTS WHERE UPPER(TABLE_NAME)='%s' AND CONSTRAINT_TYPE='P'",$table));
+ if (!is_object($rs)) {
+ if (isset($savem))
+ $this->SetFetchMode($savem);
+ $ADODB_FETCH_MODE = $save;
+ return $false;
+ }
+
if ($row = $rs->FetchRow())
$primary_key = $row[1]; //constraint_name
@@ -451,7 +458,7 @@ NATSOFT.DOMAIN =
if (!$ok) return $this->RollbackTrans();
if ($this->transCnt) $this->transCnt -= 1;
- $ret = OCIcommit($this->_connectionID);
+ $ret = oci_commit($this->_connectionID);
$this->_commit = OCI_COMMIT_ON_SUCCESS;
$this->autoCommit = true;
return $ret;
@@ -461,7 +468,7 @@ NATSOFT.DOMAIN =
{
if ($this->transOff) return true;
if ($this->transCnt) $this->transCnt -= 1;
- $ret = OCIrollback($this->_connectionID);
+ $ret = oci_rollback($this->_connectionID);
$this->_commit = OCI_COMMIT_ON_SUCCESS;
$this->autoCommit = true;
return $ret;
@@ -477,10 +484,10 @@ NATSOFT.DOMAIN =
{
if ($this->_errorMsg !== false) return $this->_errorMsg;
- if (is_resource($this->_stmt)) $arr = @OCIError($this->_stmt);
+ if (is_resource($this->_stmt)) $arr = @oci_error($this->_stmt);
if (empty($arr)) {
- if (is_resource($this->_connectionID)) $arr = @OCIError($this->_connectionID);
- else $arr = @OCIError();
+ if (is_resource($this->_connectionID)) $arr = @oci_error($this->_connectionID);
+ else $arr = @oci_error();
if ($arr === false) return '';
}
$this->_errorMsg = $arr['message'];
@@ -492,10 +499,10 @@ NATSOFT.DOMAIN =
{
if ($this->_errorCode !== false) return $this->_errorCode;
- if (is_resource($this->_stmt)) $arr = @OCIError($this->_stmt);
+ if (is_resource($this->_stmt)) $arr = @oci_error($this->_stmt);
if (empty($arr)) {
- $arr = @OCIError($this->_connectionID);
- if ($arr == false) $arr = @OCIError();
+ $arr = @oci_error($this->_connectionID);
+ if ($arr == false) $arr = @oci_error();
if ($arr == false) return '';
}
@@ -651,34 +658,34 @@ NATSOFT.DOMAIN =
foreach($inputarr as $k => $v) {
if (is_array($v)) {
if (sizeof($v) == 2) // suggested by g.giunta@libero.
- OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1]);
+ oci_bind_by_name($stmt,":$k",$inputarr[$k][0],$v[1]);
else
- OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]);
+ oci_bind_by_name($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]);
} else {
$len = -1;
if ($v === ' ') $len = 1;
- if (isset($bindarr)) { // is prepared sql, so no need to ocibindbyname again
+ if (isset($bindarr)) { // is prepared sql, so no need to oci_bind_by_name again
$bindarr[$k] = $v;
} else { // dynamic sql, so rebind every time
- OCIBindByName($stmt,":$k",$inputarr[$k],$len);
+ oci_bind_by_name($stmt,":$k",$inputarr[$k],$len);
}
}
}
}
- if (!OCIExecute($stmt, OCI_DEFAULT)) {
- OCIFreeStatement($stmt);
+ if (!oci_execute($stmt, OCI_DEFAULT)) {
+ oci_free_statement($stmt);
return $false;
}
- $ncols = OCINumCols($stmt);
+ $ncols = oci_num_fields($stmt);
for ( $i = 1; $i <= $ncols; $i++ ) {
- $cols[] = '"'.OCIColumnName($stmt, $i).'"';
+ $cols[] = '"'.oci_field_name($stmt, $i).'"';
}
$result = false;
- OCIFreeStatement($stmt);
+ oci_free_statement($stmt);
$fields = implode(',', $cols);
if ($nrows <= 0) $nrows = 999999999999;
else $nrows += $offset;
@@ -741,7 +748,7 @@ NATSOFT.DOMAIN =
else
$sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO :blob";
- $desc = OCINewDescriptor($this->_connectionID, OCI_D_LOB);
+ $desc = oci_new_descriptor($this->_connectionID, OCI_D_LOB);
$arr['blob'] = array($desc,-1,$type);
if ($this->session_sharing_force_blob) $this->Execute('ALTER SESSION SET CURSOR_SHARING=EXACT');
$commit = $this->autoCommit;
@@ -772,7 +779,7 @@ NATSOFT.DOMAIN =
else
$sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO :blob";
- $desc = OCINewDescriptor($this->_connectionID, OCI_D_LOB);
+ $desc = oci_new_descriptor($this->_connectionID, OCI_D_LOB);
$arr['blob'] = array($desc,-1,$type);
$this->BeginTrans();
@@ -873,12 +880,12 @@ NATSOFT.DOMAIN =
{
static $BINDNUM = 0;
- $stmt = OCIParse($this->_connectionID,$sql);
+ $stmt = oci_parse($this->_connectionID,$sql);
if (!$stmt) {
$this->_errorMsg = false;
$this->_errorCode = false;
- $arr = @OCIError($this->_connectionID);
+ $arr = @oci_error($this->_connectionID);
if ($arr === false) return false;
$this->_errorMsg = $arr['message'];
@@ -888,9 +895,9 @@ NATSOFT.DOMAIN =
$BINDNUM += 1;
- $sttype = @OCIStatementType($stmt);
+ $sttype = @oci_statement_type($stmt);
if ($sttype == 'BEGIN' || $sttype == 'DECLARE') {
- return array($sql,$stmt,0,$BINDNUM, ($cursor) ? OCINewCursor($this->_connectionID) : false);
+ return array($sql,$stmt,0,$BINDNUM, ($cursor) ? oci_new_cursor($this->_connectionID) : false);
}
return array($sql,$stmt,0,$BINDNUM);
}
@@ -912,7 +919,7 @@ NATSOFT.DOMAIN =
function ExecuteCursor($sql,$cursorName='rs',$params=false)
{
if (is_array($sql)) $stmt = $sql;
- else $stmt = ADODB_oci8::Prepare($sql,true); # true to allocate OCINewCursor
+ else $stmt = ADODB_oci8::Prepare($sql,true); # true to allocate oci_new_cursor
if (is_array($stmt) && sizeof($stmt) >= 5) {
$hasref = true;
@@ -928,7 +935,7 @@ NATSOFT.DOMAIN =
$rs = $this->Execute($stmt);
if ($rs) {
- if ($rs->databaseType == 'array') OCIFreeCursor($stmt[4]);
+ if ($rs->databaseType == 'array') oci_free_cursor($stmt[4]);
else if ($hasref) $rs->_refcursor = $stmt[4];
}
return $rs;
@@ -955,13 +962,13 @@ NATSOFT.DOMAIN =
Some timings:
** Test table has 3 cols, and 1 index. Test to insert 1000 records
- Time 0.6081s (1644.60 inserts/sec) with direct OCIParse/OCIExecute
+ Time 0.6081s (1644.60 inserts/sec) with direct oci_parse/oci_execute
Time 0.6341s (1577.16 inserts/sec) with ADOdb Prepare/Bind/Execute
Time 1.5533s ( 643.77 inserts/sec) with pure SQL using Execute
Now if PHP only had batch/bulk updating like Java or PL/SQL...
- Note that the order of parameters differs from OCIBindByName,
+ Note that the order of parameters differs from oci_bind_by_name,
because we default the names to :0, :1, :2
*/
function Bind(&$stmt,&$var,$size=4000,$type=false,$name=false,$isOutput=false)
@@ -970,12 +977,12 @@ NATSOFT.DOMAIN =
if (!is_array($stmt)) return false;
if (($type == OCI_B_CURSOR) && sizeof($stmt) >= 5) {
- return OCIBindByName($stmt[1],":".$name,$stmt[4],$size,$type);
+ return oci_bind_by_name($stmt[1],":".$name,$stmt[4],$size,$type);
}
if ($name == false) {
- if ($type !== false) $rez = OCIBindByName($stmt[1],":".$stmt[2],$var,$size,$type);
- else $rez = OCIBindByName($stmt[1],":".$stmt[2],$var,$size); // +1 byte for null terminator
+ if ($type !== false) $rez = oci_bind_by_name($stmt[1],":".$stmt[2],$var,$size,$type);
+ else $rez = oci_bind_by_name($stmt[1],":".$stmt[2],$var,$size); // +1 byte for null terminator
$stmt[2] += 1;
} else if (oci_lob_desc($type)) {
if ($this->debug) {
@@ -983,11 +990,11 @@ NATSOFT.DOMAIN =
}
//we have to create a new Descriptor here
$numlob = count($this->_refLOBs);
- $this->_refLOBs[$numlob]['LOB'] = OCINewDescriptor($this->_connectionID, oci_lob_desc($type));
+ $this->_refLOBs[$numlob]['LOB'] = oci_new_descriptor($this->_connectionID, oci_lob_desc($type));
$this->_refLOBs[$numlob]['TYPE'] = $isOutput;
$tmp = $this->_refLOBs[$numlob]['LOB'];
- $rez = OCIBindByName($stmt[1], ":".$name, $tmp, -1, $type);
+ $rez = oci_bind_by_name($stmt[1], ":".$name, $tmp, -1, $type);
if ($this->debug) {
ADOConnection::outp("Bind: descriptor has been allocated, var (".$name.") binded");
}
@@ -1008,8 +1015,8 @@ NATSOFT.DOMAIN =
if ($this->debug)
ADOConnection::outp("Bind: name = $name");
- if ($type !== false) $rez = OCIBindByName($stmt[1],":".$name,$var,$size,$type);
- else $rez = OCIBindByName($stmt[1],":".$name,$var,$size); // +1 byte for null terminator
+ if ($type !== false) $rez = oci_bind_by_name($stmt[1],":".$name,$var,$size,$type);
+ else $rez = oci_bind_by_name($stmt[1],":".$name,$var,$size); // +1 byte for null terminator
}
return $rez;
@@ -1034,7 +1041,7 @@ NATSOFT.DOMAIN =
@param [$maxLen] Holds an maximum length of the variable.
@param [$type] The data type of $var. Legal values depend on driver.
- See OCIBindByName documentation at php.net.
+ See oci_bind_by_name documentation at php.net.
*/
function Parameter(&$stmt,&$var,$name,$isOutput=false,$maxLen=4000,$type=false)
{
@@ -1066,7 +1073,7 @@ NATSOFT.DOMAIN =
if (is_array($sql)) { // is prepared sql
$stmt = $sql[1];
- // we try to bind to permanent array, so that OCIBindByName is persistent
+ // we try to bind to permanent array, so that oci_bind_by_name is persistent
// and carried out once only - note that max array element size is 4000 chars
if (is_array($inputarr)) {
$bindpos = $sql[3];
@@ -1078,27 +1085,27 @@ NATSOFT.DOMAIN =
$bindarr = array();
foreach($inputarr as $k => $v) {
$bindarr[$k] = $v;
- OCIBindByName($stmt,":$k",$bindarr[$k],is_string($v) && strlen($v)>4000 ? -1 : 4000);
+ oci_bind_by_name($stmt,":$k",$bindarr[$k],is_string($v) && strlen($v)>4000 ? -1 : 4000);
}
$this->_bind[$bindpos] = $bindarr;
}
}
} else {
- $stmt=OCIParse($this->_connectionID,$sql);
+ $stmt=oci_parse($this->_connectionID,$sql);
}
$this->_stmt = $stmt;
if (!$stmt) return false;
- if (defined('ADODB_PREFETCH_ROWS')) @OCISetPrefetch($stmt,ADODB_PREFETCH_ROWS);
+ if (defined('ADODB_PREFETCH_ROWS')) @oci_set_prefetch($stmt,ADODB_PREFETCH_ROWS);
if (is_array($inputarr)) {
foreach($inputarr as $k => $v) {
if (is_array($v)) {
if (sizeof($v) == 2) // suggested by g.giunta@libero.
- OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1]);
+ oci_bind_by_name($stmt,":$k",$inputarr[$k][0],$v[1]);
else
- OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]);
+ oci_bind_by_name($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]);
if ($this->debug==99) {
if (is_object($v[0]))
@@ -1110,10 +1117,10 @@ NATSOFT.DOMAIN =
} else {
$len = -1;
if ($v === ' ') $len = 1;
- if (isset($bindarr)) { // is prepared sql, so no need to ocibindbyname again
+ if (isset($bindarr)) { // is prepared sql, so no need to oci_bind_by_name again
$bindarr[$k] = $v;
} else { // dynamic sql, so rebind every time
- OCIBindByName($stmt,":$k",$inputarr[$k],$len);
+ oci_bind_by_name($stmt,":$k",$inputarr[$k],$len);
}
}
}
@@ -1121,8 +1128,8 @@ NATSOFT.DOMAIN =
$this->_errorMsg = false;
$this->_errorCode = false;
- if (OCIExecute($stmt,$this->_commit)) {
-//OCIInternalDebug(1);
+ if (oci_execute($stmt,$this->_commit)) {
+
if (count($this -> _refLOBs) > 0) {
foreach ($this -> _refLOBs as $key => $value) {
@@ -1144,7 +1151,7 @@ NATSOFT.DOMAIN =
}
}
- switch (@OCIStatementType($stmt)) {
+ switch (@oci_statement_type($stmt)) {
case "SELECT":
return $stmt;
@@ -1153,20 +1160,20 @@ NATSOFT.DOMAIN =
if (is_array($sql) && !empty($sql[4])) {
$cursor = $sql[4];
if (is_resource($cursor)) {
- $ok = OCIExecute($cursor);
+ $ok = oci_execute($cursor);
return $cursor;
}
return $stmt;
} else {
if (is_resource($stmt)) {
- OCIFreeStatement($stmt);
+ oci_free_statement($stmt);
return true;
}
return $stmt;
}
break;
default :
- // ociclose -- no because it could be used in a LOB?
+
return true;
}
}
@@ -1204,14 +1211,14 @@ NATSOFT.DOMAIN =
{
if (!$this->_connectionID) return;
- if (!$this->autoCommit) OCIRollback($this->_connectionID);
+ if (!$this->autoCommit) oci_rollback($this->_connectionID);
if (count($this->_refLOBs) > 0) {
foreach ($this ->_refLOBs as $key => $value) {
$this->_refLOBs[$key]['LOB']->free();
unset($this->_refLOBs[$key]);
}
}
- OCILogoff($this->_connectionID);
+ oci_close($this->_connectionID);
$this->_stmt = false;
$this->_connectionID = false;
@@ -1383,7 +1390,7 @@ class ADORecordset_oci8 extends ADORecordSet {
/*
// based on idea by Gaetano Giunta to detect unusual oracle errors
// see http://phplens.com/lens/lensforum/msgs.php?id=6771
- $err = OCIError($this->_queryID);
+ $err = oci_error($this->_queryID);
if ($err && $this->connection->debug) ADOConnection::outp($err);
*/
@@ -1402,7 +1409,7 @@ class ADORecordset_oci8 extends ADORecordSet {
function _initrs()
{
$this->_numOfRows = -1;
- $this->_numOfFields = OCInumcols($this->_queryID);
+ $this->_numOfFields = oci_num_fields($this->_queryID);
if ($this->_numOfFields>0) {
$this->_fieldobjs = array();
$max = $this->_numOfFields;
@@ -1419,13 +1426,13 @@ class ADORecordset_oci8 extends ADORecordSet {
{
$fld = new ADOFieldObject;
$fieldOffset += 1;
- $fld->name =OCIcolumnname($this->_queryID, $fieldOffset);
- $fld->type = OCIcolumntype($this->_queryID, $fieldOffset);
- $fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset);
+ $fld->name =oci_field_name($this->_queryID, $fieldOffset);
+ $fld->type = oci_field_type($this->_queryID, $fieldOffset);
+ $fld->max_length = oci_field_size($this->_queryID, $fieldOffset);
switch($fld->type) {
case 'NUMBER':
- $p = OCIColumnPrecision($this->_queryID, $fieldOffset);
- $sc = OCIColumnScale($this->_queryID, $fieldOffset);
+ $p = oci_field_precision($this->_queryID, $fieldOffset);
+ $sc = oci_field_scale($this->_queryID, $fieldOffset);
if ($p != 0 && $sc == 0) $fld->type = 'INT';
$fld->scale = $p;
break;
@@ -1439,7 +1446,7 @@ class ADORecordset_oci8 extends ADORecordSet {
return $fld;
}
- /* For some reason, OCIcolumnname fails when called after _initrs() so we cache it */
+ /* For some reason, oci_field_name fails when called after _initrs() so we cache it */
function FetchField($fieldOffset = -1)
{
return $this->_fieldobjs[$fieldOffset];
@@ -1455,7 +1462,7 @@ class ADORecordset_oci8 extends ADORecordSet {
if ($this->EOF) return false;
$this->_currentRow++;
- if(@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode))
+ if($this->fields = @oci_fetch_array($this->_queryID,$this->fetchMode))
return true;
$this->EOF = true;
@@ -1465,7 +1472,7 @@ class ADORecordset_oci8 extends ADORecordSet {
function MoveNext()
{
- if (@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) {
+ if ($this->fields = @oci_fetch_array($this->_queryID,$this->fetchMode)) {
$this->_currentRow += 1;
return true;
}
@@ -1485,18 +1492,18 @@ class ADORecordset_oci8 extends ADORecordSet {
if (true || !empty($ADODB_OCI8_GETARRAY)) {
# does not support $ADODB_ANSI_PADDING_OFF
- //OCI_RETURN_NULLS and OCI_RETURN_LOBS is set by OCIfetchstatement
+ //OCI_RETURN_NULLS and OCI_RETURN_LOBS is set by oci_fetch_all
switch($this->adodbFetchMode) {
case ADODB_FETCH_NUM:
- $ncols = @OCIfetchstatement($this->_queryID, $results, 0, $nRows, OCI_FETCHSTATEMENT_BY_ROW+OCI_NUM);
+ $ncols = @oci_fetch_all($this->_queryID, $results, 0, $nRows, oci_fetch_all_BY_ROW+OCI_NUM);
$results = array_merge(array($this->fields),$results);
return $results;
case ADODB_FETCH_ASSOC:
if (ADODB_ASSOC_CASE != 2 || $this->databaseType != 'oci8') break;
- $ncols = @OCIfetchstatement($this->_queryID, $assoc, 0, $nRows, OCI_FETCHSTATEMENT_BY_ROW);
+ $ncols = @oci_fetch_all($this->_queryID, $assoc, 0, $nRows, oci_fetch_all_BY_ROW);
$results = array_merge(array($this->fields),$assoc);
return $results;
@@ -1510,7 +1517,7 @@ class ADORecordset_oci8 extends ADORecordSet {
} */
- /* Optimize SelectLimit() by using OCIFetch() instead of OCIFetchInto() */
+ /* Optimize SelectLimit() by using oci_fetch() */
function GetArrayLimit($nrows,$offset=-1)
{
if ($offset <= 0) {
@@ -1519,9 +1526,9 @@ class ADORecordset_oci8 extends ADORecordSet {
}
$arr = array();
for ($i=1; $i < $offset; $i++)
- if (!@OCIFetch($this->_queryID)) return $arr;
+ if (!@oci_fetch($this->_queryID)) return $arr;
- if (!@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) return $arr;;
+ if (!$this->fields = @oci_fetch_array($this->_queryID,$this->fetchMode)) return $arr;;
$results = array();
$cnt = 0;
while (!$this->EOF && $nrows != $cnt) {
@@ -1556,7 +1563,7 @@ class ADORecordset_oci8 extends ADORecordSet {
function _fetch()
{
- return @OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode);
+ return $this->fields = @oci_fetch_array($this->_queryID,$this->fetchMode);
}
/* close() only needs to be called if you are worried about using too much memory while your script
@@ -1566,10 +1573,10 @@ class ADORecordset_oci8 extends ADORecordSet {
{
if ($this->connection->_stmt === $this->_queryID) $this->connection->_stmt = false;
if (!empty($this->_refcursor)) {
- OCIFreeCursor($this->_refcursor);
+ oci_free_cursor($this->_refcursor);
$this->_refcursor = false;
}
- @OCIFreeStatement($this->_queryID);
+ @oci_free_statement($this->_queryID);
$this->_queryID = false;
}
diff --git a/lib/adodb/drivers/adodb-oci805.inc.php b/lib/adodb/drivers/adodb-oci805.inc.php
index d8a5589db66..1f5c8c70818 100644
--- a/lib/adodb/drivers/adodb-oci805.inc.php
+++ b/lib/adodb/drivers/adodb-oci805.inc.php
@@ -1,6 +1,6 @@
debug && $argDatabasename && $this->databaseType != 'vfp') {
- ADOConnection::outp("For odbc Connect(), $argDatabasename is not used. Place dsn in 1st parameter.");
+ if (!empty($argDatabasename) && stristr($argDSN, 'Database=') === false) {
+ $argDSN = trim($argDSN);
+ $endDSN = substr($argDSN, strlen($argDSN) - 1);
+ if ($endDSN != ';') $argDSN .= ';';
+ $argDSN .= 'Database='.$argDatabasename;
}
+
if (isset($php_errormsg)) $php_errormsg = '';
if ($this->curmode === false) $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword);
else $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword,$this->curmode);
diff --git a/lib/adodb/drivers/adodb-odbc_db2.inc.php b/lib/adodb/drivers/adodb-odbc_db2.inc.php
index a05a3333ab2..fd039ba460c 100644
--- a/lib/adodb/drivers/adodb-odbc_db2.inc.php
+++ b/lib/adodb/drivers/adodb-odbc_db2.inc.php
@@ -1,6 +1,6 @@
-$ADODB_LANG_ARRAY = array (
- 'LANG' => 'ar',
- DB_ERROR => ' ',
- DB_ERROR_ALREADY_EXISTS => ' ',
- DB_ERROR_CANNOT_CREATE => ' ',
- DB_ERROR_CANNOT_DELETE => ' ',
- DB_ERROR_CANNOT_DROP => ' ',
- DB_ERROR_CONSTRAINT => ' ',
- DB_ERROR_DIVZERO => ' ',
- DB_ERROR_INVALID => ' ',
- DB_ERROR_INVALID_DATE => ' ',
- DB_ERROR_INVALID_NUMBER => ' ',
- DB_ERROR_MISMATCH => ' ',
- DB_ERROR_NODBSELECTED => ' ',
- DB_ERROR_NOSUCHFIELD => ' ',
- DB_ERROR_NOSUCHTABLE => ' ',
- DB_ERROR_NOT_CAPABLE => ' ',
- DB_ERROR_NOT_FOUND => ' ',
- DB_ERROR_NOT_LOCKED => ' ',
- DB_ERROR_SYNTAX => ' ',
- DB_ERROR_UNSUPPORTED => ' ',
- DB_ERROR_VALUE_COUNT_ON_ROW => ' ',
- DB_ERROR_INVALID_DSN => 'DSN ',
- DB_ERROR_CONNECT_FAILED => ' ',
- 0 => ' ', // DB_OK
- DB_ERROR_NEED_MORE_DATA => ' ',
- DB_ERROR_EXTENSION_NOT_FOUND=> ' ',
- DB_ERROR_NOSUCHDB => ' ',
- DB_ERROR_ACCESS_VIOLATION => ' '
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-bg.inc.php b/lib/adodb/lang/adodb-bg.inc.php
deleted file mode 100644
index ee307c13fed..00000000000
--- a/lib/adodb/lang/adodb-bg.inc.php
+++ /dev/null
@@ -1,37 +0,0 @@
-
-*/
-
-$ADODB_LANG_ARRAY = array (
- 'LANG' => 'bg',
- DB_ERROR => ' ',
- DB_ERROR_ALREADY_EXISTS => ' ',
- DB_ERROR_CANNOT_CREATE => ' ',
- DB_ERROR_CANNOT_DELETE => ' ',
- DB_ERROR_CANNOT_DROP => ' ',
- DB_ERROR_CONSTRAINT => ' ',
- DB_ERROR_DIVZERO => ' ',
- DB_ERROR_INVALID => '',
- DB_ERROR_INVALID_DATE => ' ',
- DB_ERROR_INVALID_NUMBER => ' ',
- DB_ERROR_MISMATCH => ' ',
- DB_ERROR_NODBSELECTED => ' ',
- DB_ERROR_NOSUCHFIELD => ' ',
- DB_ERROR_NOSUCHTABLE => ' ',
- DB_ERROR_NOT_CAPABLE => 'DB backend not capable',
- DB_ERROR_NOT_FOUND => ' ',
- DB_ERROR_NOT_LOCKED => ' ',
- DB_ERROR_SYNTAX => ' ',
- DB_ERROR_UNSUPPORTED => ' ',
- DB_ERROR_VALUE_COUNT_ON_ROW => ' ',
- DB_ERROR_INVALID_DSN => ' DSN',
- DB_ERROR_CONNECT_FAILED => ' ',
- 0 => ' ', // DB_OK
- DB_ERROR_NEED_MORE_DATA => ' ',
- DB_ERROR_EXTENSION_NOT_FOUND=> ' ',
- DB_ERROR_NOSUCHDB => ' ',
- DB_ERROR_ACCESS_VIOLATION => ' '
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-bgutf8.inc.php b/lib/adodb/lang/adodb-bgutf8.inc.php
deleted file mode 100644
index 5281ed53b65..00000000000
--- a/lib/adodb/lang/adodb-bgutf8.inc.php
+++ /dev/null
@@ -1,37 +0,0 @@
-
-*/
-
-$ADODB_LANG_ARRAY = array (
- 'LANG' => 'bgutf8',
- DB_ERROR => 'неизвестна грешка',
- DB_ERROR_ALREADY_EXISTS => 'вече съществува',
- DB_ERROR_CANNOT_CREATE => 'не може да бъде създадена',
- DB_ERROR_CANNOT_DELETE => 'не може да бъде изтрита',
- DB_ERROR_CANNOT_DROP => 'не може да бъде унищожена',
- DB_ERROR_CONSTRAINT => 'нарушено условие',
- DB_ERROR_DIVZERO => 'деление на нула',
- DB_ERROR_INVALID => 'неправилно',
- DB_ERROR_INVALID_DATE => 'некоректна дата или час',
- DB_ERROR_INVALID_NUMBER => 'невалиден номер',
- DB_ERROR_MISMATCH => 'погрешна употреба',
- DB_ERROR_NODBSELECTED => 'не е избрана база данни',
- DB_ERROR_NOSUCHFIELD => 'несъществуващо поле',
- DB_ERROR_NOSUCHTABLE => 'несъществуваща таблица',
- DB_ERROR_NOT_CAPABLE => 'DB backend not capable',
- DB_ERROR_NOT_FOUND => 'не е намерена',
- DB_ERROR_NOT_LOCKED => 'не е заключена',
- DB_ERROR_SYNTAX => 'грешен синтаксис',
- DB_ERROR_UNSUPPORTED => 'не се поддържа',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'некоректен брой колони в реда',
- DB_ERROR_INVALID_DSN => 'невалиден DSN',
- DB_ERROR_CONNECT_FAILED => 'връзката не може да бъде осъществена',
- 0 => 'няма грешки', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'предоставените данни са недостатъчни',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'разширението не е намерено',
- DB_ERROR_NOSUCHDB => 'несъществуваща база данни',
- DB_ERROR_ACCESS_VIOLATION => 'нямате достатъчно права'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-ca.inc.php b/lib/adodb/lang/adodb-ca.inc.php
deleted file mode 100644
index 3640ebd0bbb..00000000000
--- a/lib/adodb/lang/adodb-ca.inc.php
+++ /dev/null
@@ -1,34 +0,0 @@
- 'ca',
- DB_ERROR => 'error desconegut',
- DB_ERROR_ALREADY_EXISTS => 'ja existeix',
- DB_ERROR_CANNOT_CREATE => 'no es pot crear',
- DB_ERROR_CANNOT_DELETE => 'no es pot esborrar',
- DB_ERROR_CANNOT_DROP => 'no es pot eliminar',
- DB_ERROR_CONSTRAINT => 'violaci de constraint',
- DB_ERROR_DIVZERO => 'divisi per zero',
- DB_ERROR_INVALID => 'no s vlid',
- DB_ERROR_INVALID_DATE => 'la data o l\'hora no sn vlides',
- DB_ERROR_INVALID_NUMBER => 'el nombre no s vlid',
- DB_ERROR_MISMATCH => 'no hi ha coincidncia',
- DB_ERROR_NODBSELECTED => 'cap base de dades seleccionada',
- DB_ERROR_NOSUCHFIELD => 'camp inexistent',
- DB_ERROR_NOSUCHTABLE => 'taula inexistent',
- DB_ERROR_NOT_CAPABLE => 'l\'execuci secundria de DB no pot',
- DB_ERROR_NOT_FOUND => 'no trobat',
- DB_ERROR_NOT_LOCKED => 'no blocat',
- DB_ERROR_SYNTAX => 'error de sintaxi',
- DB_ERROR_UNSUPPORTED => 'no suportat',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'el nombre de columnes no coincideix amb el nombre de valors en la fila',
- DB_ERROR_INVALID_DSN => 'el DSN no s vlid',
- DB_ERROR_CONNECT_FAILED => 'connexi fallida',
- 0 => 'cap error', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'les dades subministrades sn insuficients',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'extensi no trobada',
- DB_ERROR_NOSUCHDB => 'base de dades inexistent',
- DB_ERROR_ACCESS_VIOLATION => 'permisos insuficients'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-cn.inc.php b/lib/adodb/lang/adodb-cn.inc.php
deleted file mode 100644
index eb8c7de55c2..00000000000
--- a/lib/adodb/lang/adodb-cn.inc.php
+++ /dev/null
@@ -1,35 +0,0 @@
- 'cn',
- DB_ERROR => 'δ֪',
- DB_ERROR_ALREADY_EXISTS => 'Ѿ',
- DB_ERROR_CANNOT_CREATE => 'ܴ',
- DB_ERROR_CANNOT_DELETE => 'ɾ',
- DB_ERROR_CANNOT_DROP => 'ܶ',
- DB_ERROR_CONSTRAINT => 'Լ',
- DB_ERROR_DIVZERO => '0',
- DB_ERROR_INVALID => 'Ч',
- DB_ERROR_INVALID_DATE => 'Чڻʱ',
- DB_ERROR_INVALID_NUMBER => 'Ч',
- DB_ERROR_MISMATCH => 'ƥ',
- DB_ERROR_NODBSELECTED => 'ûݿⱻѡ',
- DB_ERROR_NOSUCHFIELD => 'ûӦֶ',
- DB_ERROR_NOSUCHTABLE => 'ûӦı',
- DB_ERROR_NOT_CAPABLE => 'ݿ̨',
- DB_ERROR_NOT_FOUND => 'ûз',
- DB_ERROR_NOT_LOCKED => 'ûб',
- DB_ERROR_SYNTAX => '',
- DB_ERROR_UNSUPPORTED => '֧',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'ۼֵ',
- DB_ERROR_INVALID_DSN => 'ЧԴ (DSN)',
- DB_ERROR_CONNECT_FAILED => 'ʧ',
- 0 => 'ûд', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'ṩݲܷҪ',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'չûб',
- DB_ERROR_NOSUCHDB => 'ûӦݿ',
- DB_ERROR_ACCESS_VIOLATION => 'ûкʵȨ'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-cz.inc.php b/lib/adodb/lang/adodb-cz.inc.php
deleted file mode 100644
index 2424c2446b8..00000000000
--- a/lib/adodb/lang/adodb-cz.inc.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-$ADODB_LANG_ARRAY = array (
- 'LANG' => 'cz',
- DB_ERROR => 'neznm chyba',
- DB_ERROR_ALREADY_EXISTS => 'ji? existuje',
- DB_ERROR_CANNOT_CREATE => 'nelze vytvo?it',
- DB_ERROR_CANNOT_DELETE => 'nelze smazat',
- DB_ERROR_CANNOT_DROP => 'nelze odstranit',
- DB_ERROR_CONSTRAINT => 'poru?en omezujc podmnky',
- DB_ERROR_DIVZERO => 'd?len nulou',
- DB_ERROR_INVALID => 'neplatn',
- DB_ERROR_INVALID_DATE => 'neplatn datum nebo ?as',
- DB_ERROR_INVALID_NUMBER => 'neplatn ?slo',
- DB_ERROR_MISMATCH => 'nesouhlas',
- DB_ERROR_NODBSELECTED => '?dn databze nen vybrna',
- DB_ERROR_NOSUCHFIELD => 'pole nenalezeno',
- DB_ERROR_NOSUCHTABLE => 'tabulka nenalezena',
- DB_ERROR_NOT_CAPABLE => 'nepodporovno',
- DB_ERROR_NOT_FOUND => 'nenalezeno',
- DB_ERROR_NOT_LOCKED => 'nezam?eno',
- DB_ERROR_SYNTAX => 'syntaktick chyba',
- DB_ERROR_UNSUPPORTED => 'nepodporovno',
- DB_ERROR_VALUE_COUNT_ON_ROW => '',
- DB_ERROR_INVALID_DSN => 'neplatn DSN',
- DB_ERROR_CONNECT_FAILED => 'p?ipojen selhalo',
- 0 => 'bez chyb', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'mlo zdrojovch dat',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'roz??en nenalezeno',
- DB_ERROR_NOSUCHDB => 'databze neexistuje',
- DB_ERROR_ACCESS_VIOLATION => 'nedostate?n prva'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-da.inc.php b/lib/adodb/lang/adodb-da.inc.php
deleted file mode 100644
index ca0e72d6148..00000000000
--- a/lib/adodb/lang/adodb-da.inc.php
+++ /dev/null
@@ -1,33 +0,0 @@
- 'da',
- DB_ERROR => 'ukendt fejl',
- DB_ERROR_ALREADY_EXISTS => 'eksisterer allerede',
- DB_ERROR_CANNOT_CREATE => 'kan ikke oprette',
- DB_ERROR_CANNOT_DELETE => 'kan ikke slette',
- DB_ERROR_CANNOT_DROP => 'kan ikke droppe',
- DB_ERROR_CONSTRAINT => 'begrænsning krænket',
- DB_ERROR_DIVZERO => 'division med nul',
- DB_ERROR_INVALID => 'ugyldig',
- DB_ERROR_INVALID_DATE => 'ugyldig dato eller klokkeslet',
- DB_ERROR_INVALID_NUMBER => 'ugyldigt tal',
- DB_ERROR_MISMATCH => 'mismatch',
- DB_ERROR_NODBSELECTED => 'ingen database valgt',
- DB_ERROR_NOSUCHFIELD => 'felt findes ikke',
- DB_ERROR_NOSUCHTABLE => 'tabel findes ikke',
- DB_ERROR_NOT_CAPABLE => 'DB backend opgav',
- DB_ERROR_NOT_FOUND => 'ikke fundet',
- DB_ERROR_NOT_LOCKED => 'ikke låst',
- DB_ERROR_SYNTAX => 'syntaksfejl',
- DB_ERROR_UNSUPPORTED => 'ikke understøttet',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'resulterende antal felter svarer ikke til forespørgslens antal felter',
- DB_ERROR_INVALID_DSN => 'ugyldig DSN',
- DB_ERROR_CONNECT_FAILED => 'tilslutning mislykkedes',
- 0 => 'ingen fejl', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'utilstrækkelige data angivet',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'udvidelse ikke fundet',
- DB_ERROR_NOSUCHDB => 'database ikke fundet',
- DB_ERROR_ACCESS_VIOLATION => 'utilstrækkelige rettigheder'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-de.inc.php b/lib/adodb/lang/adodb-de.inc.php
deleted file mode 100644
index 244cb2f66ae..00000000000
--- a/lib/adodb/lang/adodb-de.inc.php
+++ /dev/null
@@ -1,33 +0,0 @@
-
-$ADODB_LANG_ARRAY = array (
- 'LANG' => 'de',
- DB_ERROR => 'Unbekannter Fehler',
- DB_ERROR_ALREADY_EXISTS => 'existiert bereits',
- DB_ERROR_CANNOT_CREATE => 'kann nicht erstellen',
- DB_ERROR_CANNOT_DELETE => 'kann nicht löschen',
- DB_ERROR_CANNOT_DROP => 'Tabelle oder Index konnte nicht gelöscht werden',
- DB_ERROR_CONSTRAINT => 'Constraint Verletzung',
- DB_ERROR_DIVZERO => 'Division durch Null',
- DB_ERROR_INVALID => 'ung¨ltig',
- DB_ERROR_INVALID_DATE => 'ung¨ltiges Datum oder Zeit',
- DB_ERROR_INVALID_NUMBER => 'ung¨ltige Zahl',
- DB_ERROR_MISMATCH => 'Unverträglichkeit',
- DB_ERROR_NODBSELECTED => 'keine Dantebank ausgewählt',
- DB_ERROR_NOSUCHFIELD => 'Feld nicht vorhanden',
- DB_ERROR_NOSUCHTABLE => 'Tabelle nicht vorhanden',
- DB_ERROR_NOT_CAPABLE => 'Funktion nicht installiert',
- DB_ERROR_NOT_FOUND => 'nicht gefunden',
- DB_ERROR_NOT_LOCKED => 'nicht gesperrt',
- DB_ERROR_SYNTAX => 'Syntaxfehler',
- DB_ERROR_UNSUPPORTED => 'nicht Unterst¨tzt',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'Anzahl der zur¨ckgelieferten Felder entspricht nicht der Anzahl der Felder in der Abfrage',
- DB_ERROR_INVALID_DSN => 'ung¨ltiger DSN',
- DB_ERROR_CONNECT_FAILED => 'Verbindung konnte nicht hergestellt werden',
- 0 => 'kein Fehler', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'Nicht gen¨gend Daten geliefert',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'erweiterung nicht gefunden',
- DB_ERROR_NOSUCHDB => 'keine Datenbank',
- DB_ERROR_ACCESS_VIOLATION => 'ungen¨gende Rechte'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-es.inc.php b/lib/adodb/lang/adodb-es.inc.php
deleted file mode 100644
index 1e0afbb40d9..00000000000
--- a/lib/adodb/lang/adodb-es.inc.php
+++ /dev/null
@@ -1,33 +0,0 @@
-
-$ADODB_LANG_ARRAY = array (
- 'LANG' => 'es',
- DB_ERROR => 'error desconocido',
- DB_ERROR_ALREADY_EXISTS => 'ya existe',
- DB_ERROR_CANNOT_CREATE => 'imposible crear',
- DB_ERROR_CANNOT_DELETE => 'imposible borrar',
- DB_ERROR_CANNOT_DROP => 'imposible hacer drop',
- DB_ERROR_CONSTRAINT => 'violacion de constraint',
- DB_ERROR_DIVZERO => 'division por cero',
- DB_ERROR_INVALID => 'invalido',
- DB_ERROR_INVALID_DATE => 'fecha u hora invalida',
- DB_ERROR_INVALID_NUMBER => 'numero invalido',
- DB_ERROR_MISMATCH => 'error',
- DB_ERROR_NODBSELECTED => 'no hay base de datos seleccionada',
- DB_ERROR_NOSUCHFIELD => 'campo invalido',
- DB_ERROR_NOSUCHTABLE => 'tabla no existe',
- DB_ERROR_NOT_CAPABLE => 'capacidad invalida para esta DB',
- DB_ERROR_NOT_FOUND => 'no encontrado',
- DB_ERROR_NOT_LOCKED => 'no bloqueado',
- DB_ERROR_SYNTAX => 'error de sintaxis',
- DB_ERROR_UNSUPPORTED => 'no soportado',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'la cantidad de columnas no corresponden a la cantidad de valores',
- DB_ERROR_INVALID_DSN => 'DSN invalido',
- DB_ERROR_CONNECT_FAILED => 'fallo la conexion',
- 0 => 'sin error', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'insuficientes datos',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'extension no encontrada',
- DB_ERROR_NOSUCHDB => 'base de datos no encontrada',
- DB_ERROR_ACCESS_VIOLATION => 'permisos insuficientes'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-esperanto.inc.php b/lib/adodb/lang/adodb-esperanto.inc.php
deleted file mode 100644
index 16ca00e2fac..00000000000
--- a/lib/adodb/lang/adodb-esperanto.inc.php
+++ /dev/null
@@ -1,35 +0,0 @@
- 'eo',
- DB_ERROR => 'nekonata eraro',
- DB_ERROR_ALREADY_EXISTS => 'jam ekzistas',
- DB_ERROR_CANNOT_CREATE => 'maleblas krei',
- DB_ERROR_CANNOT_DELETE => 'maleblas elimini',
- DB_ERROR_CANNOT_DROP => 'maleblas elimini (drop)',
- DB_ERROR_CONSTRAINT => 'rompo de kondicxoj de provo',
- DB_ERROR_DIVZERO => 'divido per 0 (nul)',
- DB_ERROR_INVALID => 'malregule',
- DB_ERROR_INVALID_DATE => 'malregula dato kaj tempo',
- DB_ERROR_INVALID_NUMBER => 'malregula nombro',
- DB_ERROR_MISMATCH => 'eraro',
- DB_ERROR_NODBSELECTED => 'datumbazo ne elektita',
- DB_ERROR_NOSUCHFIELD => 'ne ekzistas kampo',
- DB_ERROR_NOSUCHTABLE => 'ne ekzistas tabelo',
- DB_ERROR_NOT_CAPABLE => 'DBMS ne povas',
- DB_ERROR_NOT_FOUND => 'ne trovita',
- DB_ERROR_NOT_LOCKED => 'ne blokita',
- DB_ERROR_SYNTAX => 'sintaksa eraro',
- DB_ERROR_UNSUPPORTED => 'ne apogata',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'nombrilo de valoroj en linio',
- DB_ERROR_INVALID_DSN => 'malregula DSN-o',
- DB_ERROR_CONNECT_FAILED => 'konekto malsukcesa',
- 0 => 'cxio bone', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'ne suficxe da datumo',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'etendo ne trovita',
- DB_ERROR_NOSUCHDB => 'datumbazo ne ekzistas',
- DB_ERROR_ACCESS_VIOLATION => 'ne suficxe da rajto por atingo'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-fa.inc.php b/lib/adodb/lang/adodb-fa.inc.php
deleted file mode 100644
index 5594313575e..00000000000
--- a/lib/adodb/lang/adodb-fa.inc.php
+++ /dev/null
@@ -1,35 +0,0 @@
- */
-
-$ADODB_LANG_ARRAY = array (
- 'LANG' => 'fa',
- DB_ERROR => 'خطای ناشناخته',
- DB_ERROR_ALREADY_EXISTS => 'وجود دارد',
- DB_ERROR_CANNOT_CREATE => 'امکان create وجود ندارد',
- DB_ERROR_CANNOT_DELETE => 'امکان حذف وجود ندارد',
- DB_ERROR_CANNOT_DROP => 'امکان drop وجود ندارد',
- DB_ERROR_CONSTRAINT => 'نقض شرط',
- DB_ERROR_DIVZERO => 'تقسیم بر صفر',
- DB_ERROR_INVALID => 'نامعتبر',
- DB_ERROR_INVALID_DATE => 'زمان یا تاریخ نامعتبر',
- DB_ERROR_INVALID_NUMBER => 'عدد نامعتبر',
- DB_ERROR_MISMATCH => 'عدم مطابقت',
- DB_ERROR_NODBSELECTED => 'بانک اطلاعاتی انتخاب نشده است',
- DB_ERROR_NOSUCHFIELD => 'چنین ستونی وجود ندارد',
- DB_ERROR_NOSUCHTABLE => 'چنین جدولی وجود ندارد',
- DB_ERROR_NOT_CAPABLE => 'backend بانک اطلاعاتی قادر نیست',
- DB_ERROR_NOT_FOUND => 'پیدا نشد',
- DB_ERROR_NOT_LOCKED => 'قفل نشده',
- DB_ERROR_SYNTAX => 'خطای دستوری',
- DB_ERROR_UNSUPPORTED => 'پشتیبانی نمی شود',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'شمارش مقادیر روی ردیف',
- DB_ERROR_INVALID_DSN => 'DSN نامعتبر',
- DB_ERROR_CONNECT_FAILED => 'ارتباط برقرار نشد',
- 0 => 'بدون خطا', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'داده ناکافی است',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'extension پیدا نشد',
- DB_ERROR_NOSUCHDB => 'چنین بانک اطلاعاتی وجود ندارد',
- DB_ERROR_ACCESS_VIOLATION => 'حق دسترسی ناکافی'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-fr.inc.php b/lib/adodb/lang/adodb-fr.inc.php
deleted file mode 100644
index 066a2a5e5b7..00000000000
--- a/lib/adodb/lang/adodb-fr.inc.php
+++ /dev/null
@@ -1,33 +0,0 @@
- 'fr',
- DB_ERROR => 'erreur inconnue',
- DB_ERROR_ALREADY_EXISTS => 'existe déjà',
- DB_ERROR_CANNOT_CREATE => 'crétion impossible',
- DB_ERROR_CANNOT_DELETE => 'effacement impossible',
- DB_ERROR_CANNOT_DROP => 'suppression impossible',
- DB_ERROR_CONSTRAINT => 'violation de contrainte',
- DB_ERROR_DIVZERO => 'division par zéro',
- DB_ERROR_INVALID => 'invalide',
- DB_ERROR_INVALID_DATE => 'date ou heure invalide',
- DB_ERROR_INVALID_NUMBER => 'nombre invalide',
- DB_ERROR_MISMATCH => 'erreur de concordance',
- DB_ERROR_NODBSELECTED => 'pas de base de donnéessélectionnée',
- DB_ERROR_NOSUCHFIELD => 'nom de colonne invalide',
- DB_ERROR_NOSUCHTABLE => 'table ou vue inexistante',
- DB_ERROR_NOT_CAPABLE => 'fonction optionnelle non installée',
- DB_ERROR_NOT_FOUND => 'pas trouvé',
- DB_ERROR_NOT_LOCKED => 'non verrouillé',
- DB_ERROR_SYNTAX => 'erreur de syntaxe',
- DB_ERROR_UNSUPPORTED => 'non supporté',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'valeur insérée trop grande pour colonne',
- DB_ERROR_INVALID_DSN => 'DSN invalide',
- DB_ERROR_CONNECT_FAILED => 'échec à la connexion',
- 0 => "pas d'erreur", // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'données fournies insuffisantes',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'extension non trouvée',
- DB_ERROR_NOSUCHDB => 'base de données inconnue',
- DB_ERROR_ACCESS_VIOLATION => 'droits insuffisants'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-hu.inc.php b/lib/adodb/lang/adodb-hu.inc.php
deleted file mode 100644
index d6f0ef82da6..00000000000
--- a/lib/adodb/lang/adodb-hu.inc.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
-$ADODB_LANG_ARRAY = array (
- 'LANG' => 'hu',
- DB_ERROR => 'ismeretlen hiba',
- DB_ERROR_ALREADY_EXISTS => 'mr ltezik',
- DB_ERROR_CANNOT_CREATE => 'nem sikerlt ltrehozni',
- DB_ERROR_CANNOT_DELETE => 'nem sikerlt trlni',
- DB_ERROR_CANNOT_DROP => 'nem sikerlt eldobni',
- DB_ERROR_CONSTRAINT => 'szablyok megszegse',
- DB_ERROR_DIVZERO => 'oszts nullval',
- DB_ERROR_INVALID => 'rvnytelen',
- DB_ERROR_INVALID_DATE => 'rvnytelen dtum vagy id',
- DB_ERROR_INVALID_NUMBER => 'rvnytelen szm',
- DB_ERROR_MISMATCH => 'nem megfelel',
- DB_ERROR_NODBSELECTED => 'nincs kivlasztott adatbzis',
- DB_ERROR_NOSUCHFIELD => 'nincs ilyen mez',
- DB_ERROR_NOSUCHTABLE => 'nincs ilyen tbla',
- DB_ERROR_NOT_CAPABLE => 'DB backend nem tmogatja',
- DB_ERROR_NOT_FOUND => 'nem tallhat',
- DB_ERROR_NOT_LOCKED => 'nincs lezrva',
- DB_ERROR_SYNTAX => 'szintaktikai hiba',
- DB_ERROR_UNSUPPORTED => 'nem tmogatott',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'soron vgzett rtk szmlls',
- DB_ERROR_INVALID_DSN => 'hibs DSN',
- DB_ERROR_CONNECT_FAILED => 'sikertelen csatlakozs',
- 0 => 'nincs hiba', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'tl kevs az adat',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'bvtmny nem tallhat',
- DB_ERROR_NOSUCHDB => 'nincs ilyen adatbzis',
- DB_ERROR_ACCESS_VIOLATION => 'nincs jogosultsg'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-it.inc.php b/lib/adodb/lang/adodb-it.inc.php
deleted file mode 100644
index 20c5b93b630..00000000000
--- a/lib/adodb/lang/adodb-it.inc.php
+++ /dev/null
@@ -1,34 +0,0 @@
- 'it',
- DB_ERROR => 'errore sconosciuto',
- DB_ERROR_ALREADY_EXISTS => 'esiste già',
- DB_ERROR_CANNOT_CREATE => 'non posso creare',
- DB_ERROR_CANNOT_DELETE => 'non posso cancellare',
- DB_ERROR_CANNOT_DROP => 'non posso eliminare',
- DB_ERROR_CONSTRAINT => 'violazione constraint',
- DB_ERROR_DIVZERO => 'divisione per zero',
- DB_ERROR_INVALID => 'non valido',
- DB_ERROR_INVALID_DATE => 'data od ora non valida',
- DB_ERROR_INVALID_NUMBER => 'numero non valido',
- DB_ERROR_MISMATCH => 'diversi',
- DB_ERROR_NODBSELECTED => 'nessun database selezionato',
- DB_ERROR_NOSUCHFIELD => 'nessun campo trovato',
- DB_ERROR_NOSUCHTABLE => 'nessuna tabella trovata',
- DB_ERROR_NOT_CAPABLE => 'DB backend non abilitato',
- DB_ERROR_NOT_FOUND => 'non trovato',
- DB_ERROR_NOT_LOCKED => 'non bloccato',
- DB_ERROR_SYNTAX => 'errore di sintassi',
- DB_ERROR_UNSUPPORTED => 'non supportato',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'valore inserito troppo grande per una colonna',
- DB_ERROR_INVALID_DSN => 'DSN non valido',
- DB_ERROR_CONNECT_FAILED => 'connessione fallita',
- 0 => 'nessun errore', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'dati inseriti insufficienti',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'estensione non trovata',
- DB_ERROR_NOSUCHDB => 'database non trovato',
- DB_ERROR_ACCESS_VIOLATION => 'permessi insufficienti'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-nl.inc.php b/lib/adodb/lang/adodb-nl.inc.php
deleted file mode 100644
index abe77b5282e..00000000000
--- a/lib/adodb/lang/adodb-nl.inc.php
+++ /dev/null
@@ -1,33 +0,0 @@
- 'nl',
- DB_ERROR => 'onbekende fout',
- DB_ERROR_ALREADY_EXISTS => 'bestaat al',
- DB_ERROR_CANNOT_CREATE => 'kan niet aanmaken',
- DB_ERROR_CANNOT_DELETE => 'kan niet wissen',
- DB_ERROR_CANNOT_DROP => 'kan niet verwijderen',
- DB_ERROR_CONSTRAINT => 'constraint overtreding',
- DB_ERROR_DIVZERO => 'poging tot delen door nul',
- DB_ERROR_INVALID => 'ongeldig',
- DB_ERROR_INVALID_DATE => 'ongeldige datum of tijd',
- DB_ERROR_INVALID_NUMBER => 'ongeldig nummer',
- DB_ERROR_MISMATCH => 'is incorrect',
- DB_ERROR_NODBSELECTED => 'geen database geselecteerd',
- DB_ERROR_NOSUCHFIELD => 'onbekend veld',
- DB_ERROR_NOSUCHTABLE => 'onbekende tabel',
- DB_ERROR_NOT_CAPABLE => 'database systeem is niet tot uitvoer in staat',
- DB_ERROR_NOT_FOUND => 'niet gevonden',
- DB_ERROR_NOT_LOCKED => 'niet vergrendeld',
- DB_ERROR_SYNTAX => 'syntaxis fout',
- DB_ERROR_UNSUPPORTED => 'niet ondersteund',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'waarde telling op rij',
- DB_ERROR_INVALID_DSN => 'ongeldige DSN',
- DB_ERROR_CONNECT_FAILED => 'connectie mislukt',
- 0 => 'geen fout', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'onvoldoende data gegeven',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'extensie niet gevonden',
- DB_ERROR_NOSUCHDB => 'onbekende database',
- DB_ERROR_ACCESS_VIOLATION => 'onvoldoende rechten'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-pl.inc.php b/lib/adodb/lang/adodb-pl.inc.php
deleted file mode 100644
index 9d9e3906762..00000000000
--- a/lib/adodb/lang/adodb-pl.inc.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-$ADODB_LANG_ARRAY = array (
- 'LANG' => 'pl',
- DB_ERROR => 'niezidentyfikowany bd',
- DB_ERROR_ALREADY_EXISTS => 'ju istniej',
- DB_ERROR_CANNOT_CREATE => 'nie mona stworzy',
- DB_ERROR_CANNOT_DELETE => 'nie mona usun',
- DB_ERROR_CANNOT_DROP => 'nie mona porzuci',
- DB_ERROR_CONSTRAINT => 'pogwacenie uprawnie',
- DB_ERROR_DIVZERO => 'dzielenie przez zero',
- DB_ERROR_INVALID => 'bdny',
- DB_ERROR_INVALID_DATE => 'bdna godzina lub data',
- DB_ERROR_INVALID_NUMBER => 'bdny numer',
- DB_ERROR_MISMATCH => 'niedopasowanie',
- DB_ERROR_NODBSELECTED => 'baza danych nie zostaa wybrana',
- DB_ERROR_NOSUCHFIELD => 'nie znaleziono pola',
- DB_ERROR_NOSUCHTABLE => 'nie znaleziono tabeli',
- DB_ERROR_NOT_CAPABLE => 'nie zdolny',
- DB_ERROR_NOT_FOUND => 'nie znaleziono',
- DB_ERROR_NOT_LOCKED => 'nie zakmnity',
- DB_ERROR_SYNTAX => 'bd skadni',
- DB_ERROR_UNSUPPORTED => 'nie obsuguje',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'warto liczona w szeregu',
- DB_ERROR_INVALID_DSN => 'bdny DSN',
- DB_ERROR_CONNECT_FAILED => 'poczenie nie zostao zrealizowane',
- 0 => 'brak bdw', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'niedostateczna ilo informacji',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'nie znaleziono rozszerzenia',
- DB_ERROR_NOSUCHDB => 'nie znaleziono bazy',
- DB_ERROR_ACCESS_VIOLATION => 'niedostateczne uprawnienia'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-pt-br.inc.php b/lib/adodb/lang/adodb-pt-br.inc.php
deleted file mode 100644
index cd28f7e55ca..00000000000
--- a/lib/adodb/lang/adodb-pt-br.inc.php
+++ /dev/null
@@ -1,35 +0,0 @@
- 'pt-br',
- DB_ERROR => 'erro desconhecido',
- DB_ERROR_ALREADY_EXISTS => 'j existe',
- DB_ERROR_CANNOT_CREATE => 'impossvel criar',
- DB_ERROR_CANNOT_DELETE => 'impossvel exclur',
- DB_ERROR_CANNOT_DROP => 'impossvel remover',
- DB_ERROR_CONSTRAINT => 'violao do confinamente',
- DB_ERROR_DIVZERO => 'diviso por zero',
- DB_ERROR_INVALID => 'invlido',
- DB_ERROR_INVALID_DATE => 'data ou hora invlida',
- DB_ERROR_INVALID_NUMBER => 'nmero invlido',
- DB_ERROR_MISMATCH => 'erro',
- DB_ERROR_NODBSELECTED => 'nenhum banco de dados selecionado',
- DB_ERROR_NOSUCHFIELD => 'campo invlido',
- DB_ERROR_NOSUCHTABLE => 'tabela inexistente',
- DB_ERROR_NOT_CAPABLE => 'capacidade invlida para este BD',
- DB_ERROR_NOT_FOUND => 'no encontrado',
- DB_ERROR_NOT_LOCKED => 'no bloqueado',
- DB_ERROR_SYNTAX => 'erro de sintaxe',
- DB_ERROR_UNSUPPORTED =>
-'no suportado',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'a quantidade de colunas no corresponde ao de valores',
- DB_ERROR_INVALID_DSN => 'DSN invlido',
- DB_ERROR_CONNECT_FAILED => 'falha na conexo',
- 0 => 'sem erro', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'dados insuficientes',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'extenso no encontrada',
- DB_ERROR_NOSUCHDB => 'banco de dados no encontrado',
- DB_ERROR_ACCESS_VIOLATION => 'permisso insuficiente'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-ro.inc.php b/lib/adodb/lang/adodb-ro.inc.php
deleted file mode 100644
index bcd7d13228c..00000000000
--- a/lib/adodb/lang/adodb-ro.inc.php
+++ /dev/null
@@ -1,35 +0,0 @@
- */
-
-$ADODB_LANG_ARRAY = array (
- 'LANG' => 'ro',
- DB_ERROR => 'eroare necunoscuta',
- DB_ERROR_ALREADY_EXISTS => 'deja exista',
- DB_ERROR_CANNOT_CREATE => 'nu se poate creea',
- DB_ERROR_CANNOT_DELETE => 'nu se poate sterge',
- DB_ERROR_CANNOT_DROP => 'nu se poate executa drop',
- DB_ERROR_CONSTRAINT => 'violare de constrain',
- DB_ERROR_DIVZERO => 'se divide la zero',
- DB_ERROR_INVALID => 'invalid',
- DB_ERROR_INVALID_DATE => 'data sau timp invalide',
- DB_ERROR_INVALID_NUMBER => 'numar invalid',
- DB_ERROR_MISMATCH => 'nepotrivire-mismatch',
- DB_ERROR_NODBSELECTED => 'nu exista baza de date selectata',
- DB_ERROR_NOSUCHFIELD => 'camp inexistent',
- DB_ERROR_NOSUCHTABLE => 'tabela inexistenta',
- DB_ERROR_NOT_CAPABLE => 'functie optionala neinstalata',
- DB_ERROR_NOT_FOUND => 'negasit',
- DB_ERROR_NOT_LOCKED => 'neblocat',
- DB_ERROR_SYNTAX => 'eroare de sintaxa',
- DB_ERROR_UNSUPPORTED => 'nu e suportat',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'valoare prea mare pentru coloana',
- DB_ERROR_INVALID_DSN => 'DSN invalid',
- DB_ERROR_CONNECT_FAILED => 'conectare esuata',
- 0 => 'fara eroare', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'data introduse insuficiente',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'extensie negasita',
- DB_ERROR_NOSUCHDB => 'nu exista baza de date',
- DB_ERROR_ACCESS_VIOLATION => 'permisiuni insuficiente'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-ru1251.inc.php b/lib/adodb/lang/adodb-ru1251.inc.php
deleted file mode 100644
index 3a20538a020..00000000000
--- a/lib/adodb/lang/adodb-ru1251.inc.php
+++ /dev/null
@@ -1,35 +0,0 @@
- 'ru1251',
- DB_ERROR => ' ',
- DB_ERROR_ALREADY_EXISTS => ' ',
- DB_ERROR_CANNOT_CREATE => ' ',
- DB_ERROR_CANNOT_DELETE => ' ',
- DB_ERROR_CANNOT_DROP => ' (drop)',
- DB_ERROR_CONSTRAINT => ' ',
- DB_ERROR_DIVZERO => ' 0',
- DB_ERROR_INVALID => '',
- DB_ERROR_INVALID_DATE => ' ',
- DB_ERROR_INVALID_NUMBER => ' ',
- DB_ERROR_MISMATCH => '',
- DB_ERROR_NODBSELECTED => ' ',
- DB_ERROR_NOSUCHFIELD => ' ',
- DB_ERROR_NOSUCHTABLE => ' ',
- DB_ERROR_NOT_CAPABLE => ' ',
- DB_ERROR_NOT_FOUND => ' ',
- DB_ERROR_NOT_LOCKED => ' ',
- DB_ERROR_SYNTAX => ' ',
- DB_ERROR_UNSUPPORTED => ' ',
- DB_ERROR_VALUE_COUNT_ON_ROW => ' ',
- DB_ERROR_INVALID_DSN => ' DSN',
- DB_ERROR_CONNECT_FAILED => ' ',
- 0 => ' ', // DB_OK
- DB_ERROR_NEED_MORE_DATA => ' ',
- DB_ERROR_EXTENSION_NOT_FOUND=> ' ',
- DB_ERROR_NOSUCHDB => ' ',
- DB_ERROR_ACCESS_VIOLATION => ' '
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-sv.inc.php b/lib/adodb/lang/adodb-sv.inc.php
deleted file mode 100644
index a9fd69816c4..00000000000
--- a/lib/adodb/lang/adodb-sv.inc.php
+++ /dev/null
@@ -1,33 +0,0 @@
- 'en',
- DB_ERROR => 'Oknt fel',
- DB_ERROR_ALREADY_EXISTS => 'finns redan',
- DB_ERROR_CANNOT_CREATE => 'kan inte skapa',
- DB_ERROR_CANNOT_DELETE => 'kan inte ta bort',
- DB_ERROR_CANNOT_DROP => 'kan inte slppa',
- DB_ERROR_CONSTRAINT => 'begrnsning krnkt',
- DB_ERROR_DIVZERO => 'division med noll',
- DB_ERROR_INVALID => 'ogiltig',
- DB_ERROR_INVALID_DATE => 'ogiltigt datum eller tid',
- DB_ERROR_INVALID_NUMBER => 'ogiltigt tal',
- DB_ERROR_MISMATCH => 'felaktig matchning',
- DB_ERROR_NODBSELECTED => 'ingen databas vald',
- DB_ERROR_NOSUCHFIELD => 'inget sdant flt',
- DB_ERROR_NOSUCHTABLE => 'ingen sdan tabell',
- DB_ERROR_NOT_CAPABLE => 'DB backend klarar det inte',
- DB_ERROR_NOT_FOUND => 'finns inte',
- DB_ERROR_NOT_LOCKED => 'inte lst',
- DB_ERROR_SYNTAX => 'syntaxfel',
- DB_ERROR_UNSUPPORTED => 'stds ej',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'vrde rknat p rad',
- DB_ERROR_INVALID_DSN => 'ogiltig DSN',
- DB_ERROR_CONNECT_FAILED => 'anslutning misslyckades',
- 0 => 'inget fel', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'otillrckligt med data angivet',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'utkning hittades ej',
- DB_ERROR_NOSUCHDB => 'ingen sdan databas',
- DB_ERROR_ACCESS_VIOLATION => 'otillrckliga rttigheter'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-uk1251.inc.php b/lib/adodb/lang/adodb-uk1251.inc.php
deleted file mode 100644
index 675016d125e..00000000000
--- a/lib/adodb/lang/adodb-uk1251.inc.php
+++ /dev/null
@@ -1,35 +0,0 @@
- 'uk1251',
- DB_ERROR => ' ',
- DB_ERROR_ALREADY_EXISTS => ' ',
- DB_ERROR_CANNOT_CREATE => ' ',
- DB_ERROR_CANNOT_DELETE => ' ',
- DB_ERROR_CANNOT_DROP => ' (drop)',
- DB_ERROR_CONSTRAINT => ' ',
- DB_ERROR_DIVZERO => ' 0',
- DB_ERROR_INVALID => '',
- DB_ERROR_INVALID_DATE => ' ',
- DB_ERROR_INVALID_NUMBER => ' ',
- DB_ERROR_MISMATCH => '',
- DB_ERROR_NODBSELECTED => ' ',
- DB_ERROR_NOSUCHFIELD => ' ',
- DB_ERROR_NOSUCHTABLE => ' ',
- DB_ERROR_NOT_CAPABLE => ' ',
- DB_ERROR_NOT_FOUND => ' ',
- DB_ERROR_NOT_LOCKED => ' ',
- DB_ERROR_SYNTAX => ' ',
- DB_ERROR_UNSUPPORTED => ' ',
- DB_ERROR_VALUE_COUNT_ON_ROW => ' ',
- DB_ERROR_INVALID_DSN => ' DSN',
- DB_ERROR_CONNECT_FAILED => '\' ',
- 0 => ' ', // DB_OK
- DB_ERROR_NEED_MORE_DATA => ' ',
- DB_ERROR_EXTENSION_NOT_FOUND=> ' ',
- DB_ERROR_NOSUCHDB => ' ',
- DB_ERROR_ACCESS_VIOLATION => ' '
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb_th.inc.php b/lib/adodb/lang/adodb_th.inc.php
deleted file mode 100644
index 3fdd99705f7..00000000000
--- a/lib/adodb/lang/adodb_th.inc.php
+++ /dev/null
@@ -1,33 +0,0 @@
-
-$ADODB_LANG_ARRAY = array (
- 'LANG' => 'th',
- DB_ERROR => 'error ไม่รู้สาเหตุ',
- DB_ERROR_ALREADY_EXISTS => 'มี?ล้ว',
- DB_ERROR_CANNOT_CREATE => 'สร้างไม่ได้',
- DB_ERROR_CANNOT_DELETE => 'ลบไม่ได้',
- DB_ERROR_CANNOT_DROP => 'drop ไม่ได้',
- DB_ERROR_CONSTRAINT => 'constraint violation',
- DB_ERROR_DIVZERO => 'หา?ด้วยสู?',
- DB_ERROR_INVALID => 'ไม่ valid',
- DB_ERROR_INVALID_DATE => 'วันที่ เวลา ไม่ valid',
- DB_ERROR_INVALID_NUMBER => 'เลขไม่ valid',
- DB_ERROR_MISMATCH => 'mismatch',
- DB_ERROR_NODBSELECTED => 'ไม่ได้เลือ??านข้อมูล',
- DB_ERROR_NOSUCHFIELD => 'ไม่มีฟีลด์นี้',
- DB_ERROR_NOSUCHTABLE => 'ไม่มีตารางนี้',
- DB_ERROR_NOT_CAPABLE => 'DB backend not capable',
- DB_ERROR_NOT_FOUND => 'ไม่พบ',
- DB_ERROR_NOT_LOCKED => 'ไม่ได้ล๊อ?',
- DB_ERROR_SYNTAX => 'ผิด syntax',
- DB_ERROR_UNSUPPORTED => 'ไม่ support',
- DB_ERROR_VALUE_COUNT_ON_ROW => 'value count on row',
- DB_ERROR_INVALID_DSN => 'invalid DSN',
- DB_ERROR_CONNECT_FAILED => 'ไม่สามารถ connect',
- 0 => 'no error', // DB_OK
- DB_ERROR_NEED_MORE_DATA => 'ข้อมูลไม่เพียงพอ',
- DB_ERROR_EXTENSION_NOT_FOUND=> 'ไม่พบ extension',
- DB_ERROR_NOSUCHDB => 'ไม่มีข้อมูลนี้',
- DB_ERROR_ACCESS_VIOLATION => 'permissions ไม่พอ'
-);
-?>
\ No newline at end of file
diff --git a/lib/adodb/perf/perf-db2.inc.php b/lib/adodb/perf/perf-db2.inc.php
index 3823420a635..94ac8564a1a 100644
--- a/lib/adodb/perf/perf-db2.inc.php
+++ b/lib/adodb/perf/perf-db2.inc.php
@@ -1,6 +1,6 @@
page->blocks->find_instance($blockid);
-
if (!$block->user_can_edit() || !$this->page->user_can_edit_blocks() || !$block->user_can_addto($this->page)) {
throw new moodle_exception('nopermissions', '', $this->page->url->out(), get_string('deleteablock'));
}
- blocks_delete_instance($block->instance);
+ if (!$confirmdelete) {
+ $deletepage = new moodle_page();
+ $deletepage->set_pagelayout('admin');
+ $deletepage->set_course($this->page->course);
+ $deletepage->set_context($this->page->context);
+ if ($this->page->cm) {
+ $deletepage->set_cm($this->page->cm);
+ }
- // If the page URL was a guess, it will contain the bui_... param, so we must make sure it is not there.
- $this->page->ensure_param_not_in_url('bui_deleteid');
+ $deleteurlbase = str_replace($CFG->wwwroot . '/', '/', $this->page->url->out_omit_querystring());
+ $deleteurlparams = $this->page->url->params();
+ $deletepage->set_url($deleteurlbase, $deleteurlparams);
+ $deletepage->set_block_actions_done();
+ // At this point we are either going to redirect, or display the form, so
+ // overwrite global $PAGE ready for this. (Formslib refers to it.)
+ $PAGE = $deletepage;
+ //some functions like MoodleQuickForm::addHelpButton use $OUTPUT so we need to replace that too
+ $output = $deletepage->get_renderer('core');
+ $OUTPUT = $output;
- return true;
+ $site = get_site();
+ $blocktitle = $block->get_title();
+ $strdeletecheck = get_string('deletecheck', 'block', $blocktitle);
+ $message = get_string('deleteblockcheck', 'block', $blocktitle);
+
+ $PAGE->navbar->add($strdeletecheck);
+ $PAGE->set_title($blocktitle . ': ' . $strdeletecheck);
+ $PAGE->set_heading($site->fullname);
+ echo $OUTPUT->header();
+ $confirmurl = new moodle_url("$deletepage->url?", array('sesskey' => sesskey(), 'bui_deleteid' => $block->instance->id, 'bui_confirm' => 1));
+ $cancelurl = new moodle_url($deletepage->url);
+ $yesbutton = new single_button($confirmurl, get_string('yes'));
+ $nobutton = new single_button($cancelurl, get_string('no'));
+ echo $OUTPUT->confirm($message, $yesbutton, $nobutton);
+ echo $OUTPUT->footer();
+ // Make sure that nothing else happens after we have displayed this form.
+ exit;
+ } else {
+ blocks_delete_instance($block->instance);
+ // bui_deleteid and bui_confirm should not be in the PAGE url.
+ $this->page->ensure_param_not_in_url('bui_deleteid');
+ $this->page->ensure_param_not_in_url('bui_confirm');
+ return true;
+ }
}
/**
diff --git a/lib/conditionlib.php b/lib/conditionlib.php
index 7557190f189..96b958069d2 100644
--- a/lib/conditionlib.php
+++ b/lib/conditionlib.php
@@ -767,7 +767,7 @@ abstract class condition_info_base {
$course = $COURSE;
} else {
$course = $DB->get_record('course', array('id' => $this->item->course),
- 'id, enablecompletion, modinfo', MUST_EXIST);
+ 'id, enablecompletion, modinfo, sectioncache', MUST_EXIST);
}
foreach ($this->item->conditionscompletion as $cmid => $expectedcompletion) {
if (!$modinfo) {
@@ -929,7 +929,7 @@ abstract class condition_info_base {
$course = $COURSE;
} else {
$course = $DB->get_record('course', array('id' => $this->item->course),
- 'id, enablecompletion, modinfo', MUST_EXIST);
+ 'id, enablecompletion, modinfo, sectioncache', MUST_EXIST);
}
$completion = new completion_info($course);
diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php
index c243d8b00e6..f3b34fdc6c1 100644
--- a/lib/db/upgrade.php
+++ b/lib/db/upgrade.php
@@ -1184,5 +1184,15 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2012082300.02);
}
+ if ($oldversion < 2012090500.00) {
+ $subquery = 'SELECT b.id FROM {blog_external} b where b.id = ' . $DB->sql_cast_char2int('{post}.content', true);
+ $sql = 'DELETE FROM {post}
+ WHERE {post}.module = \'blog_external\'
+ AND NOT EXISTS (' . $subquery . ')
+ AND ' . $DB->sql_isnotempty('post', 'uniquehash', false, false);
+ $DB->execute($sql);
+ upgrade_main_savepoint(true, 2012090500.00);
+ }
+
return true;
}
diff --git a/lib/db/upgradelib.php b/lib/db/upgradelib.php
index 5103e0ba784..5247e49429e 100644
--- a/lib/db/upgradelib.php
+++ b/lib/db/upgradelib.php
@@ -30,6 +30,51 @@
defined('MOODLE_INTERNAL') || die();
+/**
+ * Returns all non-view and non-temp tables with sane names.
+ * Prints list of non-supported tables using $OUTPUT->notification()
+ *
+ * @return array
+ */
+function upgrade_mysql_get_supported_tables() {
+ global $OUTPUT, $DB;
+
+ $tables = array();
+ $patprefix = str_replace('_', '\\_', $DB->get_prefix());
+ $pregprefix = preg_quote($DB->get_prefix(), '/');
+
+ $sql = "SHOW FULL TABLES LIKE '$patprefix%'";
+ $rs = $DB->get_recordset_sql($sql);
+ foreach ($rs as $record) {
+ $record = array_change_key_case((array)$record, CASE_LOWER);
+ $type = $record['table_type'];
+ unset($record['table_type']);
+ $fullname = array_shift($record);
+
+ if ($pregprefix === '') {
+ $name = $fullname;
+ } else {
+ $count = null;
+ $name = preg_replace("/^$pregprefix/", '', $fullname, -1, $count);
+ if ($count !== 1) {
+ continue;
+ }
+ }
+
+ if (!preg_match("/^[a-z][a-z0-9_]*$/", $name)) {
+ echo $OUTPUT->notification("Database table with invalid name '$fullname' detected, skipping.", 'notifyproblem');
+ continue;
+ }
+ if ($type === 'VIEW') {
+ echo $OUTPUT->notification("Unsupported database table view '$fullname' detected, skipping.", 'notifyproblem');
+ continue;
+ }
+ $tables[$name] = $name;
+ }
+ $rs->close();
+
+ return $tables;
+}
/**
* Remove all signed numbers from current database - mysql only.
@@ -50,7 +95,7 @@ function upgrade_mysql_fix_unsigned_columns() {
$pbar = new progress_bar('mysqlconvertunsigned', 500, true);
$prefix = $DB->get_prefix();
- $tables = $DB->get_tables();
+ $tables = upgrade_mysql_get_supported_tables();
$tablecount = count($tables);
$i = 0;
@@ -115,7 +160,7 @@ function upgrade_mysql_fix_lob_columns() {
$pbar = new progress_bar('mysqlconvertlobs', 500, true);
$prefix = $DB->get_prefix();
- $tables = $DB->get_tables();
+ $tables = upgrade_mysql_get_supported_tables();
asort($tables);
$tablecount = count($tables);
diff --git a/lib/editor/tinymce/adminlib.php b/lib/editor/tinymce/adminlib.php
index b145f996743..2aa9caa49df 100644
--- a/lib/editor/tinymce/adminlib.php
+++ b/lib/editor/tinymce/adminlib.php
@@ -145,7 +145,7 @@ class tiynce_subplugins_settings extends admin_setting {
* @return string
*/
public function output_html($data, $query='') {
- global $CFG, $OUTPUT;
+ global $CFG, $OUTPUT, $PAGE;
require_once("$CFG->libdir/editorlib.php");
require_once("$CFG->libdir/pluginlib.php");
require_once(__DIR__.'/lib.php');
@@ -198,6 +198,13 @@ class tiynce_subplugins_settings extends admin_setting {
$displayname = html_writer::tag('span', $namestr, array('class'=>'dimmed_text'));
}
+ if ($PAGE->theme->resolve_image_location('icon', 'tinymce_' . $name)) {
+ $icon = $OUTPUT->pix_icon('icon', '', 'tinymce_' . $name, array('class' => 'smallicon pluginicon'));
+ } else {
+ $icon = $OUTPUT->pix_icon('spacer', '', 'moodle', array('class' => 'smallicon pluginicon noicon'));
+ }
+ $displayname = $icon . ' ' . $displayname;
+
// Add available buttons.
$buttons = implode(', ', $plugin->get_buttons());
$buttons = html_writer::tag('span', $buttons, array('class'=>'tinymcebuttons'));
diff --git a/lib/editor/tinymce/classes/plugin.php b/lib/editor/tinymce/classes/plugin.php
index 305f8275c7b..35fe4f2a3ed 100644
--- a/lib/editor/tinymce/classes/plugin.php
+++ b/lib/editor/tinymce/classes/plugin.php
@@ -152,7 +152,12 @@ abstract class editor_tinymce_plugin {
*/
protected function add_button_after(array &$params, $row, $button,
$after = '', $alwaysadd = true) {
- $this->check_row($row);
+
+ if ($this->is_button_present($params, $button)) {
+ return true;
+ }
+
+ $row = $this->fix_row($params, $row);
$field = 'theme_advanced_buttons' . $row;
$old = $params[$field];
@@ -190,7 +195,7 @@ abstract class editor_tinymce_plugin {
* to see if it succeeded.
*
* @param array $params TinyMCE init parameters array
- * @param int $row Row to add button to (1 to 3)
+ * @param int $row Row to add button to (1 to 10)
* @param string $button Identifier of button/plugin
* @param string $before Adds button directly before the named plugin
* @param bool $alwaysadd If specified $after string not found, add at start
@@ -198,7 +203,11 @@ abstract class editor_tinymce_plugin {
*/
protected function add_button_before(array &$params, $row, $button,
$before = '', $alwaysadd = true) {
- $this->check_row($row);
+
+ if ($this->is_button_present($params, $button)) {
+ return true;
+ }
+ $row = $this->fix_row($params, $row);
$field = 'theme_advanced_buttons' . $row;
$old = $params[$field];
@@ -226,15 +235,47 @@ abstract class editor_tinymce_plugin {
}
/**
- * Checks the row value is valid.
- *
- * @param int $row Row to add button to (1 to 3)
- * @throws coding_exception If row value is outside the range 1-3
+ * Tests if button already present.
+ * @param array $params
+ * @param string $button
+ * @return bool
*/
- private function check_row($row) {
- if ($row < 1 || $row > 3) {
- throw new coding_exception("Invalid row option: $row");
+ private function is_button_present(array $params, $button) {
+ for($i=1; $i<=10; $i++) {
+ $field = 'theme_advanced_buttons' . $i;
+ if (!isset($params[$field])) {
+ continue;
+ }
+ $buttons = explode(',', $params[$field]);
+ if (in_array($button, $buttons)) {
+ return true;
+ }
}
+ return false;
+ }
+
+ /**
+ * Checks the row value is valid, fix if necessary.
+ *
+ * @param array $params TinyMCE init parameters array
+ * @param int $row Row to add button if exists
+ * @return int requested row if exists, lower number if does not exist.
+ */
+ private function fix_row(array &$params, $row) {
+ $row = ($row < 1) ? 1 : (int)$row;
+ $row = ($row > 10) ? 10 : $row;
+
+ $field = 'theme_advanced_buttons' . $row;
+ if (isset($params[$field])) {
+ return $row;
+ }
+ for($i=$row; $i>=1; $i--) {
+ if (isset($params[$field])) {
+ return $row;
+ }
+ }
+ // This should not happen.
+ return 1;
}
/**
diff --git a/lib/editor/tinymce/db/upgrade.php b/lib/editor/tinymce/db/upgrade.php
new file mode 100644
index 00000000000..42d931e7807
--- /dev/null
+++ b/lib/editor/tinymce/db/upgrade.php
@@ -0,0 +1,41 @@
+.
+
+/**
+ * TinyMCE editor integration upgrade.
+ *
+ * @package editor_tinymce
+ * @copyright 2012 Petr Skoda {@link http://skodak.org}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+function xmldb_editor_tinymce_upgrade($oldversion) {
+ global $CFG, $DB;
+
+ $dbman = $DB->get_manager();
+
+
+ if ($oldversion < 2012083100) {
+ // Reset redesigned editor toolbar setting.
+ unset_config('customtoolbar', 'editor_tinymce');
+ upgrade_plugin_savepoint(true, 2012083100, 'editor', 'tinymce');
+ }
+
+
+ return true;
+}
diff --git a/lib/editor/tinymce/lang/en/editor_tinymce.php b/lib/editor/tinymce/lang/en/editor_tinymce.php
index d08d0f11745..fa01e4e1a12 100644
--- a/lib/editor/tinymce/lang/en/editor_tinymce.php
+++ b/lib/editor/tinymce/lang/en/editor_tinymce.php
@@ -27,8 +27,8 @@
$string['availablebuttons'] = 'Available buttons';
$string['common:browseimage'] = 'Find or upload an image...';
$string['common:browsemedia'] = 'Find or upload a sound, video or applet...';
-$string['customtoolbar'] = 'Custom editor toolbar';
-$string['customtoolbar_desc'] = 'Each line contains a list of comma separated button names, use "|" as a group separator. Leave empty if you want standard toolbar. See {$a} for the list of default TinyMCE buttons.';
+$string['customtoolbar'] = 'Editor toolbar';
+$string['customtoolbar_desc'] = 'Each line contains a list of comma separated button names, use "|" as a group separator, empty lines are ignored. See {$a} for the list of default TinyMCE buttons.';
$string['fontselectlist'] = 'Available fonts list';
$string['media_dlg:filename'] = 'Filename';
$string['pluginname'] = 'TinyMCE HTML editor';
diff --git a/lib/editor/tinymce/lib.php b/lib/editor/tinymce/lib.php
index d079dae7498..ae784d3a1d9 100644
--- a/lib/editor/tinymce/lib.php
+++ b/lib/editor/tinymce/lib.php
@@ -127,7 +127,6 @@ class tinymce_texteditor extends texteditor {
}
$fontselectlist = empty($config->fontselectlist) ? '' : $config->fontselectlist;
- $fontbutton = ($fontselectlist === '') ? '' : 'fontselect,';
$params = array(
'moodle_config' => $config,
@@ -154,13 +153,6 @@ class tinymce_texteditor extends texteditor {
'theme_advanced_font_sizes' => "1,2,3,4,5,6,7",
'theme_advanced_layout_manager' => "SimpleLayout",
'theme_advanced_toolbar_align' => "left",
- 'theme_advanced_buttons1' => $fontbutton . 'fontsizeselect,formatselect,|,' .
- 'undo,redo,|,search,replace,|,fullscreen',
- 'theme_advanced_buttons2' => 'bold,italic,underline,strikethrough,sub,sup,|,' .
- 'justifyleft,justifycenter,justifyright,|,' .
- 'cleanup,removeformat,pastetext,pasteword,|,forecolor,backcolor,|,ltr,rtl',
- 'theme_advanced_buttons3' => 'bullist,numlist,outdent,indent,|,' .
- 'link,unlink,|,image,nonbreaking,charmap,table,|,code',
'theme_advanced_fonts' => $fontselectlist,
'theme_advanced_resize_horizontal' => true,
'theme_advanced_resizing' => true,
@@ -170,6 +162,19 @@ class tinymce_texteditor extends texteditor {
'theme_advanced_statusbar_location' => "bottom",
);
+ // Should we override the default toolbar layout unconditionally?
+ $customtoolbar = self::parse_toolbar_setting($config->customtoolbar);
+ if ($customtoolbar) {
+ $i = 1;
+ foreach ($customtoolbar as $line) {
+ $params['theme_advanced_buttons'.$i] = $line;
+ $i++;
+ }
+ } else {
+ // At least one line is required.
+ $params['theme_advanced_buttons1'] = '';
+ }
+
if (!empty($options['legacy']) or !empty($options['noclean']) or !empty($options['trusted'])) {
// now deal somehow with non-standard tags, people scream when we do not make moodle code xtml strict,
// but they scream even more when we strip all tags that are not strict :-(
@@ -188,20 +193,6 @@ class tinymce_texteditor extends texteditor {
// Allow plugins to adjust parameters.
editor_tinymce_plugin::all_update_init_params($params, $context, $options);
- // Should we override the default toolbar layout unconditionally?
- $customtoolbar = self::parse_toolbar_setting($config->customtoolbar);
- if ($customtoolbar) {
- unset($params['theme_advanced_buttons1']);
- unset($params['theme_advanced_buttons2']);
- unset($params['theme_advanced_buttons3']);
- unset($params['theme_advanced_buttons4']);
- $i = 1;
- foreach ($customtoolbar as $line) {
- $params['theme_advanced_buttons'.$i] = $line;
- $i++;
- }
- }
-
// Remove temporary parameters.
unset($params['moodle_config']);
@@ -221,6 +212,7 @@ class tinymce_texteditor extends texteditor {
}
$customtoolbar = str_replace("\r", "\n", $customtoolbar);
$customtoolbar = strtolower($customtoolbar);
+ $i = 0;
foreach (explode("\n", $customtoolbar) as $line) {
$line = preg_replace('/[^a-z0-9_,\|\-]/', ',', $line);
$line = str_replace('|', ',|,', $line);
@@ -229,7 +221,13 @@ class tinymce_texteditor extends texteditor {
if ($line === '') {
continue;
}
- $result[] = $line;
+ if ($i == 10) {
+ // Maximum is ten lines, merge the rest to the last line.
+ $result[9] = $result[9].','.$line;
+ } else {
+ $result[] = $line;
+ $i++;
+ }
}
return $result;
}
diff --git a/lib/editor/tinymce/plugins/dragmath/pix/icon.png b/lib/editor/tinymce/plugins/dragmath/pix/icon.png
new file mode 100644
index 00000000000..3fd55ee7361
Binary files /dev/null and b/lib/editor/tinymce/plugins/dragmath/pix/icon.png differ
diff --git a/lib/editor/tinymce/plugins/moodleemoticon/pix/icon.png b/lib/editor/tinymce/plugins/moodleemoticon/pix/icon.png
new file mode 100644
index 00000000000..6d6ffc69393
Binary files /dev/null and b/lib/editor/tinymce/plugins/moodleemoticon/pix/icon.png differ
diff --git a/lib/editor/tinymce/plugins/moodleimage/pix/icon.png b/lib/editor/tinymce/plugins/moodleimage/pix/icon.png
new file mode 100644
index 00000000000..60bc72349fb
Binary files /dev/null and b/lib/editor/tinymce/plugins/moodleimage/pix/icon.png differ
diff --git a/lib/editor/tinymce/plugins/moodlemedia/pix/icon.png b/lib/editor/tinymce/plugins/moodlemedia/pix/icon.png
new file mode 100644
index 00000000000..c7ebc40d3ea
Binary files /dev/null and b/lib/editor/tinymce/plugins/moodlemedia/pix/icon.png differ
diff --git a/lib/editor/tinymce/plugins/moodlenolink/pix/icon.png b/lib/editor/tinymce/plugins/moodlenolink/pix/icon.png
new file mode 100644
index 00000000000..3f21ab4b4ea
Binary files /dev/null and b/lib/editor/tinymce/plugins/moodlenolink/pix/icon.png differ
diff --git a/lib/editor/tinymce/plugins/spellchecker/pix/icon.png b/lib/editor/tinymce/plugins/spellchecker/pix/icon.png
new file mode 100644
index 00000000000..7124c6acb0d
Binary files /dev/null and b/lib/editor/tinymce/plugins/spellchecker/pix/icon.png differ
diff --git a/lib/editor/tinymce/settings.php b/lib/editor/tinymce/settings.php
index d7ffb88332d..56ee3d03fab 100644
--- a/lib/editor/tinymce/settings.php
+++ b/lib/editor/tinymce/settings.php
@@ -31,8 +31,13 @@ if ($ADMIN->fulltree) {
require_once(__DIR__.'/adminlib.php');
$settings->add(new tiynce_subplugins_settings());
$settings->add(new admin_setting_heading('tinymcegeneralheader', new lang_string('settings'), ''));
+ $default = "fontselect,fontsizeselect,formatselect,|,undo,redo,|,search,replace,|,fullscreen
+
+bold,italic,underline,strikethrough,sub,sup,|,justifyleft,justifycenter,justifyright,|,cleanup,removeformat,pastetext,pasteword,|,forecolor,backcolor,|,ltr,rtl
+
+bullist,numlist,outdent,indent,|,link,unlink,|,image,nonbreaking,charmap,table,|,code";
$settings->add(new admin_setting_configtextarea('editor_tinymce/customtoolbar',
- get_string('customtoolbar', 'editor_tinymce'), get_string('customtoolbar_desc', 'editor_tinymce', 'http://www.tinymce.com/wiki.php/Buttons/controls'), '', PARAM_RAW, 100, 6));
+ get_string('customtoolbar', 'editor_tinymce'), get_string('customtoolbar_desc', 'editor_tinymce', 'http://www.tinymce.com/wiki.php/Buttons/controls'), $default, PARAM_RAW, 100, 8));
$settings->add(new admin_setting_configtextarea('editor_tinymce/fontselectlist',
get_string('fontselectlist', 'editor_tinymce'), '',
'Trebuchet=Trebuchet MS,Verdana,Arial,Helvetica,sans-serif;Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;Wingdings=wingdings', PARAM_RAW));
diff --git a/lib/editor/tinymce/tests/editor_test.php b/lib/editor/tinymce/tests/editor_test.php
index 27db61bb075..1704bab5813 100644
--- a/lib/editor/tinymce/tests/editor_test.php
+++ b/lib/editor/tinymce/tests/editor_test.php
@@ -49,5 +49,8 @@ class editor_tinymce_testcase extends advanced_testcase {
$result = tinymce_texteditor::parse_toolbar_setting("| \n\n| \n \r");
$this->assertSame(array(), $result);
+
+ $result = tinymce_texteditor::parse_toolbar_setting("one\ntwo\n\nthree\nfour\nfive\nsix\nseven\neight\nnine\nten");
+ $this->assertSame(array('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten'), $result);
}
}
diff --git a/lib/editor/tinymce/version.php b/lib/editor/tinymce/version.php
index 345b637d280..4d537de6065 100644
--- a/lib/editor/tinymce/version.php
+++ b/lib/editor/tinymce/version.php
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012081000; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012083100; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012083100; // Requires this Moodle version
$plugin->component = 'editor_tinymce'; // Full name of the plugin (used for diagnostics)
$plugin->release = '3.6.0'; // This is NOT a directory name, see lib.php if you need to know where is the editor code!
diff --git a/lib/flowplayer/README.txt b/lib/flowplayer/README.txt
index 7bdb7bd1c5c..742633c27a5 100644
--- a/lib/flowplayer/README.txt
+++ b/lib/flowplayer/README.txt
@@ -1,8 +1,35 @@
Version history:
+3.2.13
+------
+- Updated to automatically load the latest controls and audio plugins
+
+3.2.12
+------
+- new flowplayer.js version 3.2.11,
+ fixes removing the player in fullscreen mode leaves Android locked in landscape orientation (#511)
+- #586 add a bitrate label with a new namespace attribute fp:bitratelabel.
+- #583 fixes for handling the fullscreenOnly property better
+- #494 with relative filenames with a root path strip the baseurl of paths first.
+
+3.2.11
+------
+- new flowplayer.js, now requires Flash 10.1 as the minimum flash version
+- #526 allow click through event for flash installation message when using div containers.
+- #508 disabling the stagevideo screen mask, canvas is visible without it, this was causing issues with the display list.
+- #443 adding accessibility option to the playbuttonoverlay.
+
+
+3.2.10
+------
+- Fixed #514, scrubbing was broken
+- new flowplayer.js version 3.2.9, fixes #510
+
3.2.9
-----
- Fixed #490, controlbar background, buffer bar and progress bar colors were all reset to white
+- #503 Update viewport when stage is added to obtain the coordnates correctly. Update viewport when in and out of fullscreen.
+- #508 stage video mask was being added to the top layer and hiding all children.
3.2.8
-----
@@ -69,6 +96,7 @@ this.loadPlugin("content","../flowplayer.content.swf", { html: "test" }, functi
- #461 when we have a clip base url set, we need the complete clip url sent to play2 for http streams.
- #470 check for a playlist when replacing the playlist with an rss feed.
- #494 regression issued caused by #412, enable base url correctly.
+- #30 regression caused by character replacements, removing for now and let end user deal with them.
3.2.7
-----
diff --git a/lib/flowplayer/README_audio.txt b/lib/flowplayer/README_audio.txt
index 04a2f27b6d8..746c5ee8bbd 100644
--- a/lib/flowplayer/README_audio.txt
+++ b/lib/flowplayer/README_audio.txt
@@ -1,5 +1,18 @@
Version history:
+3.2.10
+------
+- #575 send the start event after begin
+- #569 if the playlist has been reset but the audio has been already buffered, set the duration and start event.
+- #582 fixes for metadata events dispatching in playlists and when replaying same audio item, cleanup duration updating once download has completed,
+fixes for clearing the previous cover image display.
+- #611 close the channel and sound on stream not found errors.
+
+3.2.9
+-----
+- #501 fixes to dispatch start state correctly.
+- #501 use the sound channel to listen for a complete event to finish correctly.
+
3.2.8
-----
Fixes:
diff --git a/lib/flowplayer/flowplayer-3.2.8.js b/lib/flowplayer/flowplayer-3.2.11.js
similarity index 96%
rename from lib/flowplayer/flowplayer-3.2.8.js
rename to lib/flowplayer/flowplayer-3.2.11.js
index ee42b3c991f..c6e51cf5061 100644
--- a/lib/flowplayer/flowplayer-3.2.8.js
+++ b/lib/flowplayer/flowplayer-3.2.11.js
@@ -1,5 +1,5 @@
/*
- * flowplayer.js 3.2.8. The Flowplayer API
+ * flowplayer.js 3.2.11. The Flowplayer API
*
* Copyright 2009-2011 Flowplayer Oy
*
@@ -18,8 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Flowplayer. If not, see .
*
- * Date: 2011-12-30 12:34:08 -0500 (Fri, 30 Dec 2011)
- * Revision: 761
+ * Date: 2012-06-16 10:34:45 -0400 (Sat, 16 Jun 2012)
+ * Revision: 808
*/
(function () {
function g(o) {
@@ -373,6 +373,9 @@
D = true;
try {
if (v) {
+ if (v.fp_isFullscreen()) {
+ v.fp_toggleFullscreen()
+ }
v.fp_close();
w._fireEvent("onUnload")
}
@@ -468,7 +471,7 @@
}
return w
}, getVersion:function () {
- var I = "flowplayer.js 3.2.8";
+ var I = "flowplayer.js 3.2.11";
if (w.isLoaded()) {
var H = v.fp_getVersion();
H.push(I);
@@ -615,7 +618,7 @@
return P
};
function B() {
- q.innerHTML = ''; // Moodle hack - we do not want splashscreens, unfortunately there is not switch to disable them
+ q.innerHTML=''; // Moodle hack - we do not want splashscreens, unfortunately there is not switch to disable them
if ($f(q)) {
$f(q).getParent().innerHTML = "";
p = $f(q).getIndex();
@@ -776,7 +779,7 @@
if (typeof t == "string") {
t = {src:t}
}
- t = i({bgcolor:"#000000", version:[9, 0], expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf", cachebusting:false}, t);
+ t = i({bgcolor:"#000000", version:[10, 1], expressInstall:"http://releases.flowplayer.org/swf/expressinstall.swf", cachebusting:false}, t);
if (typeof o == "string") {
if (o.indexOf(".") != -1) {
var s = [];
@@ -823,7 +826,7 @@
}
})();
(function () {
- var h = document.all, j = "http://www.adobe.com/go/getflashplayer", c = typeof jQuery == "function", e = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/, b = {width:"100%", height:"100%", id:"_" + ("" + Math.random()).slice(9), allowfullscreen:true, allowscriptaccess:"always", quality:"high", version:[3, 0], onFail:null, expressInstall:null, w3c:false, cachebusting:false};
+ var h = document.all, j = "http://get.adobe.com/flashplayer", c = typeof jQuery == "function", e = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/, b = {width:"100%", height:"100%", id:"_" + ("" + Math.random()).slice(9), allowfullscreen:true, allowscriptaccess:"always", quality:"high", version:[3, 0], onFail:null, expressInstall:null, w3c:false, cachebusting:false};
if (window.attachEvent) {
window.attachEvent("onbeforeunload", function () {
__flash_unloadHandler = function () {
@@ -882,7 +885,7 @@
}
}
f = e.exec(f);
- return f ? [f[1], f[3]] : [0, 0]
+ return f ? [1 * f[1], 1 * f[(f[1] * 1 > 9 ? 2 : 3)] * 1] : [0, 0]
}, asString:function (l) {
if (l === null || l === undefined) {
return null
@@ -895,13 +898,11 @@
case"string":
l = l.replace(new RegExp('(["\\\\])', "g"), "\\$1");
l = l.replace(/^\s?(\d+\.?\d*)%/, "$1pct");
- l = l.replace(/(%)/g, "%25").replace(/'/g, "\\u0027").replace(/"/g, "\\u0022").replace(/&/g, "%26");
return'"' + l + '"';
case"array":
- return"[" + a(l,
- function (o) {
- return g.asString(o)
- }).join(",") + "]";
+ return"[" + a(l,function (o) {
+ return g.asString(o)
+ }).join(",") + "]";
case"function":
return'"function()"';
case"object":
@@ -963,7 +964,7 @@
} else {
if (!f.innerHTML.replace(/\s/g, "")) {
f.innerHTML = "
Flash version " + n.version + " or greater is required
" + (k[0] > 0 ? "Your version is " + k : "You have no flash plugin installed") + "
");
- if (f.tagName == "A") {
+ if (f.tagName == "A" || f.tagName == "DIV") {
f.onclick = function () {
location.href = j
}
@@ -992,7 +993,7 @@
}
if (c) {
- jQuery.tools = jQuery.tools || {version:"3.2.8"};
+ jQuery.tools = jQuery.tools || {version:"3.2.11"};
jQuery.tools.flashembed = {conf:b};
jQuery.fn.flashembed = function (l, f) {
return this.each(function () {
diff --git a/lib/flowplayer/flowplayer-3.2.11.min.js b/lib/flowplayer/flowplayer-3.2.11.min.js
new file mode 100644
index 00000000000..c03505f4b02
--- /dev/null
+++ b/lib/flowplayer/flowplayer-3.2.11.min.js
@@ -0,0 +1,24 @@
+/*
+ * flowplayer.js 3.2.11. The Flowplayer API
+ *
+ * Copyright 2009-2011 Flowplayer Oy
+ *
+ * This file is part of Flowplayer.
+ *
+ * Flowplayer is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Flowplayer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Flowplayer. If not, see .
+ *
+ * Date: 2012-06-16 10:34:45 -0400 (Sat, 16 Jun 2012)
+ * Revision: 808
+ */
+(function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}function k(q){if(!q||typeof q!="object"){return q}var o=new q.constructor();for(var p in q){if(q.hasOwnProperty(p)){o[p]=k(q[p])}}return o}function m(t,q){if(!t){return}var o,p=0,r=t.length;if(r===undefined){for(o in t){if(q.call(t[o],o,t[o])===false){break}}}else{for(var s=t[0];p1){var t=arguments[1],q=(arguments.length==3)?arguments[2]:{};if(typeof t=="string"){t={src:t}}t=i({bgcolor:"#000000",version:[10,1],expressInstall:"http://releases.flowplayer.org/swf/expressinstall.swf",cachebusting:false},t);if(typeof o=="string"){if(o.indexOf(".")!=-1){var s=[];m(n(o),function(){s.push(new b(this,k(t),k(q)))});return new d(s)}else{var r=c(o);return new b(r!==null?r:k(o),k(t),k(q))}}else{if(o){return new b(o,k(t),k(q))}}}return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r){o.push(r)}});return arguments.length?o[arguments[0]]:new d(o)}return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var h=document.all,j="http://get.adobe.com/flashplayer",c=typeof jQuery=="function",e=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,b={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function i(m,l){if(l){for(var f in l){if(l.hasOwnProperty(f)){m[f]=l[f]}}}return m}function a(f,n){var m=[];for(var l in f){if(f.hasOwnProperty(l)){m[l]=n(f[l])}}return m}window.flashembed=function(f,m,l){if(typeof f=="string"){f=document.getElementById(f.replace("#",""))}if(!f){return}if(typeof m=="string"){m={src:m}}return new d(f,i(i({},b),m),l)};var g=i(window.flashembed,{conf:b,getVersion:function(){var m,f;try{f=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(o){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");f=m&&m.GetVariable("$version")}catch(n){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");f=m&&m.GetVariable("$version")}catch(l){}}}f=e.exec(f);return f?[1*f[1],1*f[(f[1]*1>9?2:3)]*1]:[0,0]},asString:function(l){if(l===null||l===undefined){return null}var f=typeof l;if(f=="object"&&l.push){f="array"}switch(f){case"string":l=l.replace(new RegExp('(["\\\\])',"g"),"\\$1");l=l.replace(/^\s?(\d+\.?\d*)%/,"$1pct");return'"'+l+'"';case"array":return"["+a(l,function(o){return g.asString(o)}).join(",")+"]";case"function":return'"function()"';case"object":var m=[];for(var n in l){if(l.hasOwnProperty(n)){m.push('"'+n+'":'+g.asString(l[n]))}}return"{"+m.join(",")+"}"}return String(l).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(o,l){o=i({},o);var n='";return n},isSupported:function(f){return k[0]>f[0]||k[0]==f[0]&&k[1]>=f[1]}});var k=g.getVersion();function d(f,n,m){if(g.isSupported(n.version)){f.innerHTML=g.getHTML(n,m)}else{if(n.expressInstall&&g.isSupported([6,65])){f.innerHTML=g.getHTML(i(n,{src:n.expressInstall}),{MMredirectURL:encodeURIComponent(location.href),MMplayerType:"PlugIn",MMdoctitle:document.title})}else{if(!f.innerHTML.replace(/\s/g,"")){f.innerHTML="
Flash version "+n.version+" or greater is required
"+(k[0]>0?"Your version is "+k:"You have no flash plugin installed")+"
");if(f.tagName=="A"||f.tagName=="DIV"){f.onclick=function(){location.href=j}}}if(n.onFail){var l=n.onFail.call(this);if(typeof l=="string"){f.innerHTML=l}}}}if(h){window[n.id]=document.getElementById(n.id)}i(this,{getRoot:function(){return f},getOptions:function(){return n},getConf:function(){return m},getApi:function(){return f.firstChild}})}if(c){jQuery.tools=jQuery.tools||{version:"3.2.11"};jQuery.tools.flashembed={conf:b};jQuery.fn.flashembed=function(l,f){return this.each(function(){$(this).data("flashembed",flashembed(this,l,f))})}}})();
\ No newline at end of file
diff --git a/lib/flowplayer/flowplayer-3.2.14.swf b/lib/flowplayer/flowplayer-3.2.14.swf
new file mode 100644
index 00000000000..bee3b6030bb
Binary files /dev/null and b/lib/flowplayer/flowplayer-3.2.14.swf differ
diff --git a/lib/flowplayer/flowplayer-3.2.8.min.js b/lib/flowplayer/flowplayer-3.2.8.min.js
deleted file mode 100644
index 93feb7385dd..00000000000
--- a/lib/flowplayer/flowplayer-3.2.8.min.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * flowplayer.js 3.2.8. The Flowplayer API
- *
- * Copyright 2009-2011 Flowplayer Oy
- *
- * This file is part of Flowplayer.
- *
- * Flowplayer is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Flowplayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Flowplayer. If not, see .
- *
- * Date: 2011-12-30 12:34:08 -0500 (Fri, 30 Dec 2011)
- * Revision: 761
- *
- * this file was modified for Moodle - see flowplayer-3.2.8.js
- */
-(function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}function k(q){if(!q||typeof q!="object"){return q}var o=new q.constructor();for(var p in q){if(q.hasOwnProperty(p)){o[p]=k(q[p])}}return o}function m(t,q){if(!t){return}var o,p=0,r=t.length;if(r===undefined){for(o in t){if(q.call(t[o],o,t[o])===false){break}}}else{for(var s=t[0];p1){var t=arguments[1],q=(arguments.length==3)?arguments[2]:{};if(typeof t=="string"){t={src:t}}t=i({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:false},t);if(typeof o=="string"){if(o.indexOf(".")!=-1){var s=[];m(n(o),function(){s.push(new b(this,k(t),k(q)))});return new d(s)}else{var r=c(o);return new b(r!==null?r:k(o),k(t),k(q))}}else{if(o){return new b(o,k(t),k(q))}}}return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r){o.push(r)}});return arguments.length?o[arguments[0]]:new d(o)}return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var h=document.all,j="http://www.adobe.com/go/getflashplayer",c=typeof jQuery=="function",e=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,b={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function i(m,l){if(l){for(var f in l){if(l.hasOwnProperty(f)){m[f]=l[f]}}}return m}function a(f,n){var m=[];for(var l in f){if(f.hasOwnProperty(l)){m[l]=n(f[l])}}return m}window.flashembed=function(f,m,l){if(typeof f=="string"){f=document.getElementById(f.replace("#",""))}if(!f){return}if(typeof m=="string"){m={src:m}}return new d(f,i(i({},b),m),l)};var g=i(window.flashembed,{conf:b,getVersion:function(){var m,f;try{f=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(o){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");f=m&&m.GetVariable("$version")}catch(n){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");f=m&&m.GetVariable("$version")}catch(l){}}}f=e.exec(f);return f?[f[1],f[3]]:[0,0]},asString:function(l){if(l===null||l===undefined){return null}var f=typeof l;if(f=="object"&&l.push){f="array"}switch(f){case"string":l=l.replace(new RegExp('(["\\\\])',"g"),"\\$1");l=l.replace(/^\s?(\d+\.?\d*)%/,"$1pct");l=l.replace(/(%)/g,"%25").replace(/'/g,"\\u0027").replace(/"/g,"\\u0022").replace(/&/g,"%26");return'"'+l+'"';case"array":return"["+a(l,function(o){return g.asString(o)}).join(",")+"]";case"function":return'"function()"';case"object":var m=[];for(var n in l){if(l.hasOwnProperty(n)){m.push('"'+n+'":'+g.asString(l[n]))}}return"{"+m.join(",")+"}"}return String(l).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(o,l){o=i({},o);var n='";return n},isSupported:function(f){return k[0]>f[0]||k[0]==f[0]&&k[1]>=f[1]}});var k=g.getVersion();function d(f,n,m){if(g.isSupported(n.version)){f.innerHTML=g.getHTML(n,m)}else{if(n.expressInstall&&g.isSupported([6,65])){f.innerHTML=g.getHTML(i(n,{src:n.expressInstall}),{MMredirectURL:encodeURIComponent(location.href),MMplayerType:"PlugIn",MMdoctitle:document.title})}else{if(!f.innerHTML.replace(/\s/g,"")){f.innerHTML="
Flash version "+n.version+" or greater is required
"+(k[0]>0?"Your version is "+k:"You have no flash plugin installed")+"
diff --git a/mod/assign/db/log.php b/mod/assign/db/log.php
index 5401cb89eab..45f19580079 100644
--- a/mod/assign/db/log.php
+++ b/mod/assign/db/log.php
@@ -30,6 +30,7 @@ $logs = array(
array('module'=>'assign', 'action'=>'download all submissions', 'mtable'=>'assign', 'field'=>'name'),
array('module'=>'assign', 'action'=>'grade submission', 'mtable'=>'assign', 'field'=>'name'),
array('module'=>'assign', 'action'=>'lock submission', 'mtable'=>'assign', 'field'=>'name'),
+ array('module'=>'assign', 'action'=>'reveal identities', 'mtable'=>'assign', 'field'=>'name'),
array('module'=>'assign', 'action'=>'revert submission to draft', 'mtable'=>'assign', 'field'=>'name'),
array('module'=>'assign', 'action'=>'submission statement accepted', 'mtable'=>'assign', 'field'=>'name'),
array('module'=>'assign', 'action'=>'submit', 'mtable'=>'assign', 'field'=>'name'),
diff --git a/mod/assign/db/upgrade.php b/mod/assign/db/upgrade.php
index b80a60eb74a..20b7b915366 100644
--- a/mod/assign/db/upgrade.php
+++ b/mod/assign/db/upgrade.php
@@ -34,11 +34,11 @@ function xmldb_assign_upgrade($oldversion) {
if ($oldversion < 2012051700) {
- // Define field sendlatenotifications to be added to assign
+ // Define field to be added to assign.
$table = new xmldb_table('assign');
$field = new xmldb_field('sendlatenotifications', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'sendnotifications');
- // Conditionally launch add field sendlatenotifications
+ // Conditionally launch add field.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
@@ -47,16 +47,17 @@ function xmldb_assign_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2012051700, 'assign');
}
- // Moodle v2.3.0 release upgrade line
- // Put any upgrade step following this
+ // Moodle v2.3.0 release upgrade line.
+ // Put any upgrade step following this.
if ($oldversion < 2012071800) {
- // Define field requiresubmissionstatement to be added to assign
+ // Define field requiresubmissionstatement to be added to assign.
$table = new xmldb_table('assign');
$field = new xmldb_field('requiresubmissionstatement', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'timemodified');
- // Conditionally launch add field requiresubmissionstatement
+ // Conditionally launch add field requiresubmissionstatement.
+
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
@@ -67,11 +68,11 @@ function xmldb_assign_upgrade($oldversion) {
if ($oldversion < 2012081600) {
- // Define field sendlatenotifications to be added to assign.
+ // Define field to be added to assign.
$table = new xmldb_table('assign');
$field = new xmldb_field('completionsubmit', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'timemodified');
- // Conditionally launch add field sendlatenotifications.
+ // Conditionally launch add field.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
@@ -80,6 +81,122 @@ function xmldb_assign_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2012081600, 'assign');
}
+ // Individual extension dates support.
+ if ($oldversion < 2012082100) {
+
+ // Define field cutoffdate to be added to assign.
+ $table = new xmldb_table('assign');
+ $field = new xmldb_field('cutoffdate', XMLDB_TYPE_INTEGER, '10', null,
+ XMLDB_NOTNULL, null, '0', 'completionsubmit');
+
+ // Conditionally launch add field cutoffdate.
+ if (!$dbman->field_exists($table, $field)) {
+ $dbman->add_field($table, $field);
+ }
+ // If prevent late is on - set cutoffdate to due date.
+
+ // Now remove the preventlatesubmissions column.
+ $field = new xmldb_field('preventlatesubmissions', XMLDB_TYPE_INTEGER, '2', null,
+ XMLDB_NOTNULL, null, '0', 'nosubmissions');
+ if ($dbman->field_exists($table, $field)) {
+ // Set the cutoffdate to the duedate if preventlatesubmissions was enabled.
+ $sql = 'UPDATE {assign} SET cutoffdate = duedate WHERE preventlatesubmissions = 1';
+ $DB->execute($sql);
+
+ $dbman->drop_field($table, $field);
+ }
+
+ // Define field extensionduedate to be added to assign_grades
+ $table = new xmldb_table('assign_grades');
+ $field = new xmldb_field('extensionduedate', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'mailed');
+
+ // Conditionally launch add field extensionduedate
+ if (!$dbman->field_exists($table, $field)) {
+ $dbman->add_field($table, $field);
+ }
+
+ // Assign savepoint reached.
+ upgrade_mod_savepoint(true, 2012082100, 'assign');
+ }
+
+ // Team assignment support.
+ if ($oldversion < 2012082300) {
+
+ // Define field to be added to assign.
+ $table = new xmldb_table('assign');
+ $field = new xmldb_field('teamsubmission', XMLDB_TYPE_INTEGER, '2', null,
+ XMLDB_NOTNULL, null, '0', 'cutoffdate');
+
+ // Conditionally launch add field.
+ if (!$dbman->field_exists($table, $field)) {
+ $dbman->add_field($table, $field);
+ }
+ $field = new xmldb_field('requireallteammemberssubmit', XMLDB_TYPE_INTEGER, '2', null,
+ XMLDB_NOTNULL, null, '0', 'teamsubmission');
+ // Conditionally launch add field.
+ if (!$dbman->field_exists($table, $field)) {
+ $dbman->add_field($table, $field);
+ }
+ $field = new xmldb_field('teamsubmissiongroupingid', XMLDB_TYPE_INTEGER, '10', null,
+ XMLDB_NOTNULL, null, '0', 'requireallteammemberssubmit');
+ // Conditionally launch add field.
+ if (!$dbman->field_exists($table, $field)) {
+ $dbman->add_field($table, $field);
+ }
+ $index = new xmldb_index('teamsubmissiongroupingid', XMLDB_INDEX_NOTUNIQUE, array('teamsubmissiongroupingid'));
+ // Conditionally launch add index.
+ if (!$dbman->index_exists($table, $index)) {
+ $dbman->add_index($table, $index);
+ }
+ $table = new xmldb_table('assign_submission');
+ $field = new xmldb_field('groupid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'status');
+ // Conditionally launch add field.
+ if (!$dbman->field_exists($table, $field)) {
+ $dbman->add_field($table, $field);
+ }
+ upgrade_mod_savepoint(true, 2012082300, 'assign');
+ }
+ if ($oldversion < 2012082400) {
+
+ // Define table assign_user_mapping to be created
+ $table = new xmldb_table('assign_user_mapping');
+
+ // Adding fields to table assign_user_mapping
+ $table->add_field('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
+ $table->add_field('assignment', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0');
+ $table->add_field('userid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0');
+
+ // Adding keys to table assign_user_mapping
+ $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
+ $table->add_key('assignment', XMLDB_KEY_FOREIGN, array('assignment'), 'assign', array('id'));
+ $table->add_key('user', XMLDB_KEY_FOREIGN, array('userid'), 'user', array('id'));
+
+ // Conditionally launch create table for assign_user_mapping
+ if (!$dbman->table_exists($table)) {
+ $dbman->create_table($table);
+ }
+
+ // Define field blindmarking to be added to assign
+ $table = new xmldb_table('assign');
+ $field = new xmldb_field('blindmarking', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'teamsubmissiongroupingid');
+
+ if (!$dbman->field_exists($table, $field)) {
+ $dbman->add_field($table, $field);
+ }
+
+ // Define field revealidentities to be added to assign
+ $table = new xmldb_table('assign');
+ $field = new xmldb_field('revealidentities', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'blindmarking');
+
+ if (!$dbman->field_exists($table, $field)) {
+ $dbman->add_field($table, $field);
+ }
+
+ // assign savepoint reached
+ upgrade_mod_savepoint(true, 2012082400, 'assign');
+ }
+
+
return true;
}
diff --git a/mod/assign/extensionform.php b/mod/assign/extensionform.php
new file mode 100644
index 00000000000..f838638adfc
--- /dev/null
+++ b/mod/assign/extensionform.php
@@ -0,0 +1,102 @@
+.
+
+/**
+ * This file contains the forms to create and edit an instance of this module
+ *
+ * @package mod_assign
+ * @copyright 2012 NetSpot {@link http://www.netspot.com.au}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
+
+
+require_once($CFG->libdir.'/formslib.php');
+require_once($CFG->dirroot . '/mod/assign/locallib.php');
+
+/**
+ * Assignment extension dates form
+ *
+ * @package mod_assign
+ * @copyright 2012 NetSpot {@link http://www.netspot.com.au}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+class mod_assign_extension_form extends moodleform {
+ /** @var array $instance - The data passed to this form */
+ private $instance;
+
+ /**
+ * Define the form - called by parent constructor
+ */
+ public function definition() {
+ $mform = $this->_form;
+
+ list($coursemoduleid, $userid, $batchusers, $instance, $data) = $this->_customdata;
+ // Instance variable is used by the form validation function.
+ $this->instance = $instance;
+
+ if ($batchusers) {
+ $listusersmessage = get_string('grantextensionforusers', 'assign', count(explode(',', $batchusers)));
+ $mform->addElement('static', 'applytoselectedusers', '', $listusersmessage);
+ }
+ if ($instance->allowsubmissionsfromdate) {
+ $mform->addElement('static', 'allowsubmissionsfromdate', get_string('allowsubmissionsfromdate', 'assign'),
+ userdate($instance->allowsubmissionsfromdate));
+ }
+ if ($instance->duedate) {
+ $mform->addElement('static', 'duedate', get_string('duedate', 'assign'), userdate($instance->duedate));
+ $finaldate = $instance->duedate;
+ }
+ if ($instance->cutoffdate) {
+ $mform->addElement('static', 'cutoffdate', get_string('cutoffdate', 'assign'), userdate($instance->cutoffdate));
+ $finaldate = $instance->cutoffdate;
+ }
+ $mform->addElement('date_time_selector', 'extensionduedate',
+ get_string('extensionduedate', 'assign'), array('optional'=>true));
+ $mform->setDefault('extensionduedate', $finaldate);
+ $mform->addElement('hidden', 'id', $coursemoduleid);
+ $mform->addElement('hidden', 'userid', $userid);
+ $mform->addElement('hidden', 'selectedusers', $batchusers);
+ $mform->addElement('hidden', 'action', 'saveextension');
+ $this->add_action_buttons(true, get_string('savechanges', 'assign'));
+
+ if ($data) {
+ $this->set_data($data);
+ }
+ }
+
+ /**
+ * Perform validation on the extension form
+ * @param array $data
+ * @param array $files
+ */
+ public function validation($data, $files) {
+ $errors = parent::validation($data, $files);
+ if ($this->instance->duedate && $data['extensionduedate']) {
+ if ($this->instance->duedate > $data['extensionduedate']) {
+ $errors['extensionduedate'] = get_string('extensionnotafterduedate', 'assign');
+ }
+ }
+ if ($this->instance->allowsubmissionsfromdate && $data['extensionduedate']) {
+ if ($this->instance->allowsubmissionsfromdate > $data['extensionduedate']) {
+ $errors['extensionduedate'] = get_string('extensionnotafterfromdate', 'assign');
+ }
+ }
+
+ return $errors;
+ }
+}
diff --git a/mod/assign/feedback/file/lang/en/assignfeedback_file.php b/mod/assign/feedback/file/lang/en/assignfeedback_file.php
index e62e6df8fe1..ca017e9dcc2 100644
--- a/mod/assign/feedback/file/lang/en/assignfeedback_file.php
+++ b/mod/assign/feedback/file/lang/en/assignfeedback_file.php
@@ -23,6 +23,7 @@
*/
$string['configmaxbytes'] = 'Maximum file size';
+$string['countfiles'] = '{$a} files';
$string['default'] = 'Enabled by default';
$string['default_help'] = 'If set, this feedback method will be enabled by default for all new assignments.';
$string['enabled'] = 'File feedback';
diff --git a/mod/assign/gradingbatchoperationsform.php b/mod/assign/gradingbatchoperationsform.php
index 2ae00a2d4a6..fa6a18e353d 100644
--- a/mod/assign/gradingbatchoperationsform.php
+++ b/mod/assign/gradingbatchoperationsform.php
@@ -52,6 +52,9 @@ class mod_assign_grading_batch_operations_form extends moodleform {
if ($instance['submissiondrafts']) {
$options['reverttodraft'] = get_string('reverttodraft', 'assign');
}
+ if ($instance['duedate']) {
+ $options['grantextension'] = get_string('grantextension', 'assign');
+ }
$mform->addElement('hidden', 'action', 'batchgradingoperation');
$mform->addElement('hidden', 'id', $instance['cm']);
$mform->addElement('hidden', 'selectedusers', '', array('class'=>'selectedusers'));
diff --git a/mod/assign/gradingtable.php b/mod/assign/gradingtable.php
index 40bed663228..51bc69a0ee3 100644
--- a/mod/assign/gradingtable.php
+++ b/mod/assign/gradingtable.php
@@ -50,6 +50,13 @@ class assign_grading_table extends table_sql implements renderable {
private $tablemaxrows = 10000;
/** @var boolean $quickgrading */
private $quickgrading = false;
+ /** @var boolean $hasgrantextension - Only do the capability check once for the entire table */
+ private $hasgrantextension = false;
+ /** @var array $groupsubmissions - A static cache of group submissions */
+ private $groupsubmissions = array();
+ /** @var array $submissiongroups - A static cache of submission groups */
+ private $submissiongroups = array();
+
/**
* overridden constructor keeps a reference to the assignment class that is displaying this table
@@ -88,9 +95,19 @@ class assign_grading_table extends table_sql implements renderable {
$params['assignmentid1'] = (int)$this->assignment->get_instance()->id;
$params['assignmentid2'] = (int)$this->assignment->get_instance()->id;
- $fields = user_picture::fields('u') . ', u.id as userid, ';
- $fields .= 's.status as status, s.id as submissionid, s.timecreated as firstsubmission, s.timemodified as timesubmitted, ';
- $fields .= 'g.id as gradeid, g.grade as grade, g.timemodified as timemarked, g.timecreated as firstmarked, g.mailed as mailed, g.locked as locked';
+ $fields = user_picture::fields('u') . ', ';
+ $fields .= 'u.id as userid, ';
+ $fields .= 's.status as status, ';
+ $fields .= 's.id as submissionid, ';
+ $fields .= 's.timecreated as firstsubmission, ';
+ $fields .= 's.timemodified as timesubmitted, ';
+ $fields .= 'g.id as gradeid, ';
+ $fields .= 'g.grade as grade, ';
+ $fields .= 'g.timemodified as timemarked, ';
+ $fields .= 'g.timecreated as firstmarked, ';
+ $fields .= 'g.mailed as mailed, ';
+ $fields .= 'g.locked as locked, ';
+ $fields .= 'g.extensionduedate as extensionduedate';
$from = '{user} u LEFT JOIN {assign_submission} s ON u.id = s.userid AND s.assignment = :assignmentid1' .
' LEFT JOIN {assign_grades} g ON u.id = g.userid AND g.assignment = :assignmentid2';
@@ -127,13 +144,19 @@ class assign_grading_table extends table_sql implements renderable {
$headers[] = get_string('edit');
}
- // User picture
- $columns[] = 'picture';
- $headers[] = get_string('pictureofuser');
+ // User picture.
+ if (!$this->assignment->is_blind_marking()) {
+ $columns[] = 'picture';
+ $headers[] = get_string('pictureofuser');
- // Fullname
- $columns[] = 'fullname';
- $headers[] = get_string('fullname');
+ // Fullname.
+ $columns[] = 'fullname';
+ $headers[] = get_string('fullname');
+ } else {
+ // Record ID.
+ $columns[] = 'recordid';
+ $headers[] = get_string('recordid', 'assign');
+ }
// Submission status
if ($assignment->is_any_submission_plugin_enabled()) {
@@ -141,6 +164,14 @@ class assign_grading_table extends table_sql implements renderable {
$headers[] = get_string('status');
}
+ // Team submission columns
+ if ($assignment->get_instance()->teamsubmission) {
+ $columns[] = 'team';
+ $headers[] = get_string('submissionteam', 'assign');
+
+ $columns[] = 'teamstatus';
+ $headers[] = get_string('teamsubmissionstatus', 'assign');
+ }
// Grade
$columns[] = 'grade';
@@ -177,6 +208,7 @@ class assign_grading_table extends table_sql implements renderable {
// load the grading info for all users
$this->gradinginfo = grade_get_grades($this->assignment->get_course()->id, 'mod', 'assign', $this->assignment->get_instance()->id, $users);
+ $this->hasgrantextension = has_capability('mod/assign:grantextension', $this->assignment->get_context());
if (!empty($CFG->enableoutcomes) && !empty($this->gradinginfo->outcomes)) {
$columns[] = 'outcomes';
@@ -192,6 +224,11 @@ class assign_grading_table extends table_sql implements renderable {
$this->no_sorting('select');
$this->no_sorting('outcomes');
+ if ($assignment->get_instance()->teamsubmission) {
+ $this->no_sorting('team');
+ $this->no_sorting('teamstatus');
+ }
+
foreach ($this->assignment->get_submission_plugins() as $plugin) {
if ($plugin->is_visible() && $plugin->is_enabled()) {
$this->no_sorting('assignsubmission_' . $plugin->get_type());
@@ -205,6 +242,16 @@ class assign_grading_table extends table_sql implements renderable {
}
+ /**
+ * Add a column with an ID that uniquely identifies this user in this assignment
+ *
+ * @return string
+ */
+ function col_recordid(stdClass $row) {
+ return get_string('hiddenuser', 'assign', $this->assignment->get_uniqueid_for_user($row->userid));
+ }
+
+
/**
* Add the userid to the row class so it can be updated via ajax
*
@@ -241,6 +288,71 @@ class assign_grading_table extends table_sql implements renderable {
return $o;
}
+ /**
+ * Get the team info for this user
+ *
+ * @param stdClass $row
+ * @return string The team name
+ */
+ function col_team(stdClass $row) {
+ $submission = false;
+ $group = false;
+ $this->get_group_and_submission($row->id, $group, $submission);
+ if ($group) {
+ return $group->name;
+ }
+ return get_string('defaultteam', 'assign');
+ }
+
+ /**
+ * Use a static cache to try and reduce DB calls.
+ *
+ * @param int $userid The user id for this submission
+ * @param int $groupid The groupid (returned)
+ * @param mixed $submission The stdClass submission or false (returned)
+ */
+ function get_group_and_submission($userid, &$group, &$submission) {
+ $group = false;
+ if (isset($this->submissiongroups[$userid])) {
+ $group = $this->submissiongroups[$userid];
+ } else {
+ $group = $this->assignment->get_submission_group($userid, false);
+ $this->submissiongroups[$userid] = $group;
+ }
+
+ $groupid = 0;
+ if ($group) {
+ $groupid = $group->id;
+ }
+
+ if (isset($this->groupsubmissions[$groupid])) {
+ $submission = $this->groupsubmissions[$groupid];
+ } else {
+ $submission = $this->assignment->get_group_submission($userid, $groupid, false);
+ $this->groupsubmissions[$groupid] = $submission;
+ }
+ }
+
+
+ /**
+ * Get the team status for this user
+ *
+ * @param stdClass $row
+ * @return string The team name
+ */
+ function col_teamstatus(stdClass $row) {
+ $submission = false;
+ $group = false;
+ $this->get_group_and_submission($row->id, $group, $submission);
+
+ $status = '';
+ if ($submission) {
+ $status = $submission->status;
+ }
+ return get_string('submissionstatus_' . $status, 'assign');
+ }
+
+
/**
* Format a list of outcomes
*
@@ -409,9 +521,14 @@ class assign_grading_table extends table_sql implements renderable {
if ($this->assignment->is_any_submission_plugin_enabled()) {
- $o .= $this->output->container(get_string('submissionstatus_' . $row->status, 'assign'), array('class'=>'submissionstatus' .$row->status));
+ $o .= $this->output->container(get_string('submissionstatus_' . $row->status, 'assign'),
+ array('class'=>'submissionstatus' .$row->status));
if ($this->assignment->get_instance()->duedate && $row->timesubmitted > $this->assignment->get_instance()->duedate) {
- $o .= $this->output->container(get_string('submittedlateshort', 'assign', format_time($row->timesubmitted - $this->assignment->get_instance()->duedate)), 'latesubmission');
+ if (!$row->extensionduedate || $row->timesubmitted > $row->extensionduedate) {
+ $latemessage = get_string('submittedlateshort', 'assign',
+ format_time($row->timesubmitted - $this->assignment->get_instance()->duedate));
+ $o .= $this->output->container($latemessage, 'latesubmission');
+ }
}
if ($row->locked) {
$o .= $this->output->container(get_string('submissionslockedshort', 'assign'), 'lockedsubmission');
@@ -419,6 +536,19 @@ class assign_grading_table extends table_sql implements renderable {
if ($row->grade !== NULL && $row->grade >= 0) {
$o .= $this->output->container(get_string('graded', 'assign'), 'submissiongraded');
}
+ if (!$row->timesubmitted) {
+ $now = time();
+ $due = $this->assignment->get_instance()->duedate;
+ if ($row->extensionduedate) {
+ $due = $row->extensionduedate;
+ }
+ if ($due && ($now > $due)) {
+ $o .= $this->output->container(get_string('overdue', 'assign', format_time($now - $due)), 'overduesubmission');
+ }
+ }
+ if ($row->extensionduedate) {
+ $o .= $this->output->container(get_string('userextensiondate', 'assign', userdate($row->extensionduedate)), 'extensiondate');
+ }
}
return $o;
@@ -450,23 +580,42 @@ class assign_grading_table extends table_sql implements renderable {
}
$actions[$url->out(false)] = $description;
- if (!$row->status || $row->status == ASSIGN_SUBMISSION_STATUS_DRAFT || !$this->assignment->get_instance()->submissiondrafts) {
- if (!$row->locked) {
+ // Hide for offline assignments.
+ if ($this->assignment->is_any_submission_plugin_enabled()) {
+ if (!$row->status ||
+ $row->status == ASSIGN_SUBMISSION_STATUS_DRAFT ||
+ !$this->assignment->get_instance()->submissiondrafts) {
+
+ if (!$row->locked) {
+ $url = new moodle_url('/mod/assign/view.php', array('id' => $this->assignment->get_course_module()->id,
+ 'userid'=>$row->id,
+ 'action'=>'lock',
+ 'sesskey'=>sesskey(),
+ 'page'=>$this->currpage));
+ $description = get_string('preventsubmissionsshort', 'assign');
+ $actions[$url->out(false)] = $description;
+ } else {
+ $url = new moodle_url('/mod/assign/view.php', array('id' => $this->assignment->get_course_module()->id,
+ 'userid'=>$row->id,
+ 'action'=>'unlock',
+ 'sesskey'=>sesskey(),
+ 'page'=>$this->currpage));
+ $description = get_string('allowsubmissionsshort', 'assign');
+ $actions[$url->out(false)] = $description;
+ }
+ }
+
+ if (($this->assignment->get_instance()->duedate ||
+ $this->assignment->get_instance()->cutoffdate) &&
+ $this->hasgrantextension) {
$url = new moodle_url('/mod/assign/view.php', array('id' => $this->assignment->get_course_module()->id,
'userid'=>$row->id,
- 'action'=>'lock',
+ 'action'=>'grantextension',
'sesskey'=>sesskey(),
'page'=>$this->currpage));
- $description = get_string('preventsubmissionsshort', 'assign');
- $actions[$url->out(false)] = $description;
- } else {
- $url = new moodle_url('/mod/assign/view.php', array('id' => $this->assignment->get_course_module()->id,
- 'userid'=>$row->id,
- 'action'=>'unlock',
- 'sesskey'=>sesskey(),
- 'page'=>$this->currpage));
- $description = get_string('allowsubmissionsshort', 'assign');
+ $description = get_string('grantextension', 'assign');
$actions[$url->out(false)] = $description;
+
}
}
if ($row->status == ASSIGN_SUBMISSION_STATUS_SUBMITTED && $this->assignment->get_instance()->submissiondrafts) {
@@ -555,7 +704,15 @@ class assign_grading_table extends table_sql implements renderable {
$plugin = $this->assignment->get_submission_plugin_by_type(substr($colname, strlen('assignsubmission_')));
if ($plugin->is_visible() && $plugin->is_enabled()) {
- if ($row->submissionid) {
+ if ($this->assignment->get_instance()->teamsubmission) {
+ $group = false;
+ $submission = false;
+ $this->get_group_and_submission($row->id, $group, $submission);
+ if ($submission) {
+ return $this->format_plugin_summary_with_link($plugin, $submission, 'grading', array());
+ }
+ } else if ($row->submissionid) {
+
$submission = new stdClass();
$submission->id = $row->submissionid;
$submission->timecreated = $row->firstsubmission;
diff --git a/mod/assign/lang/en/assign.php b/mod/assign/lang/en/assign.php
index 29fbc833c51..d4b4d70c056 100644
--- a/mod/assign/lang/en/assign.php
+++ b/mod/assign/lang/en/assign.php
@@ -32,9 +32,12 @@ $string['allowsubmissionsfromdatesummary'] = 'This assignment will accept submis
$string['allowsubmissionsanddescriptionfromdatesummary'] = 'The assignment details and submission form will be available from {$a}';
$string['alwaysshowdescription'] = 'Always show description';
$string['alwaysshowdescription_help'] = 'If disabled, the Assignment Description above will only become visible to students at the "Allow submissions from" date.';
+$string['applytoteam'] = 'Apply grades and feedback to entire team';
$string['assign:addinstance'] = 'Add a new assignment';
$string['assign:exportownsubmission'] = 'Export own submission';
$string['assign:grade'] = 'Grade assignment';
+$string['assign:grantextension'] = 'Grant extension';
+$string['assign:revealidentities'] = 'Reveal student identities';
$string['assign:submit'] = 'Submit assignment';
$string['assign:view'] = 'View assignment';
$string['assignfeedback'] = 'Feedback plugin';
@@ -60,11 +63,14 @@ $string['availability'] = 'Availability';
$string['backtoassignment'] = 'Back to assignment';
$string['batchoperationsdescription'] = 'With selected...';
$string['batchoperationconfirmlock'] = 'Lock all selected submissions?';
+$string['batchoperationconfirmgrantextension'] = 'Grant an extension to all selected submissions?';
$string['batchoperationconfirmunlock'] = 'Unlock all selected submissions?';
$string['batchoperationconfirmreverttodraft'] = 'Revert selected submissions to draft?';
$string['batchoperationlock'] = 'lock submissions';
$string['batchoperationunlock'] = 'unlock submissions';
$string['batchoperationreverttodraft'] = 'revert submissions to draft';
+$string['blindmarking'] = 'Blind marking';
+$string['blindmarking_help'] = 'Blind marking hides the identity of students to markers. Blind marking settings will be locked once a submission or grade has been made in relation to this assignment.';
$string['changegradewarning'] = 'This assignment has graded submissions and changing the grade will not automatically re-calculate existing submission grades. You must re-grade all existing submissions, if you wish to change the grade.';
$string['comment'] = 'Comment';
$string['completionsubmit'] = 'Student must submit to this activity to complete it';
@@ -78,8 +84,13 @@ $string['couldnotcreatecoursemodule'] = 'Could not create course module.';
$string['couldnotcreatenewassignmentinstance'] = 'Could not create new assignment instance.';
$string['couldnotfindassignmenttoupgrade'] = 'Could not find old assignment instance to upgrade.';
$string['currentgrade'] = 'Current grade in gradebook';
+$string['cutoffdate'] = 'Cut-off date';
+$string['cutoffdate_help'] = 'If set, the assignment will not accept submissions after this date without an extension.';
+$string['cutoffdatevalidation'] = 'Cut-off date must be after the due date.';
+$string['cutoffdatefromdatevalidation'] = 'Cut-off date must be after the allow submissions from date.';
$string['defaultplugins'] = 'Default assignment settings';
$string['defaultplugins_help'] = 'These settings define the defaults for all new assignments.';
+$string['defaultteam'] = 'Default team';
$string['deletepluginareyousure'] = 'Delete assignment plugin {$a}: are you sure?';
$string['deletepluginareyousuremessage'] = 'You are about to completely delete the assignment plugin {$a}. This will completely delete everything in the database associated with this assignment plugin. Are you SURE you want to continue?';
$string['deletingplugin'] = 'Deleting plugin {$a}.';
@@ -87,12 +98,15 @@ $string['description'] = 'Description';
$string['downloadall'] = 'Download all submissions';
$string['download all submissions'] = 'Download all submissions in a zip file.';
$string['duedate'] = 'Due date';
-$string['duedate_help'] = 'This is when the assignment is due. If late submissions are allowed, any assignments submitted after this date are marked as late.';
+$string['duedate_help'] = 'This is when the assignment is due. Submissions will still be allowed after this date but any assignments submitted after this date are marked as late. To prevent submissions after a certain date - set the assignment cut off date.';
$string['duedateno'] = 'No due date';
$string['duedatereached'] = 'The due date for this assignment has now passed';
$string['duedatevalidation'] = 'Due date must be after the allow submissions from date.';
$string['editsubmission'] = 'Edit my submission';
$string['editaction'] = 'Actions...';
+$string['extensionduedate'] = 'Extension due date';
+$string['extensionnotafterduedate'] = 'Extension date must be after the due date';
+$string['extensionnotafterfromdate'] = 'Extension date must be after the allow submissions from date';
$string['gradersubmissionupdatedtext'] = '{$a->username} has updated their assignment submission
for \'{$a->assignment}\' at {$a->timeupdated}
@@ -103,6 +117,8 @@ $string['gradersubmissionupdatedhtml'] = '{$a->username} has updated their assig
for \'{$a->assignment}\' at {$a->timeupdated}
It is available on the web site.';
$string['gradersubmissionupdatedsmall'] = '{$a->username} has updated their submission for assignment {$a->assignment}.';
+$string['grantextension'] = 'Grant extension';
+$string['grantextensionforusers'] = 'Grant extension for {$a} students';
$string['enabled'] = 'Enabled';
$string['errornosubmissions'] = 'There are no submissions to download';
$string['errorquickgradingvsadvancedgrading'] = 'The grades were not saved because this assignment is currently using advanced grading';
@@ -143,11 +159,14 @@ $string['gradingstatus'] = 'Grading status';
$string['gradingstudentprogress'] = 'Grading student {$a->index} of {$a->count}';
$string['gradingsummary'] = 'Grading summary';
$string['hideshow'] = 'Hide/Show';
+$string['hiddenuser'] = 'Participant {$a}';
$string['instructionfiles'] = 'Instruction files';
$string['invalidgradeforscale'] = 'The grade supplied was not valid for the current scale';
$string['invalidfloatforgrade'] = 'The grade provided could not be understood: {$a}';
$string['lastmodifiedsubmission'] = 'Last modified (submission)';
$string['lastmodifiedgrade'] = 'Last modified (grade)';
+$string['latesubmissions'] = 'Late submissions';
+$string['latesubmissionsaccepted'] = 'Only student(s) having been granted extension can still submit the assignment';
$string['locksubmissionforstudent'] = 'Prevent any more submissions for student: (id={$a->id}, fullname={$a->fullname}).';
$string['locksubmissions'] = 'Lock submissions';
$string['manageassignfeedbackplugins'] = 'Manage assignment feedback plugins';
@@ -165,9 +184,12 @@ $string['mysubmission'] = 'My submission: ';
$string['newsubmissions'] = 'Assignments submitted';
$string['nofiles'] = 'No files. ';
$string['nograde'] = 'No grade. ';
+$string['nolatesubmissions'] = 'No late submissions accepted. ';
$string['noonlinesubmissions'] = 'This assignment does not require you to submit anything online';
$string['nosavebutnext'] = 'Next';
$string['nosubmission'] = 'Nothing has been submitted for this assignment';
+$string['nosubmissionsacceptedafter'] = 'No submissions accepted after ';
+$string['nomoresubmissionsaccepted'] = 'No more submissions accepted';
$string['notgraded'] = 'Not graded';
$string['notgradedyet'] = 'Not graded yet';
$string['notsubmittedyet'] = 'Not submitted yet';
@@ -177,15 +199,16 @@ $string['numberofdraftsubmissions'] = 'Drafts';
$string['numberofparticipants'] = 'Participants';
$string['numberofsubmittedassignments'] = 'Submitted';
$string['numberofsubmissionsneedgrading'] = 'Needs grading';
+$string['numberofteams'] = 'Teams';
$string['offline'] = 'No online submissions required';
+$string['open'] = 'Open';
$string['overdue'] = 'Assignment is overdue by: {$a}';
$string['outlinegrade'] = 'Grade: {$a}';
$string['page-mod-assign-x'] = 'Any assignment module page';
$string['page-mod-assign-view'] = 'Assignment module main and submission page';
+$string['participant'] = 'Participant';
$string['pluginadministration'] = 'Assignment administration';
$string['pluginname'] = 'Assignment';
-$string['preventlatesubmissions'] = 'Prevent late submissions';
-$string['preventlatesubmissions_help'] = 'If enabled, students will not be able submit after the Due Date. If disabled, students will be able to submit assignments after the due date.';
$string['preventsubmissions'] = 'Prevent the user from making any more submissions to this assignment.';
$string['preventsubmissionsshort'] = 'Prevent submission changes';
$string['previous'] = 'Previous';
@@ -195,6 +218,11 @@ $string['quickgradingchangessaved'] = 'The grade changes were saved';
$string['quickgrading_help'] = 'Quick grading allows you to assign grades (and outcomes) directly in the submissions table. Quick grading is not compatible with advanced grading and is not recommended when there are multiple markers.';
$string['requiresubmissionstatement'] = 'Require that students accept the submission statement';
$string['requiresubmissionstatement_help'] = 'Require that students accept the submission statement for all assignment submissions for this entire Moodle installation. If this setting is not enabled, then submission statements can be enabled or disabled in the settings for each assignment.';
+$string['requireallteammemberssubmit'] = 'Require all team members submit';
+$string['requireallteammemberssubmit_help'] = 'If enabled, all members of the student team must click the submit button for this assignment before the team submission will be considered as submitted. If disabled, the team submission will be considered as submitted as soon as any member of the student team clicks the submit button.';
+$string['recordid'] = 'Identifier';
+$string['revealidentities'] = 'Reveal student identities';
+$string['revealidentitiesconfirm'] = 'Are you sure you want to reveal student identities for this assignment. This operation cannot be undone. Once the student identities have been revealed, the marks will be released to the gradebook.';
$string['reverttodraftforstudent'] = 'Revert submission to draft for student: (id={$a->id}, fullname={$a->fullname}).';
$string['reverttodraft'] = 'Revert the submission to draft status.';
$string['reverttodraftshort'] = 'Revert the submission to draft';
@@ -213,6 +241,8 @@ $string['settings'] = 'Assignment settings';
$string['showrecentsubmissions'] = 'Show recent submissions';
$string['submissiondrafts'] = 'Require students click submit button';
$string['submissiondrafts_help'] = 'If enabled, students will have to click a Submit button to declare their submission as final. This allows students to keep a draft version of the submission on the system. If this setting is changed from "No" to "Yes" after students have already submitted those submissions will be regarded as final.';
+$string['submissioneditable'] = 'Student can edit this submission';
+$string['submissionnoteditable'] = 'Student cannot edit this submission';
$string['submissionnotready'] = 'This assignment is not ready to submit:';
$string['submissionplugins'] = 'Submission plugins';
$string['submissionreceipts'] = 'Send submission receipts';
@@ -242,6 +272,7 @@ $string['submissionstatus_new'] = 'New submission';
$string['submissionstatus_'] = 'No submission';
$string['submissionstatus'] = 'Submission status';
$string['submissionstatus_submitted'] = 'Submitted for grading';
+$string['submissionteam'] = 'Team';
$string['submission'] = 'Submission';
$string['submitaction'] = 'Submit';
$string['submitassignment_help'] = 'Once this assignment is submitted you will not be able to make any more changes';
@@ -250,6 +281,11 @@ $string['submittedearly'] = 'Assignment was submitted {$a} early';
$string['submittedlate'] = 'Assignment was submitted {$a} late';
$string['submittedlateshort'] = '{$a} late';
$string['submitted'] = 'Submitted';
+$string['teamsubmission'] = 'Students submit in teams';
+$string['teamsubmission_help'] = 'If enabled students will be divided into teams based on the default set of groups or a custom grouping. A team submission will be shared among team members and all members of the team will see each others changes to the submission.';
+$string['teamsubmissiongroupingid'] = 'Grouping for student teams';
+$string['teamsubmissiongroupingid_help'] = 'This is the grouping that the assignment will use to find groups for student teams. If not set - the default set of groups will be used.';
+$string['teamsubmissionstatus'] = 'Team submission status';
$string['textinstructions'] = 'Assignment instructions';
$string['timemodified'] = 'Last modified';
$string['timeremaining'] = 'Time remaining';
@@ -258,6 +294,8 @@ $string['unlocksubmissions'] = 'Unlock submissions';
$string['updategrade'] = 'Update grade';
$string['updatetable'] = 'Save and update table';
$string['upgradenotimplemented'] = 'Upgrade not implemented in plugin ({$a->type} {$a->subtype})';
+$string['userextensiondate'] = 'Extension granted until: {$a}';
+$string['userswhoneedtosubmit'] = 'Users who need to submit: {$a}';
$string['viewfeedback'] = 'View feedback';
$string['viewfeedbackforuser'] = 'View feedback for user: {$a}';
$string['viewfullgradingpage'] = 'Open the full grading page to provide feedback';
@@ -269,3 +307,5 @@ $string['viewownsubmissionstatus'] = 'View own submission status page.';
$string['viewsubmissionforuser'] = 'View submission for user: {$a}';
$string['viewsubmission'] = 'View submission';
$string['viewsubmissiongradingtable'] = 'View submission grading table.';
+$string['viewrevealidentitiesconfirm'] = 'View reveal student identities confirmation page.';
+
diff --git a/mod/assign/lib.php b/mod/assign/lib.php
index 18a1b11659c..1636d2e7911 100644
--- a/mod/assign/lib.php
+++ b/mod/assign/lib.php
@@ -113,7 +113,7 @@ function assign_grading_areas_list() {
* @return void
*/
function assign_extend_settings_navigation(settings_navigation $settings, navigation_node $navref) {
- global $PAGE;
+ global $PAGE, $DB;
$cm = $PAGE->cm;
if (!$cm) {
@@ -144,6 +144,14 @@ function assign_extend_settings_navigation(settings_navigation $settings, naviga
$node = $navref->add(get_string('downloadall', 'assign'), $link, navigation_node::TYPE_SETTING);
}
+ if (has_capability('mod/assign:revealidentities', $context)) {
+ $assignment = $DB->get_record('assign', array('id'=>$cm->instance), 'blindmarking, revealidentities');
+
+ if ($assignment && $assignment->blindmarking && !$assignment->revealidentities) {
+ $link = new moodle_url('/mod/assign/view.php', array('id' => $cm->id,'action'=>'revealidentities'));
+ $node = $navref->add(get_string('revealidentities', 'assign'), $link, navigation_node::TYPE_SETTING);
+ }
+ }
}
@@ -216,9 +224,14 @@ function assign_print_overview($courses, &$htmlarray) {
$time = time();
$isopen = false;
if ($assignment->duedate) {
- $isopen = $assignment->allowsubmissionsfromdate <= $time;
- if ($assignment->preventlatesubmissions) {
- $isopen = ($isopen && $time <= $assignment->duedate);
+ $duedate = false;
+ if ($assignment->cutoffdate) {
+ $duedate = $assignment->cutoffdate;
+ }
+ if ($duedate) {
+ $isopen = ($assignment->allowsubmissionsfromdate <= $time && $time <= $duedate);
+ } else {
+ $isopen = ($assignment->allowsubmissionsfromdate <= $time);
}
}
if ($isopen) {
@@ -232,6 +245,9 @@ function assign_print_overview($courses, &$htmlarray) {
}
$strduedate = get_string('duedate', 'assign');
+ $strcutoffdate = get_string('nosubmissionsacceptedafter', 'assign');
+ $strnolatesubmissions = get_string('nolatesubmissions', 'assign');
+ $strduedateno = get_string('duedateno', 'assign');
$strduedateno = get_string('duedateno', 'assign');
$strgraded = get_string('graded', 'assign');
$strnotgradedyet = get_string('notgradedyet', 'assign');
@@ -279,6 +295,13 @@ function assign_print_overview($courses, &$htmlarray) {
} else {
$str .= '
'.$strduedateno.'
';
}
+ if ($assignment->cutoffdate) {
+ if ($assignment->cutoffdate == $assignment->duedate) {
+ $str .= '
- field->param3)) {
echo('"35"');
diff --git a/mod/data/lib.php b/mod/data/lib.php
index 0cc49b31235..e73490cb89c 100644
--- a/mod/data/lib.php
+++ b/mod/data/lib.php
@@ -244,7 +244,7 @@ class data_field_base { // Base class for Database Field Types (see field/*/
$str = '