Now editalways is working in glossaries.

Decide if an entry is editable:
-It isn't a imported entry (so nobody can edit a imported (from secondary to main) entry)) and
-The user is teacher or he is a student with time permissions (edit period or editalways defined).

Bug 1445
(http://moodle.org/bugs/bug.php?op=show&bugid=1445)
This commit is contained in:
stronk7 2004-08-09 15:04:36 +00:00
parent d116ee768a
commit ff1e2621f3
10 changed files with 48 additions and 10 deletions

View file

@ -335,6 +335,10 @@ function glossary_upgrade($oldversion) {
}
}
}
if ( $oldversion < 2004080800) {
table_column("glossary","","editalways","tinyint","2", "unsigned", "0", "", "entbypage");
}
return true;
}

View file

@ -25,6 +25,7 @@ CREATE TABLE prefix_glossary (
defaultapproval tinyint(2) unsigned NOT NULL default '1',
globalglossary tinyint(2) unsigned NOT NULL default '0',
entbypage tinyint(3) unsigned NOT NULL default '10',
editalways tinyint(2) unsigned NOT NULL default '0',
rsstype tinyint(2) unsigned NOT NULL default '0',
rssarticles tinyint(2) unsigned NOT NULL default '0',
assessed int(10) unsigned NOT NULL default '0',

View file

@ -21,6 +21,7 @@ CREATE TABLE prefix_glossary (
showspecial number(2) default '1' not null,
showall number(2) default '1' not null,
showalphabet number(2) default '1' not null,
editalways number(2) default '0' NOT NULL,
rsstype number(2) default '0' NOT NULL,
rssarticles number(2) default '0' NOT NULL,
timecreated number(10) default '0' not null,

View file

@ -97,6 +97,10 @@ function glossary_upgrade($oldversion) {
}
}
if ( $oldversion < 2004080800) {
table_column("glossary","","editalways","integer","2", "unsigned", "0", "", "entbypage");
}
return true;
}

View file

@ -25,6 +25,7 @@ CREATE TABLE prefix_glossary (
defaultapproval int2 NOT NULL default '1',
globalglossary int2 NOT NULL default '0',
entbypage int NOT NULL default '10',
editalways integer NOT NULL default '0',
rsstype integer NOT NULL default '0',
rssarticles integer NOT NULL default '0',
assessed int4 NOT NULL default '0',