--- a/README.txt Thu Dec 03 13:34:25 2009 +0100
+++ b/README.txt Thu Dec 03 16:27:12 2009 +0100
@@ -34,42 +34,43 @@
Installation (development install)
============
1. Install python2.5+ and all required python libraries
- (ubuntu users : 'apt-get install python python-magic python-setuptools python-uno')
+ (ubuntu users : 'sudo apt-get install python python-magic python-setuptools python-uno')
2. Install pandoc
- (ubuntu users : 'apt-get install pandoc')
+ (ubuntu users : 'sudo apt-get install pandoc')
3. Install openoffice (headless mode) [used for document conversion]
- (ubuntu users : 'apt-get install sun-java6-jre openoffice.org openoffice.org-headless xvfb)
+ (ubuntu users : 'sudo apt-get install sun-java6-jre openoffice.org openoffice.org-headless xvfb)
4. Install/configure database [skip this step if you plan to use a sqlite database]
4 a) Postgresql
- Install and configure database server [skip this step if use an external database server]
- (ubuntu users : 'apt-get install postgresql')
+ (ubuntu users : 'sudo apt-get install postgresql')
- Install database client
- (ubuntu users : 'apt-get install postgresql-client')
+ (ubuntu users : 'sudo apt-get install postgresql-client')
- Install python database connector: psycopg2
- (ubuntu users : 'apt-get install python-psycopg2')
+ (ubuntu users : 'sudo apt-get install python-psycopg2')
4 b) Mysql
- Install and configure mysql server [skip this step if use an external database server]
- (ubuntu users : 'apt-get install mysql-server')
+ (ubuntu users : 'sudo apt-get install mysql-server')
- Install database client
- (ubuntu users : 'apt-get install mysql-client')
+ (ubuntu users : 'sudo apt-get install mysql-client')
- Install python database connector: mysqldb
- (ubuntu users : 'apt-get install python-mysqldb')
+ (ubuntu users : 'sudo apt-get install python-mysqldb')
5. Create a database (we recommend UTF8 encoding) and a read/write access to it. [skip this step if you plan to use a sqlite database]
The database account accessing the database MUST have administrative privileges when running the 'syncdb command' (step 8)
(The reason for that is that Postgresql requires such privileges to create the C-based stored procedure that we use for full text indexing)
-7. Setup the project and get dependencies
+ (ex. postgresql: 'sudo -u postgres createdb -E utf8 -e <db_name>)
+6. Setup the project and get dependencies
- `python bootstrap.py`
- `./bin/buildout`
-6. Configure Comt to your settings
+7. Configure Comt to your settings
- copy settings_local_sample.py to settings_local.py (this file will contain your personal settings)
- edit settings_local.py to suit your settings (search for 'YOUR_SETTINGS' occurrences, those are mandatory settings)
-7. Create the database structure (and test your database connection)
+8. Create the database structure (and test your database connection)
- `./bin/django syncdb --settings=settings`
-8. Create basic right management system
+9. Create basic right management system
- `./bin/django loaddata roles_generic --settings=settings`
-9. Launch development server
- - `./bin/django manage.py runserver --settings=settings`
-10. Access your Comt instance by pointing your browser to http://127.0.0.1:8000/
+10. Launch development server
+ - `./bin/django runserver --settings=settings`
+11. Access your Comt instance by pointing your browser to http://127.0.0.1:8000/
Installation (production environment)
=============
@@ -121,4 +122,4 @@
Credits
========
We'd like to thank:
-- Kirill Miazine (http://km.krot.org/) for the norwegian translation
\ No newline at end of file
+- Kirill Miazine (http://km.krot.org/) for the norwegian translation
--- a/src/cm/client.py Thu Dec 03 13:34:25 2009 +0100
+++ b/src/cm/client.py Thu Dec 03 16:27:12 2009 +0100
@@ -217,8 +217,9 @@
if email_or_user :
email_or_user = email_or_user.lower().strip()
+ active = (request.POST.get('active', False) == 'true')
text = Text.objects.get(key=key)
- Notification.objects.set_notification(text=None, type='own', active=True, email_or_user=email_or_user)
+ Notification.objects.set_notification(text=None, type='own', active=active, email_or_user=email_or_user)
ret = HttpResponse()
ret.status_code = 200
return ret
@@ -266,8 +267,8 @@
ask_for_notification = ( None == Notification.objects.get_notifications(text=None, type='own', email_or_user=(user if user else email)))
ret['ask_for_notification'] = ask_for_notification
ret['email'] = '' if user else email
-
- if text_version.mod_posteriori or has_perm(request, 'can_view_unapproved_comment', text=text) :
+
+ if text_version.mod_posteriori or has_perm(request, 'can_view_unapproved_comment', text=text) or has_perm(request, 'can_view_comment_own', text=text) :
ret['comment'] = comment
ret['msg'] = _(u"comment saved")
else :
--- a/src/cm/fixtures/roles_teacher.yaml Thu Dec 03 13:34:25 2009 +0100
+++ b/src/cm/fixtures/roles_teacher.yaml Thu Dec 03 16:27:12 2009 +0100
@@ -14,10 +14,9 @@
fields:
name: "Student"
description: ""
- permissions: [52, 11, 31, 35, 33, 34]
+ permissions: [52, 11, 31, 33, 34]
# can_view_approved_comment 34
# can_delete_comment_own 33
-# can_view_comment_own 35
# can_create_comment 31
# can_view_text 11
# can_view_workspace 52
@@ -27,7 +26,7 @@
fields:
name: "Individual student"
description: ""
- permissions: [52, 11, 31, 35, 33]
+ permissions: [52, 11, 31, 33, 35]
# can_delete_comment_own 33
# can_view_comment_own 35
# can_create_comment 31
--- a/src/cm/media/js/client/c_sync.js Thu Dec 03 13:34:25 2009 +0100
+++ b/src/cm/media/js/client/c_sync.js Thu Dec 03 16:27:12 2009 +0100
@@ -127,11 +127,18 @@
if ("ask_for_notification" in ret) {
if (ret['ask_for_notification']) {
// TODO ask for notification ...or use AUTO_CONTRIB ?
- parent.f_yesNoDialog(gettext("Do you want to subscribe to all replies notifications in discussions you participated in?"), gettext("Follow up"), null, null, null,
+ parent.f_yesNoDialog(gettext("Do you want to subscribe to all replies notifications in discussions you participated in?"), gettext("Follow up"),
function() { // special case : no waiting for the return, no error check, nothing !
var cfg = {
method: "POST",
- data: urlEncode({'fun':'ownNotify', 'key':sv_key, 'email':ret['email']})
+ data: urlEncode({'fun':'ownNotify', 'key':sv_key, 'email':ret['email'], 'active':false})
+ } ;
+ CY.io(sv_client_url, cfg);
+ }, this, null,
+ function() { // special case : no waiting for the return, no error check, nothing !
+ var cfg = {
+ method: "POST",
+ data: urlEncode({'fun':'ownNotify', 'key':sv_key, 'email':ret['email'], 'active':true})
} ;
CY.io(sv_client_url, cfg);
}, this, null) ;
--- a/src/cm/models.py Thu Dec 03 13:34:25 2009 +0100
+++ b/src/cm/models.py Thu Dec 03 16:27:12 2009 +0100
@@ -199,7 +199,7 @@
# comments = self.comment_set.all()
# elif has_perm(user, 'can_view_approved_comment', self.text):
# comments = self.comment_set.filter(visible=True)
-# elif has_perm(user, 'can_view_own_comment', self.text):
+# elif has_perm(user, 'can_view_comment_own', self.text):
# comments = self.comment_set.filter(user=user)
# else:
# return Comment.objects.none() # empty queryset