├── .gitignore
├── activity
└── activity.class.php
├── assignments
├── assignments.class.php
└── formbuilder.class.php
├── bibliography
├── bibliography.class.php
├── bibtex-parser.class.php
└── webapis.class.php
├── bp-courseware-loader.php
├── bp-courseware.php
├── component
└── component.class.php
├── courses
└── courses.class.php
├── dashboards
└── dashboards.class.php
├── gradebook
├── gradebook.class.php
└── parseCSV.class.php
├── groups
├── groups.class.php
└── templates
│ ├── _bibs.php
│ ├── _group_admin_screen.php
│ ├── _lectures.php
│ ├── _message.php
│ ├── _nav.php
│ ├── _no_course_group_header.php
│ ├── _responses.php
│ ├── _trail.php
│ ├── add_response.php
│ ├── dashboard.php
│ ├── edit_assignment.php
│ ├── edit_bibliography.php
│ ├── edit_course.php
│ ├── edit_lecture.php
│ ├── edit_schedule.php
│ ├── gradebook.php
│ ├── helpers
│ ├── editor_helpers.php
│ └── template_helpers.php
│ ├── import_bibliographies.php
│ ├── list_assignments.php
│ ├── list_schedules.php
│ ├── new_assignment.php
│ ├── new_bibliography.php
│ ├── new_lecture.php
│ ├── new_schedule.php
│ ├── single_assignment.php
│ ├── single_course.php
│ ├── single_lecture.php
│ ├── single_response.php
│ └── single_schedule.php
├── languages
├── bpsp-de_DE.mo
├── bpsp-de_DE.po
├── bpsp-es_ES.mo
├── bpsp-es_ES.po
├── bpsp-fr_FR.mo
├── bpsp-fr_FR.po
├── bpsp-it_IT.mo
├── bpsp-it_IT.po
├── bpsp-pt_BR.mo
├── bpsp-pt_BR.po
├── bpsp.pot
└── readme.txt
├── lectures
└── lectures.class.php
├── license.txt
├── mock-buddypress
└── mock-buddypress.php
├── notifications
└── notifications.class.php
├── readme.txt
├── responses
└── responses.class.php
├── roles
└── roles.class.php
├── schedules
├── iCalcreator.class.php
├── iCalcreator
│ ├── iCalcreator.class.php
│ ├── lgpl.txt
│ ├── releaseNotes-2.18
│ ├── summary.html
│ └── using.html
└── schedules.class.php
├── static
├── css
│ ├── courseware-editor.css
│ ├── courseware.css
│ ├── datatables
│ │ ├── images
│ │ │ ├── asc.gif
│ │ │ ├── asc_desc.gif
│ │ │ └── desc.gif
│ │ └── jquery.datatables.css
│ ├── datetimepicker
│ │ └── jquery.timepicker.css
│ ├── flexselect
│ │ └── jquery.flexselect.css
│ ├── formbuilder
│ │ └── jquery.formbuilder.css
│ ├── fullcalendar
│ │ └── jquery.fullcalendar.css
│ └── jquery-ui-custom
│ │ └── theme
│ │ └── smoothness
│ │ ├── images
│ │ ├── ui-anim_basic_16x16.gif
│ │ ├── ui-bg_flat_0_aaaaaa_40x100.png
│ │ ├── ui-bg_flat_75_ffffff_40x100.png
│ │ ├── ui-bg_glass_55_fbf9ee_1x400.png
│ │ ├── ui-bg_glass_65_ffffff_1x400.png
│ │ ├── ui-bg_glass_75_dadada_1x400.png
│ │ ├── ui-bg_glass_75_e6e6e6_1x400.png
│ │ ├── ui-bg_glass_95_fef1ec_1x400.png
│ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png
│ │ ├── ui-icons_222222_256x240.png
│ │ ├── ui-icons_2e83ff_256x240.png
│ │ ├── ui-icons_454545_256x240.png
│ │ ├── ui-icons_888888_256x240.png
│ │ └── ui-icons_cd0a0a_256x240.png
│ │ └── jquery-ui-custom.css
├── images
│ ├── blank_book.png
│ ├── calendar_link.png
│ ├── crumbs.gif
│ ├── loader.gif
│ ├── map_go.png
│ └── web.png
├── js
│ ├── assignments.js
│ ├── bibliography.js
│ ├── courseware-editor.js
│ ├── datatables
│ │ └── jquery.dataTables.min.js
│ ├── datetimepicker
│ │ └── jquery-ui-timepicker-addon.js
│ ├── delete-schedule.js
│ ├── edit-assignment.js
│ ├── edit-bibliograpy.js
│ ├── flexselect
│ │ ├── jquery.flexselect.js
│ │ └── liquidmetal.js
│ ├── formbuilder
│ │ └── jquery.formbuilder.js
│ ├── fullcalendar
│ │ └── fullcalendar.min.js
│ ├── gradebook.js
│ ├── group-dashboard.js
│ ├── inputhint
│ │ └── jquery.inputhint.js
│ ├── jstree
│ │ └── jquery.jstree.js
│ ├── lectures.js
│ ├── list-assignments.js
│ ├── list-schedules.js
│ ├── new-assignment.js
│ ├── new-bibliograpy.js
│ ├── schedules.js
│ ├── single-assignment.js
│ └── sparkline
│ │ └── jquery.sparkline.min.js
└── static.class.php
└── wordpress
├── templates
├── admin.php
└── contextual_help.php
└── wordpress.class.php
/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/.gitignore
--------------------------------------------------------------------------------
/activity/activity.class.php:
--------------------------------------------------------------------------------
1 | groups->id, 'assignment_add', __( 'New assignment', 'bpsp' ) );
30 | bp_activity_set_action( $bp->groups->id, 'lecture_add', __( 'New lecture', 'bpsp' ) );
31 | bp_activity_set_action( $bp->groups->id, 'response_add', __( 'New response', 'bpsp' ) );
32 | bp_activity_set_action( $bp->groups->id, 'schedule_add', __( 'New Schedule', 'bpsp' ) );
33 | }
34 |
35 | /**
36 | * register_filter_options()
37 | *
38 | * Function adds filtering options for activity types for Courseware components
39 | */
40 | function register_filter_options() { ?>
41 |
42 |
43 |
44 |
45 | loggedin_user->id ),
60 | '' . esc_attr( $assignment->post_title ) . '',
61 | '' . esc_attr( $bp->groups->current_group->name ) . ''
62 | );
63 | $activity_content = bp_create_excerpt( $assignment->post_content );
64 | $primary_link = bp_get_group_permalink( $bp->groups->current_group ) . 'courseware/assignment/' . $assignment->post_name . '/';
65 |
66 | groups_record_activity(
67 | array(
68 | 'action' => apply_filters( 'courseware_assignment_activity_action', $activity_action, $assignment->ID, $assignment->post_content, $assignment ),
69 | 'content' => apply_filters( 'courseware_assignment_activity_content', $activity_content, $assignment->ID, $assignment->post_content, $assignment ),
70 | 'primary_link' => apply_filters( 'courseware_assignment_activity_primary_link', "{$primary_link}#post-{$assignment->ID}" ),
71 | 'type' => "assignment_$type",
72 | 'item_id' => $bp->groups->current_group->id
73 | )
74 | );
75 | }
76 |
77 | /**
78 | * activity_for_lecture( $lecture, $type = "add" )
79 | *
80 | * Function generates activity updates on lecture actions
81 | * @param Object $course of type course
82 | * @param String $type, the type of action: add - default, on new lectures
83 | */
84 | function activity_for_lecture( $lecture, $type = "add" ){
85 | global $bp;
86 |
87 | $activity_action = sprintf(
88 | __( '%s changed the lecture %s in %s Courseware:', 'bpsp' ),
89 | bp_core_get_userlink( $bp->loggedin_user->id ),
90 | '' . esc_attr( $lecture->post_title ) . '',
91 | '' . esc_attr( $bp->groups->current_group->name ) . ''
92 | );
93 | $activity_content = bp_create_excerpt( $lecture->post_content );
94 | $primary_link = $lecture->permalink;
95 |
96 | groups_record_activity(
97 | array(
98 | 'action' => apply_filters( 'courseware_course_activity_action', $activity_action, $lecture->ID, $lecture->post_content, $lecture ),
99 | 'content' => apply_filters( 'courseware_course_activity_content', $activity_content, $lecture->ID, $lecture->post_content, $lecture ),
100 | 'primary_link' => apply_filters( 'courseware_course_activity_primary_link', "{$primary_link}#post-{$lecture->ID}" ),
101 | 'type' => "lecture_$type",
102 | 'item_id' => $bp->groups->current_group->id
103 | )
104 | );
105 | }
106 |
107 | /**
108 | * activity_for_response( $response_data, $type = "add" )
109 | *
110 | * Function generates activity updates on response actions
111 | * @param Mixed $response_data, response details
112 | * @param String $type, the type of action: add - default, on response creations
113 | */
114 | function activity_for_response( $response_data, $type = "add" ){
115 | global $bp;
116 |
117 | if( !isset( $response_data['public'] ) || !$response_data['public'] ) {
118 | return;
119 | }
120 |
121 | $response = $response_data['response'];
122 |
123 | $activity_action = sprintf(
124 | __( '%s added a response %s to %s Courseware Assignment:', 'bpsp' ),
125 | bp_core_get_userlink( $bp->loggedin_user->id ),
126 | '' . esc_attr( $response->post_title ) . '',
127 | '' . esc_attr( $bp->groups->current_group->name ) . ''
128 | );
129 | $activity_content = bp_create_excerpt( $response->post_content );
130 | $primary_link = $response_data['assignment_permalink'] . '/response/' . $response->post_name . '/';
131 |
132 | groups_record_activity(
133 | array(
134 | 'action' => apply_filters( 'courseware_response_activity_action', $activity_action, $response->ID, $response->post_content, $response ),
135 | 'content' => apply_filters( 'courseware_response_activity_content', $activity_content, $response->ID, $response->post_content, $response ),
136 | 'primary_link' => apply_filters( 'courseware_response_activity_primary_link', "{$primary_link}#post-{$response->ID}" ),
137 | 'type' => "response_$type",
138 | 'item_id' => $bp->groups->current_group->id
139 | )
140 | );
141 | }
142 |
143 | /**
144 | * activity_for_schedule( $schedule_count, $type = "add" )
145 | *
146 | * Function generates activity updates on schedule actions
147 | * @param Int $schedule_count, nr of added schedules
148 | * @param String $type, the type of action: add - default, on schedule creations
149 | */
150 | function activity_for_schedule( $schedule_count, $type = "add" ){
151 | global $bp;
152 |
153 | $activity_action = sprintf(
154 | __( '%s updated %s Courseware schedule.', 'bpsp' ),
155 | bp_core_get_userlink( $bp->loggedin_user->id ),
156 | '' . esc_attr( $bp->groups->current_group->name ) . ''
157 | );
158 | $primary_link = bp_get_group_permalink( $bp->groups->current_group ) . 'courseware/schedules/';
159 |
160 | groups_record_activity(
161 | array(
162 | 'action' => apply_filters( 'courseware_schedule_activity_action', $activity_action ),
163 | 'primary_link' => apply_filters( 'courseware_schedule_activity_primary_link', $primary_link ),
164 | 'type' => "schedule_$type",
165 | 'item_id' => $bp->groups->current_group->id
166 | )
167 | );
168 | }
169 | }
170 |
--------------------------------------------------------------------------------
/bibliography/bibtex-parser.class.php:
--------------------------------------------------------------------------------
1 | items = array(
22 | 'note' => array(),
23 | 'abstract' => array(),
24 | 'year' => array(),
25 | 'group' => array(),
26 | 'publisher' => array(),
27 | 'page-start' => array(),
28 | 'page-end' => array(),
29 | 'pages' => array(),
30 | 'address' => array(),
31 | 'url' => array(),
32 | 'volume' => array(),
33 | 'chapter' => array(),
34 | 'journal' => array(),
35 | 'author' => array(),
36 | 'raw' => array(),
37 | 'title' => array(),
38 | 'booktitle' => array(),
39 | 'folder' => array(),
40 | 'type' => array(),
41 | 'linebegin' => array(),
42 | 'lineend' => array()
43 | );
44 |
45 | if( $file ) {
46 | $this->filename = $file;
47 | } elseif( $data ) {
48 | $this->inputdata = $data;
49 | }
50 |
51 | // Oh, what the heck!
52 | $this->parse();
53 | }
54 |
55 | /**
56 | * parse()
57 | *
58 | * Main method that parses the data.
59 | */
60 | function parse() {
61 | $value = array();
62 | $var = array();
63 | $this->count = -1;
64 | $lineindex = 0;
65 | $fieldcount = -1;
66 |
67 | if( $this->filename ) {
68 | $lines = file($this->filename);
69 | } else {
70 | $lines = preg_split( '/\n/', $this->inputdata );
71 | }
72 |
73 | if (!$lines) {
74 | return;
75 | }
76 |
77 | foreach($lines as $line) {
78 | $lineindex++;
79 | $this->items['lineend'][$this->count] = $lineindex;
80 | $line = trim($line);
81 | $raw_line = $line + '\n';
82 | $line=str_replace("'","`",$line);
83 | $seg=str_replace("\"","`",$line);
84 | $ps=strpos($seg,'=');
85 | $segtest=strtolower($seg);
86 |
87 | // some funny comment string
88 | if (strpos($segtest,'@string')!==false) {
89 | continue;
90 | }
91 |
92 | // pybliographer comments
93 | if (strpos($segtest,'@comment')!==false) {
94 | continue;
95 | }
96 |
97 | // normal TeX style comment
98 | if (strpos($seg,'%%')!==false) {
99 | continue;
100 | }
101 |
102 | /* ok when there is nothing to see, skip it! */
103 | if (!strlen($seg)) {
104 | continue;
105 | }
106 |
107 | if ("@" == $seg[0]) {
108 | $this->count++;
109 | $this->items['raw'][$this->count] = $line . "\r\n";
110 |
111 | $ps=strpos($seg,'@');
112 | $pe=strpos($seg,'{');
113 | $this->types[$this->count]=trim(substr($seg, 1,$pe-1));
114 | $fieldcount=-1;
115 | $this->items['linebegin'][$this->count] = $lineindex;
116 | $this->items['type'][$this->count] = $this->types[$this->count];
117 | } elseif ($ps!==false ) {
118 | // #of item increase
119 | // one field begins
120 | $this->items['raw'][$this->count] .= $line . "\r\n";
121 | $ps=strpos($seg,'=');
122 | $fieldcount++;
123 | $var[$fieldcount]=strtolower(trim(substr($seg,0,$ps)));
124 |
125 | if ($var[$fieldcount]=='pages') {
126 | $ps=strpos($seg,'=');
127 | $pm=strpos($seg,'--');
128 | $pe=strpos($seg,'},');
129 | $pagefrom[$this->count] = substr($seg,$ps,$pm-$ps);
130 | $pageto[$this->count]=substr($seg,$pm,$pe-$pm);
131 | $bp=str_replace('=','',$pagefrom[$this->count]); $bp=str_replace('{','',$bp);$bp=str_replace('}','',$bp);$bp=trim(str_replace('-','',$bp));
132 | $ep=str_replace('=','',$pageto[$this->count]); $bp=str_replace('{','',$bp);$bp=str_replace('}','',$bp);;$ep=trim(str_replace('-','',$ep));
133 | }
134 | $pe=strpos($seg,'},');
135 |
136 | if ($pe===false) {
137 | $value[$fieldcount]=strstr($seg,'=');
138 | } else {
139 | $value[$fieldcount]=substr($seg,$ps,$pe);
140 | }
141 | } else {
142 | $this->items['raw'][$this->count] .= $line . "\r\n";
143 | $pe=strpos($seg,'},');
144 |
145 | if ($fieldcount > -1) {
146 | if ($pe===false) {
147 | $value[$fieldcount].=' '.strstr($seg,' ');
148 | } else {
149 | $value[$fieldcount] .=' '.substr($seg,$ps,$pe);
150 | }
151 | }
152 | }
153 |
154 | if ($fieldcount > -1) {
155 | $v = $value[$fieldcount];
156 | $v=str_replace('=','',$v);
157 | $v=str_replace('{','',$v);
158 | $v=str_replace('}','',$v);
159 | $v=str_replace(',',' ',$v);
160 | $v=str_replace('\'',' ',$v);
161 | $v=str_replace('\"',' ',$v);
162 | // test!
163 | $v=str_replace('`',' ',$v);
164 | $v=trim($v);
165 | $this->items["$var[$fieldcount]"][$this->count]="$v";
166 | }
167 | }
168 | }
169 | }
170 |
--------------------------------------------------------------------------------
/bibliography/webapis.class.php:
--------------------------------------------------------------------------------
1 | 'for worldcat api'
36 | * - 'isbndb' => 'for isbndb'
37 | * ...
38 | */
39 | function __construct( $keys ) {
40 | if( isset( $keys['worldcat'] ) ) {
41 | $this->worldcat_key = $keys['worldcat'];
42 | }
43 |
44 | if( isset( $keys['isbndb'] ) ) {
45 | $this->isbndb_key = $keys['isbndb'];
46 | }
47 |
48 | $this->worldcat_uri = 'http://www.worldcat.org/webservices/catalog/search/worldcat/';
49 | $this->isbndb_uri = 'http://isbndb.com/api/';
50 | }
51 |
52 | /**
53 | * worldcat_opensearch( $query, $start = 1 )
54 | *
55 | * Performs an WorldCat search
56 | *
57 | * @tutorial http://worldcat.org/devnet/wiki/Code_PHP_OpenSearch
58 | * @param String $query to search
59 | * @param Int $start record position, default 1
60 | * @return Mixed and array with ( 'title', 'author', 'summary', 'content' )
61 | */
62 | function worldcat_opensearch( $query, $start = 1 ) {
63 | if( $this->worldcat_key ) {
64 | $key = $this->worldcat_key;
65 | } else {
66 | return;
67 | }
68 |
69 | // citation format
70 | $cformat = $this->cformat;
71 | // results to return
72 | $count = $this->count;
73 | // format to query
74 | $format = 'atom';
75 | // response array
76 | $r = null;
77 |
78 | // construct worldcat opensearch request
79 | $url = $this->worldcat_uri;
80 | $url .= "opensearch?q=";
81 | $url .= urlencode($query);
82 | $url .= "&format=".$format;
83 | $url .= "&start=".$start;
84 | $url .= "&count=".$count;
85 | $url .= "&cformat=".$cformat;
86 | $url .= "&wskey=".$key;
87 |
88 | $response = fetch_feed( $url );
89 | if( empty( $response->errors ) ) {
90 | $results = $response->get_items();
91 | }
92 |
93 | if ( !empty( $results ) ) {
94 | foreach ($results as $item) {
95 | $author = $item->get_author();
96 |
97 | $isbn_tag = $item->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'identifier');
98 | $isbn = explode( ':', $isbn_tag[0]['data'] );
99 | if( isset( $isbn[2] ) ) {
100 | $isbn = $isbn[2];
101 | }
102 |
103 | $entry = array(
104 | "author" => $author->name,
105 | "title" => $item->get_title(),
106 | "citation" => $item->get_content(),
107 | "url" => $item->get_permalink(),
108 | "isbn" => $isbn,
109 | );
110 |
111 | $r[] = $entry;
112 | }
113 | }
114 |
115 | return $r;
116 | }
117 |
118 | /**
119 | * get_book_cover( $isbn, $size )
120 | *
121 | * Generates a book cover using OpenLibrary Covers API
122 | * @param String $isbn the ISBN id to use
123 | * @param Char $size, the size of the image: default S, can be M or L
124 | * @return String the generated URL
125 | */
126 | function get_book_cover( $isbn, $size = 'S' ) {
127 | if( empty( $isbn ) ) {
128 | return BPSP_Static::get_image( "blank_book.png", false, false );
129 | }
130 |
131 | $openlibrary_uri = 'http://covers.openlibrary.org/b/isbn/%s-%s.jpg';
132 | return sprintf( $openlibrary_uri, $isbn, $size );
133 | }
134 |
135 | /**
136 | * get_www_cover()
137 | *
138 | * Returns a webpage dummy icon
139 | * @return String the generated URL
140 | */
141 | function get_www_cover() {
142 | if( empty( $isbn ) ) {
143 | return BPSP_Static::get_image( "web.png", false, false );
144 | }
145 | }
146 |
147 | /**
148 | * isbndb_query( $isbn, $start = 1 )
149 | *
150 | * Performs an ISBNdb query
151 | *
152 | * @tutorial http://isbndb.com/docs/api/index.html
153 | * @param String $isbn to search
154 | * @param Int $start record position, default 1
155 | * @return Mixed and array with ( 'title', 'author', 'summary', 'content' )
156 | */
157 | function isbndb_query( $isbn, $start = 1 ) {
158 | if( $this->isbndb_key ) {
159 | $key = $this->isbndb_key;
160 | } else {
161 | return;
162 | }
163 |
164 | // Strip '-'
165 | $isbn = str_replace( '-', '', $isbn );
166 |
167 | // results array
168 | $entry = null;
169 |
170 | // construct isbndb api request
171 | $url = $this->isbndb_uri;
172 | $url .= "books.xml?index1=isbn&value1=";
173 | $url .= urlencode($isbn);
174 | $url .= "&access_key=".$key;
175 |
176 | // load xml
177 | $xml = @file_get_contents( $url );
178 | if( $xml != null ) {
179 | $parser = xml_parser_create();
180 | xml_parse_into_struct( $parser, $xml, $tags );
181 | xml_parser_free( $parser );
182 | } else {
183 | return null;
184 | }
185 |
186 | foreach( $tags as $t ) {
187 | if( strtolower( $t['tag'] ) == 'titlelong' ) {
188 | $entry['title'] = $t['value'];
189 | }
190 | if( strtolower( $t['tag'] ) == 'authorstext' ) {
191 | $entry['author'] = $t['value'];
192 | }
193 | if( strtolower( $t['tag'] ) == 'publishertext' ) {
194 | $entry['pub'] = $t['value'];
195 | }
196 | }
197 | $entry['isbn'] = $isbn;
198 |
199 | return array( $entry );
200 | }
201 | }
202 |
--------------------------------------------------------------------------------
/bp-courseware-loader.php:
--------------------------------------------------------------------------------
1 | =' ) ) {
12 | add_action( 'bp_loaded', 'bpsp_courseware_load_core_component' );
13 | add_action( 'bp_init', 'bpsp_init', 6 );
14 | add_action( 'init', 'bpsp_registration' );
15 | }
16 | }
17 | add_action( 'bp_include', 'bp_courseware_init' );
18 |
19 | /**
20 | * Loads component into the $bp global
21 | */
22 | function bpsp_courseware_load_core_component() {
23 | global $bp;
24 | require_once BPSP_PLUGIN_DIR . '/component/component.class.php';
25 | $bp->courseware = new BPSP_Courseware_Component();
26 | }
27 |
28 | // if BuddyPress is not present, use Ian Dunn's loading procedure
29 | if ( ! is_plugin_active( 'buddypress/bp-loader.php' ) ) {
30 |
31 | /**
32 | * On plugins loaded, mimic the component
33 | */
34 | function bpsp_on_plugins_load() {
35 | BPSP_Groups::activate_component();
36 | }
37 | add_action( 'plugins_loaded', 'bpsp_on_plugins_load', 5 );
38 |
39 | // init componenents
40 | add_action( 'init', 'bpsp_init', 6 );
41 |
42 | // register post types
43 | add_action( 'init', 'bpsp_registration' );
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/bp-courseware.php:
--------------------------------------------------------------------------------
1 | %2$s has to be activated!', 'bpsp' ),
81 | admin_url( 'admin.php?page=bp-general-settings' ),
82 | $c
83 | );
84 | }
85 | }
86 | } else {
87 | $messages[] = sprintf(
88 | __( 'BuddyPress Courseware dependency error: Please install BuddyPress!', 'bpsp' ),
89 | admin_url( 'plugins.php' )
90 | );
91 | }
92 | }
93 |
94 | if( !empty( $messages ) ) {
95 | echo '
';
96 | foreach ( $messages as $m ) {
97 | echo "
{$m}
";
98 | }
99 | echo '
';
100 | return false;
101 | }
102 |
103 | return true;
104 |
105 | }
106 |
107 | // Init the componenents
108 | function bpsp_init() {
109 | new BPSP_WordPress();
110 | new BPSP_Roles();
111 | new BPSP_Groups();
112 | new BPSP_Courses();
113 | new BPSP_Lectures();
114 | new BPSP_Assignments();
115 | new BPSP_Responses();
116 | new BPSP_Gradebook();
117 | new BPSP_Bibliography();
118 | new BPSP_Schedules();
119 | new BPSP_Dashboards();
120 | new BPSP_Static();
121 | new BPSP_Activity();
122 | new BPSP_Notifications();
123 | }
124 |
125 | /**
126 | * Register post types and taxonomies
127 | */
128 | function bpsp_registration() {
129 | BPSP_Courses::register_post_types();
130 | BPSP_Lectures::register_post_types();
131 | BPSP_Assignments::register_post_types();
132 | BPSP_Responses::register_post_types();
133 | BPSP_Gradebook::register_post_types();
134 | BPSP_Bibliography::register_post_types();
135 | BPSP_Schedules::register_post_types();
136 | }
137 |
138 | /* Activate the components */
139 | function bpsp_activation() {
140 | if( !bpsp_check() )
141 | exit(1);
142 | BPSP_Roles::register_profile_fields();
143 |
144 | bpsp_registration();
145 | flush_rewrite_rules();
146 | }
147 | register_activation_hook( BPSP_PLUGIN_FILE, 'bpsp_activation' );
148 |
149 | /* Deactivate the components */
150 | function bpsp_deactivation() {
151 | flush_rewrite_rules();
152 | }
153 | register_deactivation_hook( BPSP_PLUGIN_FILE, 'bpsp_deactivation' );
154 | }
155 |
156 | function bpsp_activating_buddypress() {
157 | global $pagenow;
158 | $activating_buddypress = false;
159 |
160 | if ( 'plugins.php' == $pagenow && isset( $_GET['action'], $_GET['plugin'] ) && 'activate' == $_GET['action'] && 'buddypress/bp-loader.php' == $_GET['plugin'] ) {
161 | $activating_buddypress = true;
162 | }
163 |
164 | return $activating_buddypress;
165 | }
166 |
167 |
--------------------------------------------------------------------------------
/component/component.class.php:
--------------------------------------------------------------------------------
1 | active_components[$this->id] = '1';
11 |
12 | parent::start(
13 | 'courseware',
14 | __( 'Courseware', 'bpsp' ),
15 | BPSP_PLUGIN_DIR
16 | );
17 |
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/dashboards/dashboards.class.php:
--------------------------------------------------------------------------------
1 | groups->current_group->id;
34 | }
35 |
36 | $group_data['bibliography'] = array();
37 | $group_data['assignments_count'] = 0;
38 | $group_data['responses_count'] = 0;
39 | $group_data['own_responses_count'] = 0;
40 | $group_data['assignment_topics_count'] = 0;
41 | $group_data['user_grades'] = array();
42 | $group_data['user_bookmark'] = null;
43 | $group_data['courses'] = ( array )BPSP_Courses::has_courses( $group_id );
44 | $group_data['lectures'] = ( array )BPSP_Lectures::has_lectures( $group_id );
45 | $group_data['assignments'] = ( array )BPSP_Assignments::has_assignments( $group_id );
46 | $group_data['schedules'] = BPSP_Schedules::has_schedules( $group_id );
47 | $group_data['lectures'] = BPSP_Lectures::has_lectures( $group_id );
48 | $posts = array_merge( $group_data['courses'], $group_data['assignments'] );
49 |
50 | if( $posts ){
51 | foreach ( $posts as &$post ) {
52 | // Get group bibs
53 | $group_data['bibliography'] = array_merge( $group_data['bibliography'], BPSP_Bibliography::get_bibs( $post->ID ) );
54 | // Get group responses
55 | if( $post->post_type == 'assignment' ) {
56 | // Forum threads
57 | if( get_post_meta( $post->ID, 'topic_link', true ) != '' ) {
58 | $group_data['assignment_topics_count'] += 1;
59 | }
60 | // Responses
61 | $post->responses = get_children( array(
62 | 'post_parent' => $post->ID,
63 | 'post_type' => 'response'
64 | ) );
65 |
66 | foreach( $post->responses as $pr ) {
67 | if( $pr->post_author == get_current_user_id() ) {
68 | $group_data['own_responses_count']++;
69 | }
70 | $group_data['responses_count'] ++;
71 | }
72 |
73 | // Gradebook
74 | $group_data['user_grades'][] = BPSP_Gradebook::load_grade_by_user_id( $post->ID, $bp->loggedin_user->id );
75 | }
76 | }
77 | }
78 |
79 | $bookmark = get_user_meta( get_current_user_id(), 'bookmark_' . bp_get_group_id(), true );
80 | if( $bookmark ) {
81 | $group_data['user_bookmark'] = BPSP_Lectures::is_lecture( $bookmark );
82 | }
83 |
84 | $group_data['assignments_count'] = count( $group_data['assignments'] );
85 | $group_data['bibliography_count'] = count( $group_data['bibliography'] );
86 |
87 | return $group_data;
88 | }
89 |
90 | /**
91 | * group_dashboard( $vars )
92 | *
93 | * Hooks into screen_handler
94 | * Displays group dashboard
95 | *
96 | * @param Array $vars a set of variables received for this screen template
97 | * @return Array $vars a set of variable passed to this screen template
98 | */
99 | function group_dashboard( $vars ) {
100 | global $bp;
101 | $group_data = $this->get_group_courseware( $bp->groups->current_group->id );
102 |
103 | $vars['grades'] = array();
104 | foreach ( $group_data['user_grades'] as $grade )
105 | if( is_numeric( $grade['value'] ) )
106 | $vars['grades'][] = $grade['value'];
107 |
108 | $vars['founder'] = $bp->groups->current_group->creator_id;
109 | $vars['teachers'] = BPSP_Roles::get_teachers( $bp->groups->current_group->id );
110 | $vars['is_teacher'] = BPSP_Roles::can_teach( $bp->loggedin_user->id );
111 | $vars['group_course'] = reset( $group_data['courses'] );
112 | $vars = array_merge( $vars, $group_data );
113 | $vars['items_limit'] = 5;
114 | $vars['name'] = 'dashboard';
115 | $vars['trail'] = array(
116 | ( $vars['is_teacher'] ) ? __( 'Welcome Teacher', 'bpsp' ) : __( 'Welcome Student', 'bpsp' ) => ''
117 | );
118 |
119 | return $vars;
120 | }
121 |
122 | /*
123 | *
124 | */
125 | function shortcode_courseware_dashboard( $attributes ) {
126 | global $bp;
127 |
128 | $course = false;
129 | if ( isset( $_GET['course_id'] ) ) {
130 | $course = BPSP_Courses::is_course( (int) $_GET['course_id'] );
131 | }
132 |
133 | // @todo not pulling in # of lectures, assignments, etc
134 |
135 | if ( $course ) {
136 | $bp->groups->current_group->creator_id = 1; // @todo set to current user? no, to author of course post?
137 | $vars = array_merge(
138 | $this->group_dashboard( array() ),
139 | array(
140 | 'nav_options' => array( __( 'Home', 'bpsp' ) => '' ),
141 | 'group_course' => $course,
142 |
143 | // @todo update link urls
144 | )
145 | );
146 |
147 | BPSP_Groups::load_template( $vars );
148 | } else {
149 | echo 'Invalid course ID
';
150 | }
151 | }
152 | }
153 |
--------------------------------------------------------------------------------
/groups/templates/_bibs.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
59 |
60 |
61 | 0 ): ?>
62 |
63 |
64 |
65 |
66 |
67 | |
68 | |
69 | |
70 |
71 | |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | |
81 |
82 |
83 |
84 |
85 |
86 | |
87 |
88 |
89 | |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
--------------------------------------------------------------------------------
/groups/templates/_group_admin_screen.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
14 |
18 |
19 |
20 |
21 |
27 |
28 |
32 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/groups/templates/_lectures.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
13 |
14 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/groups/templates/_message.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 | .
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/groups/templates/_nav.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | $link ): ?>
6 |
7 | -
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/groups/templates/_no_course_group_header.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/groups/templates/_responses.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | -
8 |
9 | ID ); ?>
10 |
11 | —
12 | .
13 |
14 | ,
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/groups/templates/_trail.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
8 | $link ): ?>
9 | -
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/groups/templates/add_response.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/groups/templates/edit_assignment.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/groups/templates/edit_bibliography.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/groups/templates/edit_lecture.php:
--------------------------------------------------------------------------------
1 |
2 |
56 |
--------------------------------------------------------------------------------
/groups/templates/edit_schedule.php:
--------------------------------------------------------------------------------
1 |
2 |
61 |
--------------------------------------------------------------------------------
/groups/templates/gradebook.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
18 |
19 |
41 |
42 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/groups/templates/helpers/editor_helpers.php:
--------------------------------------------------------------------------------
1 | true
13 | )
14 | );
15 | wp_editor( $content, $target, $settings );
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/groups/templates/helpers/template_helpers.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
15 |
--------------------------------------------------------------------------------
/groups/templates/list_assignments.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | |
8 | |
9 | |
10 | |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 | |
21 | |
22 | |
23 | |
24 |
25 |
29 |
30 |
31 | ID ); ?>
32 |
33 | post_date ),
37 | bp_core_get_userlink( $assignment->post_author )
38 | );
39 | ?>
40 |
41 | |
42 |
43 | form_data ) )
45 | _e( 'Quiz', 'bpsp' );
46 | else
47 | _e( 'Task', 'bpsp' );
48 | ?>
49 | |
50 |
51 | responded_author );
53 | ?>
54 | |
55 |
56 | ID, 'due_date' );
58 | if( !empty( $due_date ) )
59 | bpsp_date( end( $due_date ) );
60 | ?>
61 | |
62 |
63 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/groups/templates/list_schedules.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
12 |
13 | |
14 | |
15 | |
16 | |
17 |
18 |
19 |
20 |
25 |
26 |
27 |
28 | ID ); ?>
29 |
30 |
31 | post_author )
36 | );
37 | ?>
38 |
39 | |
40 |
41 | start_date ); ?>
42 | |
43 |
44 | end_date ); ?>
45 | |
46 |
47 | location; ?>
48 | location ); ?>
49 | |
50 |
51 |
54 |
55 |
56 |
59 |
--------------------------------------------------------------------------------
/groups/templates/new_assignment.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/groups/templates/new_bibliography.php:
--------------------------------------------------------------------------------
1 |
2 |
94 |
--------------------------------------------------------------------------------
/groups/templates/new_lecture.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/groups/templates/new_schedule.php:
--------------------------------------------------------------------------------
1 |
2 |
70 |
--------------------------------------------------------------------------------
/groups/templates/single_assignment.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
120 |
121 |
122 | ID ); ?>
123 |
124 |
125 |
126 | form ) && $show_edit ) : ?>
127 |
128 |
129 |
130 |
131 |
138 |
139 | form ) && isset( $response_add_uri ) ): ?>
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
153 |
--------------------------------------------------------------------------------
/groups/templates/single_course.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
42 |
43 |
44 | ID ); ?>
45 |
46 |
47 |
48 |
49 |
50 |
51 |
55 |
--------------------------------------------------------------------------------
/groups/templates/single_lecture.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
45 |
46 |
47 | ID ); ?>
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/groups/templates/single_response.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
33 |
34 |
ID ); ?>
35 |
36 |
37 | form_values ) && count( $response->form_values ) > 2 ) : ?>
38 |
:
39 |
40 | form_values as $q => $a ): ?>
41 |
42 | -
43 |
44 |
45 | $e): ?>
46 | -
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/groups/templates/single_schedule.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
66 |
67 |
68 | ID ); ?>
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/languages/bpsp-de_DE.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/languages/bpsp-de_DE.mo
--------------------------------------------------------------------------------
/languages/bpsp-es_ES.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/languages/bpsp-es_ES.mo
--------------------------------------------------------------------------------
/languages/bpsp-fr_FR.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/languages/bpsp-fr_FR.mo
--------------------------------------------------------------------------------
/languages/bpsp-it_IT.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/languages/bpsp-it_IT.mo
--------------------------------------------------------------------------------
/languages/bpsp-pt_BR.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/languages/bpsp-pt_BR.mo
--------------------------------------------------------------------------------
/languages/readme.txt:
--------------------------------------------------------------------------------
1 | Run this inside the root folder of Courseware plugin.
2 | find ./ -iname "*.php" | xargs xgettext -j -k__ -k_e -k_ -o languages/bpsp.pot -L PHP --no-wrap
3 |
--------------------------------------------------------------------------------
/mock-buddypress/mock-buddypress.php:
--------------------------------------------------------------------------------
1 | groups->current_group = $bp->groups = $bp = new stdClass();
12 |
13 | // Setup global objects/variables that BPSP expects to exist, and assign mock values
14 | $bp->current_component = 'mock';
15 | $bp->groups->id = 0;
16 | $bp->action_variables = array();
17 |
18 | $current_user = (object) (array) wp_get_current_user(); // casting to stdClass to avoid __deprecated_argument() when accessing ->id
19 | $current_user->id = $current_user->ID;
20 | $bp->loggedin_user = $current_user;
21 |
22 |
23 | // Create stubs for BuddyPress functions
24 | if ( ! function_exists( 'bp_group_is_admin' ) ) {
25 | function bp_group_is_admin() {
26 | return true; // @todo may need to be smarter than this, but see
27 | }
28 | }
29 |
30 | if ( ! function_exists( 'bp_core_admin_hook' ) ) {
31 | function bp_core_admin_hook() {
32 | return 'admin_menu'; // @todo assuming only single site activation for now
33 | }
34 | }
35 |
36 | if ( ! function_exists( 'bp_core_get_userlink' ) ) {
37 | function bp_core_get_userlink() {
38 | return ''; // @todo maybe look website field from wp user profile
39 | }
40 | }
41 |
42 | if ( ! function_exists( 'bp_get_group_permalink' ) ) {
43 | function bp_get_group_permalink() {
44 | return '';
45 | }
46 | }
47 |
48 | if ( ! function_exists( 'xprofile_insert_field_group' ) ) {
49 | function xprofile_insert_field_group() {
50 | return 1;
51 | }
52 | }
53 |
54 | if ( ! function_exists( 'bp_get_group_id' ) ) {
55 | function bp_get_group_id() {
56 | return 1; // @todo group id of current course?
57 | }
58 | }
59 |
60 | if ( ! function_exists( 'groups_get_group_admins' ) ) {
61 | function groups_get_group_admins( $group_id ) {
62 | $admin = new stdClass();
63 | $admin->user_id = 1;
64 | return array( $admin ); // @todo user id of course teacher? no, probably just all users. maybe call group_members to keep it DRY
65 | }
66 | }
67 |
68 | if ( ! function_exists( 'groups_get_group_members' ) ) {
69 | function groups_get_group_members( $group_id ) {
70 | $member = new stdClass();
71 | $member->user_id = 2;
72 |
73 | $members = array();
74 | $members['members'][] = $member;
75 |
76 | return $members; // @todo user ids of course students? no, probably just all users.
77 | }
78 | }
79 |
80 | if ( ! function_exists( 'groups_get_groupmeta' ) ) {
81 | function groups_get_groupmeta( $group_id, $meta_key ) {
82 | return 'true'; // @todo maybe need to be smarter
83 | }
84 | }
85 |
86 | if ( ! function_exists( 'bp_group_is_forum_enabled' ) ) {
87 | function bp_group_is_forum_enabled( $group = false ) {
88 | return true; // @todo smarter?
89 | }
90 | }
91 |
92 | if ( ! function_exists( 'xprofile_get_field_data' ) ) {
93 | function xprofile_get_field_data( $field, $user_id = 0, $multi_format = 'array' ) {
94 | if ( 1 == $user_id ) {
95 | return __( 'Teacher', 'bpsp' );
96 | } else {
97 | return __( 'Student', 'bpsp' );
98 | }
99 |
100 | // @todo needs to be smarter
101 | }
102 | }
103 |
104 | if ( ! function_exists( 'bp_group_forum_permalink' ) ) {
105 | function bp_group_forum_permalink( $group = false ) {
106 | return ''; // @todo
107 | }
108 | }
109 |
110 | // Create stubs for BuddyPress classes
111 | if ( ! class_exists( 'BP_XProfile_Group' ) ) {
112 | class BP_XProfile_Group {
113 | static function get() {
114 | return array();
115 | }
116 | }
117 | }
118 | }
119 | }
120 | add_action( 'plugins_loaded', 'mockbp_init' );
121 |
--------------------------------------------------------------------------------
/notifications/notifications.class.php:
--------------------------------------------------------------------------------
1 | gradebook_update_message( $data, true );
27 | $subject = $this->gradebook_update_message( $data, false, true );
28 | $recipients = $data['grade']['uid'];
29 | } elseif( isset( $data['response'] ) ) {
30 | $content = $this->response_added_message( $data, true );
31 | $subject = $this->response_added_message( $data, false, true );
32 | $recipients = $data['assignment']->post_author;
33 | }
34 | // Hack: ob_*() - to get rid of nasy warnings on messages_new_message()
35 | ob_start();
36 | messages_new_message(
37 | array(
38 | 'recipients' => $recipients,
39 | 'subject' => $subject,
40 | 'content' => $content
41 | )
42 | );
43 | ob_clean();
44 | }
45 |
46 | /**
47 | * gradebook_update_message( $data, $body = false, $subject = false )
48 | *
49 | * Generated content for new request messages.
50 | *
51 | * @param Mixed $data, contains the student id, teacher id, assignment id etc.
52 | * @param bool $body if true generates the message body content
53 | * @param bool $subject if true generates the message subject content
54 | * @return String $content the generated message content
55 | */
56 | function gradebook_update_message( $data, $body = false, $subject = false ) {
57 | $content = null;
58 |
59 | if( $subject ) {
60 | $content = __( 'Your assignment was graded.', 'bpsp' );
61 | }
62 |
63 | if( $body ) {
64 | $content = $data['teacher']->user_nicename;
65 | $content.= __( " graded your assignment: ", 'bpsp' );
66 | $content.= "\n";
67 | $content.= '
' . esc_attr( $data['assignment']->post_title ) . '';
68 | $content.= "\n";
69 | $content.= __( "Follow the link above to see the grade.\n", 'bpsp' );
70 | if ( !empty( $data['grade']['prv_comment'] ) )
71 | $content.= __( "Teacher also left a message for you: \n", 'bpsp' ) .
72 | '
' . $data['grade']['prv_comment'] . "
.\n";
73 | }
74 |
75 | return $content;
76 | }
77 |
78 | /**
79 | * response_added_message( $data, $body = false, $subject = false )
80 | *
81 | * Generated content for new request messages.
82 | *
83 | * @param Mixed $data, contains the student id, teacher id, response id etc.
84 | * @param bool $body if true generates the message body content
85 | * @param bool $subject if true generates the message subject content
86 | * @return String $content the generated message content
87 | */
88 | function response_added_message( $data, $body = false, $subject = false ) {
89 | $content = null;
90 |
91 | if( $subject ) {
92 | $content = __( 'Student replied to your assignment.', 'bpsp' );
93 | }
94 |
95 | if( $body ) {
96 | $content = bp_core_get_user_displayname( $data['response']->post_author );
97 | $content.= __( " added a response to: ", 'bpsp' );
98 | $content.= "\n";
99 | $content.= '
' . esc_attr( $data['assignment']->post_title ) . '';
100 | $content.= "\n";
101 | $content.= __( "Follow the link above to see it.", 'bpsp' );
102 | }
103 |
104 | return $content;
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | === BuddyPress Courseware ===
2 | Contributors: sushkov, jeremyboggs, boonebgorges, johnjamesjacoby, chexee
3 | Tags: buddypress, lms, courseware, education, teaching, quizzes, tests, gradebook, courses, lectures, assignments
4 | Requires at least: WordPress 3.2, BuddyPress 1.5
5 | Tested up to: WordPress 3.5 / BuddyPress 1.6
6 | Stable tag: 0.9.7
7 |
8 | A Learning Management System for BuddyPress
9 |
10 | == Description ==
11 |
12 | A BuddyPress [GSoC](http://www.google-melange.com/) 2010/2011 project.
13 |
14 | Here's the features list:
15 |
16 | * Class Dashboard
17 | * Progress Indicator
18 | * Overall status
19 | * Student evolution (based on received grates)
20 | * Courses / Curriculum
21 | * Lectures
22 | * Handbook/Tree style for content organization
23 | * Bookmarking of lectures
24 | * Bibliography
25 | * Web API's integration with WorldCat/ISBNdb
26 | * BibTex Import
27 | * Assignments
28 | * Responses
29 | * Quizzes/Tests form builder with automatic grading and response evaluation
30 | * Forum/bbPress integration
31 | * Gradebook
32 | * CSV Import
33 | * Certification/Diploma using [BuddyPress Courseware Certificate](http://wordpress.org/extend/plugins/buddypress-courseware-certificate/)
34 | * Schedules
35 | * Calendar
36 | * Month, Week, Day view
37 | * Integrates with Assignments due date
38 | * iCal export/feed
39 | * Customization using an external CSS
40 | * Notifications/Emails
41 | * Activity Streams
42 | * Localizations
43 | * French by [Albert Bruc](http://www.ab-ae.fr/)
44 | * Italian by [Luca Camellini](http://buddypress.org/community/members/luccame/)
45 | * Spanish by [@Design4eStudio](http://design4estudio.com/)
46 | * German by [@chaoti](https://github.com/chaoti)
47 | * Portuguese by [@Dianakc](http://dianakcury.com/)
48 |
49 | [wpvideo AD4hdKWn]
50 |
51 | Plugin page header banner stolen from [SMBC#1092](http://www.smbc-comics.com/index.php?db=comics&id=1092)
52 |
53 | == Installation ==
54 |
55 | Please follow the [standard installation procedure for WordPress plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins).
56 |
57 | == Upgrade Notice ==
58 |
59 | If you are updating from version 0.1.x please backup your database/files!
60 | Courseware 0.9 is not fully backwards compatible!!!
61 |
62 | Also after upgrade|install if you are experiencing publishing problems (content is not published),
63 | make sure you updated your Courseware role in the Profile tab.
64 |
65 | == Frequently Asked Questions ==
66 |
67 | Before asking questions, please check the [BuddyPress Courseware Handbook](http://buddypress.coursewa.re/handbook.html).
68 |
69 | == Changelog ==
70 |
71 | = 0.9.7 =
72 | * Fixed form builder select option uniqness.
73 | * Fixed teachers dashboard count.
74 | * Fixed typo not adding teacher role response capabilities.
75 | * Updated jquery.fullcalendar.
76 | * Fixed typo in jquery-ui css dependencies/version.
77 | * Removed obsolete js dependencies. Now provided by WordPress core.
78 | * Fixed jquery selector typo.
79 | * Fix submenu, after removal of BuddyPress page.
80 | * Small fixes after merge. Updated links.
81 | * Fix use of deprecated function "add_contextual_help"
82 | * Fixed a deprecation warning.
83 | * Fix typos in readme.txt
84 | * Finish renaming of the project. Remove scholarpress links, names.
85 | * Fixed plugin directory banner.
86 | * Updated translation for pt_BR (credits to Dianakc).
87 |
88 | = 0.9.6 =
89 | * Added pt_BR translation, huge thanks to Ruan Barbosa.
90 | * Added banner image.
91 | * Introducing `COURSEWARE_PRIVATE_UPLOADS` constant for disabling private uploads.
92 | * Fixed a couple of typos.
93 | * Added German localization. Huge thanks to @chaoti
94 | * Fix a typo with inversed check of return in new response screen. Props @mattvogt.
95 | * Add jquery-ui datetimepicker. Fixed the regression.
96 |
97 | = 0.9.5 =
98 | * Removed pass-by-reference calls. Props @mercime closes [#69](https://github.com/Courseware/buddypress-courseware/issues/69).
99 | * Fixed the js issue on schedule pages. Closes [#71](https://github.com/Courseware/buddypress-courseware/issues/71).
100 | * Public comments are now visible in assignment pages.
101 | * Append the private message wit the grade notification.
102 | * Skip notifications when grade is not updated. Closes [#72](https://github.com/Courseware/buddypress-courseware/issues/72).
103 | * Cleaned-up the schedule forms.
104 | * Updated to latest jquery.formbuilder, minified version.
105 | * Fixed jquery ui sortable regression.
106 | * Celebrating new home: [coursewa.re](http://coursewa.re)
107 |
108 |
109 | = 0.9.4 =
110 | * WordPress 3.3 BuddyPress 1.5(six-ish) compatibility
111 | * Fixed dashboard date/time issue
112 | * Fixed a some warnings, code cleanups
113 | * Switched to `wp_editor()`
114 | * Pot file updated, translations welcome
115 | * Group course pre-creation [#61](https://github.com/Courseware/buddypress-courseware/issues/issue/61).Props @imjjss
116 | * Search now checks through lectures too
117 | * X-mas release! Happy past birthday to the WordPress core guys and galz!
118 |
119 | = 0.9.3 =
120 | * Another maintenance release
121 | * Fixed `::is_response()` regression. Closes [#56](https://github.com/Courseware/buddypress-courseware/issues/issue/56). Props @enkerli
122 | * New assignment screen now alerts if no lectures are available
123 |
124 | = 0.9.2 =
125 | * Fixed formbuilder regression. Props @enkerli
126 |
127 | = 0.9.1 =
128 | * Updated query var for taxonomies
129 | * Make sure some objects are treated right.
130 | * cleanups for every BPSP_C=
::is_
131 | * Cleanups in post types and taxonomies
132 | * Fixed another typo
133 | * Fixed some typos, improved formbuilder loading
134 | * Fixed a typo not showing member take quiz button. Closes [#55](https://github.com/Courseware/buddypress-courseware/issues/issue/55)
135 |
136 | = 0.9 =
137 | * Major codebase changes!!!
138 | * Assignments reworked (including quizzes, automatic grading)
139 | * Lectures
140 | * Cleaner UI/UX
141 | * Progress indicator and bookmarking
142 | * 3.2, 1.5 compatibility including distraction free writing mode
143 | * Lots of security improvements
144 | * Bookmarking tool
145 | * Progress indicator tool
146 | * Breadcrumbs
147 | * Proper MS support
148 | * French localisation from [Albert Bruc](http://www.ab-ae.fr/)
149 | * [Full changelog](https://github.com/Courseware/buddypress-courseware/issues?state=closed)
150 |
151 | = 0.1.6 =
152 | * Updated wording, @props mrjarbenne. Closes [#27](https://github.com/Courseware/buddypress-courseware/issues/issue/27)
153 | * Importer should work now with php5.1. Closes [#31](https://github.com/Courseware/buddypress-courseware/issues/issue/31)
154 | * Close image now loads on response screens. Closes [#35](https://github.com/Courseware/buddypress-courseware/issues/issue/35)
155 | * Courseware is now compatible with MS admin menu, @props [djpaul](http://buddypress.org/community/members/djpaul). Closes [#36](https://github.com/Courseware/buddypress-courseware/issues/issue/36)
156 | * Fixed the user search according to wp 3.1 changes. Closes [#37](https://github.com/Courseware/buddypress-courseware/issues/issue/37)
157 |
158 | = 0.1.5 =
159 | * Fixed the issue with aliens can post responses.
160 | * Added options to make responses private. Closes [#18](https://github.com/Courseware/buddypress-courseware/issues/issue/18).
161 | * Removed `due_date` field as required from assignments. Closes [#23](https://github.com/Courseware/buddypress-courseware/issues/issue/23).
162 | * Fixed screen permissions for assignments,courses and schedule.
163 | * Added datatables to schedule delete screen.
164 | * Fixed the Teacher persmission for course editor screen. Closes [#26](https://github.com/Courseware/buddypress-courseware/issues/issue/26)
165 | * Added error handling for assignments, fixed the late profile sync issue that closes [#25](https://github.com/Courseware/buddypress-courseware/issues/issue/25)
166 | * Added datatables for schedule listing.
167 | * Added titles for schedules. Closes [#16](https://github.com/Courseware/buddypress-courseware/issues/issue/16)
168 | * Fixed assignment `due_date` typo.
169 | * Updated jquery.timepicker to 0.7
170 | * Updated jquery.fullcalendar to 1.4.8
171 | * The "bábú" release.
172 |
173 | = 0.1.4 =
174 | * Added Italian translation, thanks to [Luca Camellini](http://buddypress.org/community/members/luccame/)
175 | * Fixed the issue with STYLESHEETPATH | stylesheet_directory
176 | * Updated the contextual help with plugins recommendations and handbook info, thanks to [Kyle](http://thecorkboard.org/)
177 | * Fixed the extended search functionality to work properly on no queries
178 | * Fixed the MS issue, where do_not_allow was fired by obsolete capability edit_file
179 | * Final stable release for branch 0.1, dedicated to Moni
180 |
181 | = 0.1.3 =
182 | * Fixed some spelling errors
183 | * Fixed critical query bug in get_objects_in_term() with term_id, props boonebgorges and ebar
184 | * Fixed localization paths
185 |
186 | = 0.1.2 =
187 | * Fixed courseware dashboard and header permissions issues
188 | * Fixed limited size listing of courses/assignments/schedules
189 | * Fixed the issue where schedule end_date was reset by a js file
190 | * Added pot file
191 | * Celebrating my twenty-three :)
192 |
193 | = 0.1.1 =
194 | * Minor bugfixes, mostly permissions related issues in courses.
195 | * The calendar now shows the assignment due_dates, even if no schedules exist.
196 |
197 | = 0.1 =
198 | * First stable release.
199 |
200 | == Screenshots ==
201 |
202 | Please visit the [project page](http://buddypress.coursewa.re) for media files.
203 |
--------------------------------------------------------------------------------
/schedules/iCalcreator/releaseNotes-2.18:
--------------------------------------------------------------------------------
1 | 2.16.13 ######################
2 | BUG: fcn selectComponents, sequence usage
3 |
4 | 2.16.15 ######################
5 | BUG: fcn getComponent, making a selection based on a property value
6 |
7 | 2.16.16 ######################
8 | BUG: fcn _duration2arr, duration parts management
9 |
10 | 2.16.17 ######################
11 | BUG: fcn _duration2arr, array input
12 |
13 | 2.16.18 ######################
14 | BUG: fcn setDuration, empty input
15 |
16 | 2.16.19 ######################
17 | BUG: fcn sort, sort key setting
18 |
19 | 2.16.21 ######################
20 | BUG: mgnt of empty properties
21 |
22 | 2.16.22 ######################
23 | NEW: fcn XML2iCal, rewrite from the furure iCalcreator (Pro) 3.0.0
24 | UPD: fcn iCal2XML, updated from the furure iCalcreator (Pro) 3.0.0
25 |
26 | 2.16.23 ######################
27 | BUG: fcn _duration2arr (setTRIGGER), array input
28 |
29 | 2.16.24 ######################
30 | UPD: fcn _setDate, (_chkDateArr, _strdate2date), DTSTART etc
31 | UPD: fcn _setDate2 (_isArrayDate() DTSTAMP etc
32 |
33 | 2.16.25 ######################
34 | UPD: fcn _format_recur, updated from the furure iCalcreator (Pro) 3.0.0
35 |
36 | 2.16.26 ######################
37 | BUG: fcn parse, 'X-'-properties in an array of (iCal property) lines
38 |
39 | 2.16.27 ######################
40 | NEW: fcn, sort freebusy dates asc
41 |
--------------------------------------------------------------------------------
/static/css/courseware-editor.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Editor Screens
3 | */
4 |
5 | .courseware table.mceLayout * { padding: 0;}
6 | .courseware #TB_window { margin-top: 40px !important; z-index: 1001; }
7 | .courseware.fullscreen-active .mceToolbar { display: none;}
8 |
9 | /* Distraction Free Writing mode
10 | - * =Overlay Styles
11 | --------------------------------------------------------------- */
12 | .fullscreen-overlay {
13 | z-index: 149999;
14 | display: none;
15 | position: fixed;
16 | top: 0;
17 | bottom: 0;
18 | left: 0;
19 | right: 0;
20 | filter: inherit;
21 | background: #f9f9f9;
22 | }
23 |
24 | .fullscreen-active .fullscreen-overlay,
25 | .fullscreen-active #wp-fullscreen-body {
26 | display: block;
27 | }
28 |
29 | .fullscreen-fader {
30 | z-index: 200000;
31 | }
32 |
33 | .fullscreen-active .fullscreen-fader {
34 | display: none;
35 | }
36 |
37 | .fullscreen-active #header {
38 | display: none;
39 | }
40 |
41 | /* =Overlay Body
42 | -------------------------------------------------------------- */
43 | #wp-fullscreen-body {
44 | width: 100%;
45 | z-index: 150005;
46 | display: none;
47 | position: absolute;
48 | top: 0;
49 | left: 0;
50 | }
51 |
52 | #wp-fullscreen-wrap {
53 | margin: 0 auto 50px;
54 | position: relative;
55 | padding-top: 60px;
56 | }
57 |
58 | #wp-fullscreen-title {
59 | font-size: 1.7em;
60 | line-height: 100%;
61 | outline: medium none;
62 | padding: 6px 7px;
63 | width: 100%;
64 | margin-bottom: 30px;
65 | }
66 |
67 | #wp-fullscreen-container {
68 | padding: 4px 5px 50px 10px;
69 | width: 100%;
70 | }
71 |
72 | #wp-fullscreen-title,
73 | #wp-fullscreen-container {
74 | -moz-border-radius: 0;
75 | -khtml-border-radius: 0;
76 | -webkit-border-radius: 0;
77 | border-radius: 0;
78 | border: 1px dashed transparent;
79 | background: transparent;
80 | -moz-transition-property: border-color;
81 | -moz-transition-duration: 0.6s;
82 | -webkit-transition-property: border-color;
83 | -webkit-transition-duration: 0.6s;
84 | -o-transition-property: border-color;
85 | -o-transition-duration: 0.6s;
86 | transition-property: border-color;
87 | transition-duration: 0.6s;
88 | }
89 |
90 |
91 | #wp_mce_fullscreen {
92 | width: 100%;
93 | min-height: 300px;
94 | border: 0;
95 | background: transparent;
96 | font-family: Consolas, Monaco, monospace;
97 | line-height: 1.6em;
98 | padding: 0;
99 | overflow-y: hidden;
100 | outline: none;
101 | resize: none;
102 | }
103 |
104 | #wp-fullscreen-tagline {
105 | color: #BBBBBB;
106 | font-size: 18px;
107 | float: right;
108 | padding-top: 5px;
109 | }
110 |
111 | /* =Top bar
112 | -------------------------------------------------------------- */
113 | #fullscreen-topbar {
114 | position: fixed;
115 | top: 0;
116 | left: 0;
117 | z-index: 150050;
118 | border-bottom-style: solid;
119 | border-bottom-width: 1px;
120 | min-width: 800px;
121 | width: 100%;
122 | height: 40px;
123 | border-bottom-color: #DFDFDF;
124 | background-color: #eee;
125 | background-image: -ms-linear-gradient(top, #f4f4f4, #e9e9e9); /* IE10 */
126 | background-image: -moz-linear-gradient(top, #f4f4f4, #e9e9e9); /* Firefox */
127 | background-image: -o-linear-gradient(top, #f4f4f4, #e9e9e9); /* Opera */
128 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#e9e9e9)); /* old Webkit */
129 | background-image: -webkit-linear-gradient(top, #f4f4f4, #e9e9e9); /* new Webkit */
130 | background-image: linear-gradient(top, #f4f4f4, #e9e9e9); /* proposed W3C Markup */
131 | }
132 |
133 | #wp-fullscreen-toolbar {
134 | padding: 6px 10px 0;
135 | clear: both;
136 | max-width: 1100px;
137 | min-width: 820px;
138 | margin: 0 auto;
139 | }
140 |
141 | #wp-fullscreen-mode-bar,
142 | #wp-fullscreen-button-bar,
143 | #wp-fullscreen-close,
144 | #wp-fullscreen-count,
145 | #wp-fullscreen-save,
146 | #wp-fullscreen-buttons > div {
147 | float: left;
148 | }
149 |
150 | #wp-fullscreen-save {
151 | float: right;
152 | }
153 |
154 | #wp-fullscreen-save {
155 | padding: 2px 2px 0 5px;
156 | }
157 |
158 | #wp-fullscreen-count,
159 | #wp-fullscreen-close {
160 | padding-top: 5px;
161 | }
162 |
163 | #wp-fullscreen-central-toolbar {
164 | margin: auto;
165 | padding: 0;
166 | }
167 |
168 | #wp-fullscreen-buttons > div {
169 | float: left;
170 | }
171 |
172 | #wp-fullscreen-mode-bar {
173 | padding: 1px 14px 0 0;
174 | }
175 |
176 | #wp-fullscreen-modes a {
177 | display: block;
178 | font-size: 11px;
179 | text-decoration: none;
180 | float: left;
181 | margin: 1px 0 0 0;
182 | padding: 2px 6px 2px;
183 | border-width: 1px 1px 1px 0;
184 | border-style: solid;
185 | border-color: #bbb;
186 | color: #777;
187 | text-shadow: 0 1px 0 #fff;
188 | background-color: #f4f4f4;
189 | background-image: -moz-linear-gradient(bottom, #e4e4e4, #f9f9f9);
190 | background-image: -webkit-gradient(linear, left bottom, left top, from(#e4e4e4), to(#f9f9f9));
191 | }
192 |
193 | #wp-fullscreen-modes a:hover,
194 | .wp-html-mode #wp-fullscreen-modes a:last-child,
195 | .wp-tmce-mode #wp-fullscreen-modes a:first-child {
196 | color: #333;
197 | border-color: #999;
198 | background-color: #eee;
199 | background-image: -moz-linear-gradient(bottom, #f9f9f9, #e0e0e0);
200 | background-image: -webkit-gradient(linear, left bottom, left top, from(#f9f9f9), to(#e0e0e0));
201 | }
202 |
203 | #wp-fullscreen-modes a:first-child {
204 | border-width: 1px;
205 | -moz-border-radius: 3px 0 0 3px;
206 | -webkit-border-top-left-radius: 3px;
207 | -webkit-border-bottom-left-radius: 3px;
208 | -khtml-border-top-left-radius: 3px;
209 | -khtml-border-bottom-left-radius: 3px;
210 | border-top-left-radius: 3px;
211 | border-bottom-left-radius: 3px;
212 | }
213 |
214 | #wp-fullscreen-modes a:last-child {
215 | -moz-border-radius: 0 3px 3px 0;
216 | -webkit-border-top-right-radius: 3px;
217 | -webkit-border-bottom-right-radius: 3px;
218 | -khtml-border-top-right-radius: 3px;
219 | -khtml-border-bottom-right-radius: 3px;
220 | border-top-right-radius: 3px;
221 | border-bottom-right-radius: 3px;
222 | }
223 |
224 | #wp-fullscreen-buttons a {
225 | color: #AAA;
226 | }
227 |
228 | #wp-fullscreen-buttons .active a {
229 | background: inherit;
230 | }
231 |
232 | #wp-fullscreen-buttons .hidden,
233 | .wp-html-mode #wp-fullscreen-buttons div,
234 | #wp-fullscreen-buttons .hidden {
235 | display: none;
236 | }
237 |
238 | #wp-fullscreen-buttons .disabled {
239 | opacity: 0.5;
240 | }
241 |
242 | .wp-html-mode #wp-fullscreen-buttons div {
243 | display: none;
244 | }
245 |
246 | .wp-html-mode #wp-fullscreen-buttons div.wp-fullscreen-both {
247 | display: block;
248 | }
249 |
250 | #fullscreen-topbar.fullscreen-make-sticky {
251 | display: block !important;
252 | }
253 |
254 | #wp-fullscreen-save img {
255 | vertical-align: middle;
256 | }
257 |
258 | #wp-fullscreen-save img,
259 | #wp-fullscreen-save span {
260 | padding-right: 4px;
261 | display: none;
262 | }
263 |
264 | #wp-fullscreen-buttons .mce_image .mce_image {
265 | background-image: url("/wp-admin/images/menu.png");
266 | background-position: -124px -38px;
267 | }
268 |
269 | #wp-fullscreen-buttons .mce_image .mce_image:hover {
270 | background-position: -124px -6px;
271 | }
272 |
273 | /* =CSS 3 transitions
274 | -------------------------------------------------------------- */
275 | .fade-1000 {
276 | opacity: 0;
277 | -moz-transition-property: opacity;
278 | -moz-transition-duration: 1s;
279 | -webkit-transition-property: opacity;
280 | -webkit-transition-duration: 1s;
281 | -o-transition-property: opacity;
282 | -o-transition-duration: 1s;
283 | transition-property: opacity;
284 | transition-duration: 1s;
285 | }
286 |
287 | .fade-600 {
288 | opacity: 0;
289 | -moz-transition-property: opacity;
290 | -moz-transition-duration: 0.6s;
291 | -webkit-transition-property: opacity;
292 | -webkit-transition-duration: 0.6s;
293 | -o-transition-property: opacity;
294 | -o-transition-duration: 0.6s;
295 | transition-property: opacity;
296 | transition-duration: 0.6s;
297 | }
298 |
299 | .fade-400 {
300 | opacity: 0;
301 | -moz-transition-property: opacity;
302 | -moz-transition-duration: 0.4s;
303 | -webkit-transition-property: opacity;
304 | -webkit-transition-duration: 0.4s;
305 | -o-transition-property: opacity;
306 | -o-transition-duration: 0.4s;
307 | transition-property: opacity;
308 | transition-duration: 0.4s;
309 | }
310 |
311 | .fade-300 {
312 | opacity: 0;
313 | -moz-transition-property: opacity;
314 | -moz-transition-duration: 0.3s;
315 | -webkit-transition-property: opacity;
316 | -webkit-transition-duration: 0.3s;
317 | -o-transition-property: opacity;
318 | -o-transition-duration: 0.3s;
319 | transition-property: opacity;
320 | transition-duration: 0.3s;
321 | }
322 |
323 | .fade-trigger {
324 | opacity: 1;
325 | }
326 |
327 | /* Formbuilder things */
328 | .frmb .opt_group .fields > input,
329 | .frmb .opt_group .fields > label { display: none !important; }
330 | .frmb-submit { display: none; }
331 | .frm-elements >.frm-fld { display: none; }
332 | .formbuilder-control-box { margin-top: 10px; }
333 | .frm-elements .false-label { margin-left: 0; font-weight: bold; }
--------------------------------------------------------------------------------
/static/css/datatables/images/asc.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/datatables/images/asc.gif
--------------------------------------------------------------------------------
/static/css/datatables/images/asc_desc.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/datatables/images/asc_desc.gif
--------------------------------------------------------------------------------
/static/css/datatables/images/desc.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/datatables/images/desc.gif
--------------------------------------------------------------------------------
/static/css/datatables/jquery.datatables.css:
--------------------------------------------------------------------------------
1 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 | * DataTables features
3 | */
4 |
5 | .dataTables_wrapper {
6 | position: relative;
7 | clear: both;
8 | _height: 302px;
9 | zoom: 1; /* Feeling sorry for IE */
10 | }
11 |
12 | .dataTables_wrapper table {
13 | clear: both;
14 | }
15 |
16 | .dataTables_processing {
17 | position: absolute;
18 | top: 50%;
19 | left: 50%;
20 | width: 250px;
21 | height: 30px;
22 | margin-left: -125px;
23 | margin-top: -15px;
24 | padding: 14px 0 2px 0;
25 | border: 1px solid #ddd;
26 | text-align: center;
27 | color: #999;
28 | font-size: 14px;
29 | background-color: white;
30 | }
31 |
32 | .dataTables_length {
33 | width: 40%;
34 | float: left;
35 | }
36 |
37 | .dataTables_filter {
38 | width: 50%;
39 | float: right;
40 | text-align: right;
41 | }
42 |
43 | .dataTables_info {
44 | float: right;
45 | }
46 |
47 | .dataTables_paginate {
48 | width: auto !important;
49 | }
50 |
51 | /* Pagination nested */
52 | .paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next {
53 | height: 19px;
54 | width: 19px;
55 | margin-left: 3px;
56 | float: left;
57 | }
58 |
59 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
60 | * DataTables display
61 | */
62 | table.display {
63 | margin: 0 auto;
64 | width: 100%;
65 | clear: both;
66 | }
67 |
68 | table.display thead th {
69 | padding: 3px 18px 3px 10px;
70 | border-bottom: 1px solid black;
71 | font-weight: bold;
72 | cursor: pointer;
73 | * cursor: hand;
74 | }
75 |
76 | table.display tfoot th {
77 | padding: 3px 10px;
78 | border-top: 1px solid black;
79 | font-weight: bold;
80 | }
81 |
82 | table.display tr.heading2 td {
83 | border-bottom: 1px solid #aaa;
84 | }
85 |
86 | table.display td {
87 | padding: 3px 10px;
88 | }
89 |
90 | table.display td.center {
91 | text-align: center;
92 | }
93 |
94 |
95 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
96 | * DataTables sorting
97 | */
98 |
99 | .sorting_asc, .sorting_asc_disabled {
100 | background: url('images/asc.gif') no-repeat center right;
101 | }
102 |
103 | .sorting_desc, .sorting_desc_disabled {
104 | background: url('images/desc.gif') no-repeat center right;
105 | }
106 |
107 | .sorting {
108 | background: url('images/asc_desc.gif') no-repeat center right;
109 | }
110 |
111 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
112 | * DataTables row classes
113 | */
114 | tr.odd {
115 | background-color: #FFF;
116 | }
117 |
118 | tr.even {
119 | background-color: #EEE;
120 | }
121 |
122 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
123 | * Misc
124 | */
125 | .top, .bottom {
126 | padding: 15px;
127 | background-color: #F5F5F5;
128 | border: 1px solid #CCCCCC;
129 | }
130 |
131 | .top .dataTables_info {
132 | float: none;
133 | }
134 |
135 | .clear {
136 | clear: both;
137 | }
138 |
139 | .dataTables_empty {
140 | text-align: center;
141 | }
142 |
143 | tfoot input {
144 | margin: 0.5em 0;
145 | width: 100%;
146 | color: #444;
147 | }
148 |
149 | tfoot input.search_init {
150 | color: #999;
151 | }
152 |
153 | td.group {
154 | background-color: #d1cfd0;
155 | border-bottom: 2px solid #A19B9E;
156 | border-top: 2px solid #A19B9E;
157 | }
158 |
159 | td.details {
160 | background-color: #d1cfd0;
161 | border: 2px solid #A19B9E;
162 | }
163 |
164 | .paging_full_numbers {
165 | width: 400px;
166 | height: 22px;
167 | line-height: 22px;
168 | }
169 |
170 | .paging_full_numbers span.paginate_button,
171 | .paging_full_numbers span.paginate_active {
172 | border: 1px solid #aaa;
173 | -webkit-border-radius: 5px;
174 | -moz-border-radius: 5px;
175 | padding: 2px 5px;
176 | margin: 0 3px;
177 | cursor: pointer;
178 | *cursor: hand;
179 | }
180 |
181 | .paging_full_numbers span.paginate_button {
182 | background-color: #ddd;
183 | }
184 |
185 | .paging_full_numbers span.paginate_button:hover {
186 | background-color: #ccc;
187 | }
188 |
189 | .paging_full_numbers span.paginate_active {
190 | background-color: #EEE;
191 | }
192 |
193 | table.display tr.even.row_selected td {
194 | background-color: #EEE;
195 | }
196 |
197 | table.display tr.odd.row_selected td {
198 | background-color: #FFF;
199 | }
200 |
201 | div.box {
202 | height: 100px;
203 | padding: 10px;
204 | overflow: auto;
205 | border: 1px solid #8080FF;
206 | background-color: #E5E5FF;
207 | }
--------------------------------------------------------------------------------
/static/css/datetimepicker/jquery.timepicker.css:
--------------------------------------------------------------------------------
1 | #ui-datepicker-div { font-size: 90%; }
2 | .ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; }
3 | .ui-timepicker-div dl{ text-align: left; }
4 | .ui-timepicker-div dl dt{ height: 25px; }
5 | .ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; }
6 | .ui-timepicker-div .ui_tpicker_hour div { padding-right: 2px; }
7 | .ui-timepicker-div .ui_tpicker_minute div { padding-right: 6px; }
8 | .ui-timepicker-div .ui_tpicker_second div { padding-right: 6px; }
9 | .ui-timepicker-div td { font-size: 90%; }
10 | .ui-datepicker-buttonpane { margin-top: 40px !important; }
11 |
--------------------------------------------------------------------------------
/static/css/flexselect/jquery.flexselect.css:
--------------------------------------------------------------------------------
1 | .flexselect_dropdown {
2 | display: none;
3 | position: absolute;
4 | z-index: 999;
5 | margin: 0;
6 | padding: 0;
7 | border: 1px solid WindowFrame;
8 | max-height: 200px;
9 | overflow-x: hidden;
10 | overflow-y: auto;
11 | background-color: Window;
12 | color: WindowText;
13 | text-align: left;
14 | box-shadow: 0 6px 12px #ccc;
15 | -webkit-box-shadow: 0 6px 12px #ccc;
16 | }
17 |
18 | .flexselect_dropdown ul {
19 | width: 100%;
20 | list-style-position: outside;
21 | list-style: none;
22 | padding: 0;
23 | margin: 0;
24 | }
25 |
26 | .flexselect_dropdown li {
27 | margin: 0px;
28 | padding: 2px 5px;
29 | cursor: pointer;
30 | display: block;
31 | width: 100%;
32 | font: Menu;
33 | overflow: hidden;
34 | }
35 |
36 | .flexselect_selected {
37 | background-color: #DDD;
38 | }
--------------------------------------------------------------------------------
/static/css/formbuilder/jquery.formbuilder.css:
--------------------------------------------------------------------------------
1 | /* jquery.formbuilder css */
2 |
3 | .frmb-control { }
4 |
5 | .frmb-submit { }
6 |
7 | ul.frmb {
8 | padding-left: 0px;
9 | list-style-type: none;
10 | }
11 |
12 | .frmb li {
13 | margin-bottom: 5px;
14 | padding: 5px;
15 | border: 1px solid #EEE;
16 | }
17 |
18 | .frmb li:hover {
19 | border: 1px solid #F7CA75;
20 | background: #FFFEEB;
21 | }
22 |
23 | .frmb .legend {
24 | cursor: move;
25 | }
26 |
27 | .frmb .legend .toggle-form {
28 | float: right;
29 | }
30 |
31 | .frm-elements {
32 | padding: 5px 0;
33 | }
34 |
35 | .frm-elements label {
36 | width: 20%;
37 | float: left;
38 | margin-left: 5px;
39 | line-height: 24px;
40 | }
41 |
42 | .frm-elements .false-label {
43 | width: 20%;
44 | float: left;
45 | margin-left: 5px;
46 | line-height: 24px;
47 | }
48 |
49 | .frm-elements input[type=text] {
50 | float: left;
51 | width: 70%;
52 | }
53 |
54 | .frm-elements .fields {
55 | width: 70%;
56 | float: left;
57 | }
58 |
59 | .frm-elements .fields input[type=checkbox],
60 | .frm-elements .fields input[type=radio] {
61 | float: left;
62 | margin-right: 10px;
63 | }
64 |
65 | .frm-elements .false-label,
66 | .frm-elements .fields { margin-top: 10px }
67 |
68 | .frm-elements .fields div {
69 | clear: both;
70 | float: left;
71 | width: 99%;
72 | }
73 |
74 | .frm-elements .fields input[type=text] {
75 | width: 75%;
76 | }
77 |
78 | .frm-elements .fields label.auto {
79 | width: auto;
80 | margin: 0 0 5px 0;
81 | }
82 |
83 | .frm-elements .fields .remove {
84 | margin-left: 10px;
85 | line-height: 24px;
86 | }
87 |
88 | .frm-elements .fields .add-area {
89 | position: relative;
90 | left: -30px;
91 | line-height: 0;
92 | margin-top: -13px;
93 | }
94 |
95 | .frm-elements .fields .add-area .add {
96 | clear: both;
97 | }
98 |
99 | .frm-elements:after,
100 | .frm-fld:after {
101 | content: ".";
102 | display: block;
103 | height: 0;
104 | clear: both;
105 | visibility: hidden;
106 | }
107 |
108 | .frm-elements,
109 | .frm-fld { display: inline-block }
110 |
111 | .frm-elements,
112 | .frm-fld { display: block }
113 |
114 | .del-button {
115 | float: right;
116 | margin-right: 10px;
117 | }
--------------------------------------------------------------------------------
/static/css/jquery-ui-custom/theme/smoothness/images/ui-anim_basic_16x16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/jquery-ui-custom/theme/smoothness/images/ui-anim_basic_16x16.gif
--------------------------------------------------------------------------------
/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
--------------------------------------------------------------------------------
/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_flat_75_ffffff_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
--------------------------------------------------------------------------------
/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
--------------------------------------------------------------------------------
/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_glass_65_ffffff_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
--------------------------------------------------------------------------------
/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_glass_75_dadada_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_glass_75_dadada_1x400.png
--------------------------------------------------------------------------------
/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
--------------------------------------------------------------------------------
/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
--------------------------------------------------------------------------------
/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/jquery-ui-custom/theme/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
--------------------------------------------------------------------------------
/static/css/jquery-ui-custom/theme/smoothness/images/ui-icons_222222_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/jquery-ui-custom/theme/smoothness/images/ui-icons_222222_256x240.png
--------------------------------------------------------------------------------
/static/css/jquery-ui-custom/theme/smoothness/images/ui-icons_2e83ff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/jquery-ui-custom/theme/smoothness/images/ui-icons_2e83ff_256x240.png
--------------------------------------------------------------------------------
/static/css/jquery-ui-custom/theme/smoothness/images/ui-icons_454545_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/jquery-ui-custom/theme/smoothness/images/ui-icons_454545_256x240.png
--------------------------------------------------------------------------------
/static/css/jquery-ui-custom/theme/smoothness/images/ui-icons_888888_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/jquery-ui-custom/theme/smoothness/images/ui-icons_888888_256x240.png
--------------------------------------------------------------------------------
/static/css/jquery-ui-custom/theme/smoothness/images/ui-icons_cd0a0a_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/css/jquery-ui-custom/theme/smoothness/images/ui-icons_cd0a0a_256x240.png
--------------------------------------------------------------------------------
/static/images/blank_book.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/images/blank_book.png
--------------------------------------------------------------------------------
/static/images/calendar_link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/images/calendar_link.png
--------------------------------------------------------------------------------
/static/images/crumbs.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/images/crumbs.gif
--------------------------------------------------------------------------------
/static/images/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/images/loader.gif
--------------------------------------------------------------------------------
/static/images/map_go.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/images/map_go.png
--------------------------------------------------------------------------------
/static/images/web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Courseware/buddypress-courseware/9b134c727b4316cd468b30ffbb2223149be1a47b/static/images/web.png
--------------------------------------------------------------------------------
/static/js/assignments.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for assignments screens
3 | */
4 |
5 | // Localize DateTimePicker
6 | dtpLanguage['monthNames'] = dtpLanguage['monthNames'].split( ',' );
7 | dtpLanguage['dayNamesMin'] = dtpLanguage['dayNamesMin'].split( ',' );
8 | dtpLanguage['firstDay'] = eval( dtpLanguage['firstDay'] );
9 | dtpLanguage['isRTL'] = eval( dtpLanguage['isRTL'] );
10 | dtpLanguage['showMonthAfterYear'] = eval( dtpLanguage['showMonthAfterYear'] );
11 | jQuery.datepicker.setDefaults( dtpLanguage );
12 |
13 | jQuery( "input[name$='assignment[due_date]']" ).datetimepicker({
14 | holdDatepickerOpen: true,
15 | showButtonPanel: true,
16 | timeFormat: 'hh:mm:ss',
17 | dateFormat: 'yy-mm-dd'
18 | });
19 |
--------------------------------------------------------------------------------
/static/js/bibliography.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for bibliographies screens
3 | */
4 | // FlexSelect
5 | jQuery("select[name$='bib[existing]']").flexselect();
6 |
7 | // Toggle Bibs
8 | jQuery("#courseware-bibs-list").hide();
9 | jQuery("#courseware-bibs-form .add").hide();
10 | jQuery("ul.courseware-meta li.add").hide();
11 |
12 | jQuery("ul.courseware-meta li.show-bibs a").on( 'click', function() {
13 | jQuery("ul.courseware-meta li.add").slideToggle();
14 | jQuery("#courseware-bibs-form .add").hide();
15 | jQuery("#courseware-bibs-list").slideToggle();
16 | event.preventDefault();
17 | return false;
18 | })
19 |
20 | jQuery("ul.courseware-meta li.add.bib").on( 'click', function() {
21 | jQuery("#courseware-bibs-form .add").hide();
22 | jQuery("#courseware-bibs-form .existing").slideToggle();
23 | event.preventDefault();
24 | return false;
25 | })
26 |
27 | jQuery("ul.courseware-meta li.add.book").on( 'click', function() {
28 | jQuery("#courseware-bibs-form .add").hide();
29 | jQuery("#courseware-bibs-form .book").slideToggle();
30 | event.preventDefault();
31 | return false;
32 | })
33 |
34 | jQuery("ul.courseware-meta li.add.www").on( 'click', function() {
35 | jQuery("#courseware-bibs-form .add").hide();
36 | jQuery("#courseware-bibs-form .www").slideToggle();
37 | event.preventDefault();
38 | return false;
39 | })
40 |
41 | // Didn't find another way to 'localize' this
42 | oLanguage.oPaginate = [];
43 | oLanguage.oPaginate.sFirst = '«';
44 | oLanguage.oPaginate.sPrevious = '‹';
45 | oLanguage.oPaginate.sNext = '›';
46 | oLanguage.oPaginate.sLast = '»';
47 |
48 | // Load DataTables
49 | jQuery("table.datatables").dataTable( {
50 | "oLanguage": oLanguage,
51 | "aaSorting": [[ 1, "asc" ]],
52 | "sPaginationType": "full_numbers"
53 | } );
--------------------------------------------------------------------------------
/static/js/courseware-editor.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for editor screens
3 | */
4 |
5 | jQuery('#new-course-content label').hide();
6 | jQuery('input[name="course[title]"]').inputHint();
7 | jQuery('input[name="assignment[title]"]').inputHint();
8 | jQuery('input[name="assignment[due_date]"]').inputHint();
9 | jQuery('input[name="response[title]"]').inputHint();
10 | jQuery('input[name="lecture[title]"]').inputHint();
11 | jQuery('input[name="lecture[order]"]').inputHint();
12 |
13 | // Distraction free writing compatibility
14 | jQuery(function($) {
15 | // Try to check for content_id, wp-fullscreen fails here
16 | $("#wp-fullscreen-body").one("mousemove", function(){
17 | var content_elem = document.getElementById( fullscreen.settings.editor_id );
18 | var editor_mode = $(content_elem).is(':hidden') ? 'tinymce' : 'html';
19 | fullscreen.switchmode(editor_mode);
20 | });
21 |
22 | // Delete the loader, it won't load anyway
23 | $('#wp-fullscreen-save img').remove();
24 |
25 | // Make word counts work
26 | $(document).triggerHandler('wpcountwords', [ $(edCanvas).val() ] );
27 | });
28 |
29 | // Rewrite editor_plugin.js to make it usable outside wp-admin
30 | /**
31 | * WP Fullscreen TinyMCE plugin
32 | *
33 | * Contains code from Moxiecode Systems AB released under LGPL License http://tinymce.moxiecode.com/license
34 | */
35 | jQuery(document).ready(function() {
36 | tinymce.PluginManager.onAdd.add(function(a, b){
37 | if ( b == 'wpfullscreen' )
38 | return false;
39 | });
40 | tinymce.create('tinymce.plugins.wpFullscreenPlugin', {
41 |
42 | init : function(ed, url) {
43 | var t = this, oldHeight = 0, s = {}, DOM = tinymce.DOM, resized = false;
44 |
45 | // Register commands
46 | ed.addCommand('wpFullScreenClose', function() {
47 | // this removes the editor, content has to be saved first with tinyMCE.execCommand('wpFullScreenSave');
48 | if ( ed.getParam('wp_fullscreen_is_enabled') ) {
49 | DOM.win.setTimeout(function() {
50 | tinyMCE.remove(ed);
51 | DOM.remove('wp_mce_fullscreen_parent');
52 | tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
53 | }, 10);
54 | }
55 | });
56 |
57 | ed.addCommand('wpFullScreenSave', function() {
58 | var ed = tinyMCE.get('wp_mce_fullscreen'), edd;
59 |
60 | ed.focus();
61 | edd = tinyMCE.get( ed.getParam('wp_fullscreen_editor_id') );
62 |
63 | edd.setContent( ed.getContent({format : 'raw'}), {format : 'raw'} );
64 | });
65 |
66 | ed.addCommand('wpFullScreenInit', function() {
67 | var d, b, fsed;
68 |
69 | ed = (tinyMCE.editors.length > 0) ? tinyMCE.editors[0] : tinymce.get('content');
70 | d = ed.getDoc();
71 | b = d.body;
72 |
73 | tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
74 |
75 | tinymce.each(ed.settings, function(v, n) {
76 | s[n] = v;
77 | });
78 |
79 | s.id = 'wp_mce_fullscreen';
80 | s.wp_fullscreen_is_enabled = true;
81 | s.wp_fullscreen_editor_id = ed.id;
82 | s.theme_advanced_resizing = false;
83 | s.theme_advanced_statusbar_location = 'none';
84 | s.content_css = s.content_css ? s.content_css + ',' + s.wp_fullscreen_content_css : s.wp_fullscreen_content_css;
85 | s.height = tinymce.isIE ? b.scrollHeight : b.offsetHeight;
86 |
87 | tinymce.each(ed.getParam('wp_fullscreen_settings'), function(v, k) {
88 | s[k] = v;
89 | });
90 |
91 | fsed = new tinymce.Editor('wp_mce_fullscreen', s);
92 | fsed.onInit.add(function(edd) {
93 | var DOM = tinymce.DOM, buttons = DOM.select('a.mceButton', DOM.get('wp-fullscreen-buttons'));
94 |
95 | if ( !ed.isHidden() )
96 | edd.setContent( ed.getContent() );
97 | else
98 | edd.setContent( switchEditors.wpautop( edd.getElement().value ) );
99 |
100 | setTimeout(function(){ // add last
101 | edd.onNodeChange.add(function(ed, cm, e){
102 | tinymce.each(buttons, function(c) {
103 | var btn, cls;
104 |
105 | if ( btn = DOM.get( 'wp_mce_fullscreen_' + c.id.substr(6) ) ) {
106 | cls = btn.className;
107 |
108 | if ( cls )
109 | c.className = cls;
110 | }
111 | });
112 | });
113 | }, 1000);
114 |
115 | edd.dom.addClass(edd.getBody(), 'wp-fullscreen-editor');
116 | edd.focus();
117 | });
118 |
119 | fsed.render();
120 |
121 | if ( 'undefined' != fullscreen ) {
122 | fsed.dom.bind( fsed.dom.doc, 'mousemove', function(e){
123 | fullscreen.bounder( 'showToolbar', 'hideToolbar', 2000, e );
124 | });
125 | }
126 | });
127 |
128 | // Register buttons
129 | if ( 'undefined' != fullscreen ) {
130 | ed.addButton('wp_fullscreen', {
131 | title : 'fullscreen.desc',
132 | onclick : function(){ fullscreen.on(); }
133 | });
134 | }
135 |
136 | // END fullscreen
137 | //----------------------------------------------------------------
138 | // START autoresize
139 |
140 | if ( ed.getParam('fullscreen_is_enabled') || !ed.getParam('wp_fullscreen_is_enabled') )
141 | return;
142 |
143 | /**
144 | * This method gets executed each time the editor needs to resize.
145 | */
146 | function resize() {
147 |
148 | if ( resized )
149 | return;
150 |
151 | var d = ed.getDoc(), DOM = tinymce.DOM, resizeHeight, myHeight;
152 |
153 | // Get height differently depending on the browser used
154 | if ( tinymce.isIE )
155 | myHeight = d.body.scrollHeight;
156 | else
157 | myHeight = d.documentElement.offsetHeight;
158 |
159 | // Don't make it smaller than 300px
160 | resizeHeight = (myHeight > 300) ? myHeight : 300;
161 |
162 | // Resize content element
163 | if ( oldHeight != resizeHeight ) {
164 | oldHeight = resizeHeight;
165 | resized = true;
166 | setTimeout(function(){ resized = false; }, 100);
167 |
168 | DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
169 | }
170 | };
171 |
172 | // Add appropriate listeners for resizing content area
173 | ed.onInit.add(function(ed, l) {
174 | ed.onChange.add(resize);
175 | ed.onSetContent.add(resize);
176 | ed.onPaste.add(resize);
177 | ed.onKeyUp.add(resize);
178 | ed.onPostRender.add(resize);
179 |
180 | ed.getBody().style.overflowY = "hidden";
181 | });
182 |
183 | if (ed.getParam('autoresize_on_init', true)) {
184 | ed.onLoadContent.add(function(ed, l) {
185 | // Because the content area resizes when its content CSS loads,
186 | // and we can't easily add a listener to its onload event,
187 | // we'll just trigger a resize after a short loading period
188 | setTimeout(function() {
189 | resize();
190 | }, 1200);
191 | });
192 | }
193 |
194 | // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
195 | ed.addCommand('wpAutoResize', resize);
196 | },
197 |
198 | getInfo : function() {
199 | return {
200 | longname : 'WP Fullscreen',
201 | author : 'WordPress',
202 | authorurl : 'http://wordpress.org',
203 | infourl : '',
204 | version : '1.0'
205 | };
206 | }
207 | });
208 |
209 | // Register plugin
210 | tinymce.PluginManager.add('wpfullscreenFixed', tinymce.plugins.wpFullscreenPlugin);
211 | });
--------------------------------------------------------------------------------
/static/js/delete-schedule.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for delete schedule screen
3 | */
4 | // Didn't find another way to 'localize' this
5 | oLanguage.oPaginate = [];
6 | oLanguage.oPaginate.sFirst = '«';
7 | oLanguage.oPaginate.sPrevious = '‹';
8 | oLanguage.oPaginate.sNext = '›';
9 | oLanguage.oPaginate.sLast = '»';
10 |
11 | // Load DataTables
12 | jQuery("table.datatables").dataTable( {
13 | "bJQueryUI": true,
14 | "oLanguage": oLanguage,
15 | "aaSorting": [[ 1, "desc" ]],
16 | "sPaginationType": "full_numbers"
17 | } );
--------------------------------------------------------------------------------
/static/js/edit-assignment.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for edit assignment screens
3 | */
4 |
5 | jQuery('#courseware-assignment-builder').formbuilder({
6 | 'load_url': '?get_form_data',
7 | 'control_box_target': '#edit-assignment-formbuilder-control-box',
8 | 'messages': fbLanguage
9 | });
10 |
11 | jQuery("#courseware-assignment-builder ul").sortable({ opacity: 0.6, cursor: 'move'});
12 | jQuery("#edit-assignment-submit").bind( 'click', function() {
13 | var form_data = jQuery("#courseware-assignment-builder ul").serializeFormList({'prepend': 'assignment-frmb'});
14 | jQuery("#edit-assignment-post-form").val(form_data);
15 | });
16 |
--------------------------------------------------------------------------------
/static/js/edit-bibliograpy.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for edit bibliography screen
3 | */
4 |
5 | jQuery('#bibliography-form-content label').hide();
6 | jQuery('.courseware-form-section input[type="text"]').inputHint();
7 | jQuery('.courseware-form-section textarea').inputHint();
--------------------------------------------------------------------------------
/static/js/flexselect/jquery.flexselect.js:
--------------------------------------------------------------------------------
1 | /*
2 | * flexselect: a jQuery plugin, version: 0.2 (2009-03-16)
3 | * @requires jQuery v1.3 or later
4 | *
5 | * FlexSelect is a jQuery plugin that makes it easy to convert a select box into
6 | * a Quicksilver-style, autocompleting, flex matching selection tool.
7 | *
8 | * For usage and examples, visit:
9 | * http://rmm5t.github.com/jquery-flexselect/
10 | *
11 | * Licensed under the MIT:
12 | * http://www.opensource.org/licenses/mit-license.php
13 | *
14 | * Copyright (c) 2009, Ryan McGeary (ryanonjavascript -[at]- mcgeary [*dot*] org)
15 | */
16 | (function($) {
17 | $.flexselect = function(select, options) { this.init(select, options); };
18 |
19 | $.extend($.flexselect.prototype, {
20 | settings: {
21 | allowMismatch: false,
22 | selectedClass: "flexselect_selected",
23 | dropdownClass: "flexselect_dropdown",
24 | inputIdTransform: function(id) { return id + "_flexselect"; },
25 | inputNameTransform: function(name) { return; },
26 | dropdownIdTransform: function(id) { return id + "_flexselect_dropdown"; }
27 | },
28 | select: null,
29 | input: null,
30 | hidden: null,
31 | dropdown: null,
32 | dropdownList: null,
33 | cache: [],
34 | results: [],
35 | lastAbbreviation: null,
36 | abbreviationBeforeFocus: null,
37 | selectedIndex: 0,
38 | picked: false,
39 | dropdownMouseover: false, // Workaround for poor IE behaviors
40 |
41 | init: function(select, options) {
42 | $.extend(this.settings, options);
43 | this.select = $(select);
44 | this.preloadCache();
45 | this.renderControls();
46 | this.wire();
47 | },
48 |
49 | preloadCache: function() {
50 | this.cache = this.select.children("option").map(function() {
51 | return { name: $.trim($(this).text()), value: $(this).val(), score: 0.0 };
52 | });
53 | },
54 |
55 | renderControls: function() {
56 | var selected = this.select.children("option:selected");
57 |
58 | this.hidden = $("").attr({
59 | id: this.select.attr("id"),
60 | name: this.select.attr("name")
61 | }).val(selected.val());
62 |
63 | this.input = $("").attr({
64 | id: this.settings.inputIdTransform(this.select.attr("id")),
65 | name: this.settings.inputNameTransform(this.select.attr("name")),
66 | accesskey: this.select.attr("accesskey"),
67 | tabindex: this.select.attr("tabindex"),
68 | style: this.select.attr("style")
69 | }).addClass(this.select.attr("class")).val($.trim(selected.text()));
70 |
71 | this.dropdown = $("").attr({
72 | id: this.settings.dropdownIdTransform(this.select.attr("id"))
73 | }).addClass(this.settings.dropdownClass);
74 | this.dropdownList = $("");
75 | this.dropdown.append(this.dropdownList);
76 |
77 | this.select.after(this.input).after(this.hidden).remove();
78 | $("body").append(this.dropdown);
79 | },
80 |
81 | wire: function() {
82 | var self = this;
83 |
84 | this.input.click(function() {
85 | self.lastAbbreviation = null;
86 | self.focus();
87 | });
88 |
89 | this.input.mouseup(function(event) {
90 | // This is so Safari selection actually occurs.
91 | event.preventDefault();
92 | });
93 |
94 | this.input.focus(function() {
95 | self.abbreviationBeforeFocus = self.input.val();
96 | self.input.select();
97 | if (!self.picked) self.filterResults();
98 | });
99 |
100 | this.input.blur(function() {
101 | if (!self.dropdownMouseover) {
102 | self.hide();
103 | if (!self.picked) self.reset();
104 | }
105 | });
106 |
107 | this.dropdownList.mouseover(function (event) {
108 | if (event.target.tagName == "LI") {
109 | var rows = self.dropdown.find("li");
110 | self.markSelected(rows.index($(event.target)));
111 | }
112 | });
113 | this.dropdownList.mouseleave(function () {
114 | self.markSelected(-1);
115 | });
116 | this.dropdownList.mouseup(function (event) {
117 | self.pickSelected();
118 | self.focusAndHide();
119 | });
120 | this.dropdown.mouseover(function (event) {
121 | self.dropdownMouseover = true;
122 | });
123 | this.dropdown.mouseleave(function (event) {
124 | self.dropdownMouseover = false;
125 | });
126 | this.dropdown.mousedown(function (event) {
127 | event.preventDefault();
128 | });
129 |
130 | this.input.keyup(function(event) {
131 | switch (event.keyCode) {
132 | case 13: // return
133 | event.preventDefault();
134 | self.pickSelected();
135 | self.focusAndHide();
136 | break;
137 | case 27: // esc
138 | event.preventDefault();
139 | self.reset();
140 | self.focusAndHide();
141 | break;
142 | default:
143 | self.filterResults();
144 | break;
145 | }
146 | });
147 |
148 | this.input.keydown(function(event) {
149 | switch (event.keyCode) {
150 | case 9: // tab
151 | self.pickSelected();
152 | self.hide();
153 | break;
154 | case 33: // pgup
155 | event.preventDefault();
156 | self.markFirst();
157 | break;
158 | case 34: // pgedown
159 | event.preventDefault();
160 | self.markLast();
161 | break;
162 | case 38: // up
163 | event.preventDefault();
164 | self.moveSelected(-1);
165 | break;
166 | case 40: // down
167 | event.preventDefault();
168 | self.moveSelected(1);
169 | break;
170 | case 13: // return
171 | case 27: // esc
172 | event.preventDefault();
173 | event.stopPropagation();
174 | break;
175 | }
176 | });
177 | },
178 |
179 | filterResults: function() {
180 | var abbreviation = this.input.val();
181 | if (abbreviation == this.lastAbbreviation) return;
182 |
183 | var results = [];
184 | $.each(this.cache, function() {
185 | this.score = LiquidMetal.score(this.name, abbreviation);
186 | if (this.score > 0.0) results.push(this);
187 | });
188 | this.results = results;
189 |
190 | this.sortResults();
191 | this.renderDropdown();
192 | this.markFirst();
193 | this.lastAbbreviation = abbreviation;
194 | this.picked = false;
195 | },
196 |
197 | sortResults: function() {
198 | this.results.sort(function(a, b) { return b.score - a.score; });
199 | },
200 |
201 | renderDropdown: function() {
202 | var dropdownBorderWidth = this.dropdown.outerWidth() - this.dropdown.innerWidth();
203 | var inputOffset = this.input.offset();
204 | this.dropdown.css({
205 | width: (this.input.outerWidth() - dropdownBorderWidth) + "px",
206 | top: (inputOffset.top + this.input.outerHeight()) + "px",
207 | left: inputOffset.left + "px"
208 | });
209 |
210 | var list = this.dropdownList.html("");
211 | $.each(this.results, function() {
212 | // list.append($("").html(this.name + " [" + Math.round(this.score*100)/100 + "]"));
213 | list.append($("").html(this.name));
214 | });
215 | this.dropdown.show();
216 | },
217 |
218 | markSelected: function(n) {
219 | if (n > this.results.length) return;
220 |
221 | var rows = this.dropdown.find("li");
222 | rows.removeClass(this.settings.selectedClass);
223 | this.selectedIndex = n;
224 |
225 | if (n >= 0) $(rows[n]).addClass(this.settings.selectedClass);
226 | },
227 |
228 | pickSelected: function() {
229 | var selected = this.results[this.selectedIndex];
230 | if (selected) {
231 | this.input.val(selected.name);
232 | this.hidden.val(selected.value);
233 | this.picked = true;
234 | } else if (this.settings.allowMismatch) {
235 | this.hidden.val("");
236 | } else {
237 | this.reset();
238 | }
239 | },
240 |
241 | hide: function() {
242 | this.dropdown.hide();
243 | this.lastAbbreviation = null;
244 | },
245 |
246 | moveSelected: function(n) { this.markSelected(this.selectedIndex+n); },
247 | markFirst: function() { this.markSelected(0); },
248 | markLast: function() { this.markSelected(this.results.length - 1); },
249 | reset: function() { this.input.val(this.abbreviationBeforeFocus); },
250 | focus: function() { this.input.focus(); },
251 | focusAndHide: function() { this.focus(); this.hide(); }
252 | });
253 |
254 | $.fn.flexselect = function(options) {
255 | this.each(function() {
256 | if (this.tagName == "SELECT") new $.flexselect(this, options);
257 | });
258 | return this;
259 | };
260 | })(jQuery);
261 |
--------------------------------------------------------------------------------
/static/js/flexselect/liquidmetal.js:
--------------------------------------------------------------------------------
1 | /*
2 | * LiquidMetal, version: 0.1 (2009-02-05)
3 | *
4 | * A mimetic poly-alloy of Quicksilver's scoring algorithm, essentially
5 | * LiquidMetal.
6 | *
7 | * For usage and examples, visit:
8 | * http://github.com/rmm5t/liquidmetal
9 | *
10 | * Licensed under the MIT:
11 | * http://www.opensource.org/licenses/mit-license.php
12 | *
13 | * Copyright (c) 2009, Ryan McGeary (ryanonjavascript -[at]- mcgeary [*dot*] org)
14 | */
15 | var LiquidMetal = function() {
16 | var SCORE_NO_MATCH = 0.0;
17 | var SCORE_MATCH = 1.0;
18 | var SCORE_TRAILING = 0.8;
19 | var SCORE_TRAILING_BUT_STARTED = 0.9;
20 | var SCORE_BUFFER = 0.85;
21 |
22 | return {
23 | score: function(string, abbreviation) {
24 | // Short circuits
25 | if (abbreviation.length == 0) return SCORE_TRAILING;
26 | if (abbreviation.length > string.length) return SCORE_NO_MATCH;
27 |
28 | var scores = this.buildScoreArray(string, abbreviation);
29 |
30 | var sum = 0.0;
31 | for (var i in scores) {
32 | sum += scores[i];
33 | }
34 |
35 | return (sum / scores.length);
36 | },
37 |
38 | buildScoreArray: function(string, abbreviation) {
39 | var scores = new Array(string.length);
40 | var lower = string.toLowerCase();
41 | var chars = abbreviation.toLowerCase().split("");
42 |
43 | var lastIndex = -1;
44 | var started = false;
45 | for (var i in chars) {
46 | var c = chars[i];
47 | var index = lower.indexOf(c, lastIndex+1);
48 | if (index < 0) return fillArray(scores, SCORE_NO_MATCH);
49 | if (index == 0) started = true;
50 |
51 | if (isNewWord(string, index)) {
52 | scores[index-1] = 1;
53 | fillArray(scores, SCORE_BUFFER, lastIndex+1, index-1);
54 | }
55 | else if (isUpperCase(string, index)) {
56 | fillArray(scores, SCORE_BUFFER, lastIndex+1, index);
57 | }
58 | else {
59 | fillArray(scores, SCORE_NO_MATCH, lastIndex+1, index);
60 | }
61 |
62 | scores[index] = SCORE_MATCH;
63 | lastIndex = index;
64 | }
65 |
66 | var trailingScore = started ? SCORE_TRAILING_BUT_STARTED : SCORE_TRAILING;
67 | fillArray(scores, trailingScore, lastIndex+1);
68 | return scores;
69 | }
70 | };
71 |
72 | function isUpperCase(string, index) {
73 | var c = string.charAt(index);
74 | return ("A" <= c && c <= "Z");
75 | }
76 |
77 | function isNewWord(string, index) {
78 | var c = string.charAt(index-1);
79 | return (c == " " || c == "\t");
80 | }
81 |
82 | function fillArray(array, value, from, to) {
83 | from = Math.max(from || 0, 0);
84 | to = Math.min(to || array.length, array.length);
85 | for (var i = from; i < to; i++) { array[i] = value; }
86 | return array;
87 | }
88 | }();
89 |
--------------------------------------------------------------------------------
/static/js/gradebook.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for gradebook screens
3 | */
4 |
5 | jQuery('#courseware-gradebook .import-gradebook-form').hide();
6 | jQuery('#courseware-gradebook a').bind( 'click', function(){
7 | jQuery('#courseware-gradebook .import-gradebook-form').slideToggle();
8 | event.preventDefault();
9 | return false;
10 | });
11 |
12 | // Didn't find another way to 'localize' this
13 | oLanguage.oPaginate = [];
14 | oLanguage.oPaginate.sFirst = '«';
15 | oLanguage.oPaginate.sPrevious = '‹';
16 | oLanguage.oPaginate.sNext = '›';
17 | oLanguage.oPaginate.sLast = '»';
18 |
19 | // Load DataTables
20 | jQuery("#courseware-gradebook table").dataTable( {
21 | "oLanguage": oLanguage,
22 | "aoColumns": [
23 | { "bSortable": true },
24 | { "bSortable": false },
25 | { "bSortable": false },
26 | { "bSortable": false },
27 | { "bSortable": false },
28 | ],
29 | "aaSorting": [[ 0, "desc" ]],
30 | "bPaginate": false
31 | } );
--------------------------------------------------------------------------------
/static/js/group-dashboard.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for gradebook screens
3 | */
4 | jQuery('#user-grades').sparkline( 'html', { type: 'line', height: '30px', width: '100%' } );
5 | jQuery('#user-progress').sparkline( 'html', { type: 'pie', height: '45px', width: '45px', sliceColors: ['#DDD', '#666'] } );
--------------------------------------------------------------------------------
/static/js/inputhint/jquery.inputhint.js:
--------------------------------------------------------------------------------
1 | /*
2 | * jquery.juice.inputhint.js
3 | *
4 | * Juice Library Input Hint v0.1.0
5 | * Date: 2009-09-10
6 | * Requires: jQuery v1.3 or later
7 | * Dual licensed under the MIT and GPL licenses:
8 | * http://www.opensource.org/licenses/mit-license.php
9 | * http://www.gnu.org/licenses/gpl.html
10 | *
11 | * Copyright 2009 Steve Whiteley (http://jui.ce.it)
12 | */
13 |
14 | (function($) {
15 | $.fn.inputHint = function(callerSettings) {
16 | var settings = $.extend(true, {}, $.fn.inputHint.settings, callerSettings);
17 | return this.each(function() {
18 | var n = $(this), v = settings.value || $(this).attr('title'), f = $(this.form);
19 | n.focus(function() {
20 | n.val(n.val() == v ? '' : n.val())
21 | .removeClass(settings.className);
22 | })
23 | .blur(function() {
24 | n.val(n.val() == '' ? v : n.val())
25 | .addClass(settings.className);
26 | })
27 | .blur();
28 | if (f) {
29 | f.submit(function(e) {
30 | n.trigger('focus');
31 | });
32 | }
33 | });
34 | };
35 | $.fn.inputHint.settings = {
36 | value: false,
37 | className: false
38 | };
39 | })(jQuery);
--------------------------------------------------------------------------------
/static/js/lectures.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for lectures screen
3 | */
4 |
5 | // Start expanded
6 | jQuery("#lectures-tree-container").bind('loaded.jstree', function() {
7 | jQuery("#lectures-tree-container").jstree("open_all");
8 | });
9 | // Load the data
10 | jQuery("#lectures-tree-container").jstree(
11 | {
12 | "html_data" : {
13 | "data" : jQuery("#lectures-tree-data")
14 | },
15 | "sort" : function( a, b ) {
16 | // Get the classes with order values
17 | var a_class = jQuery(a).attr('class').match(/[0-9]-order/g);
18 | var b_class = jQuery(b).attr('class').match(/[0-9]-order/g);
19 | // Sort those
20 | var arr = [a_class , b_class].sort();
21 | // Compare those
22 | return ( arr.indexOf(a_class) > arr.indexOf(b_class) ) ? 1 : -1;
23 | },
24 | "plugins" : [ "html_data", "sort", "search" ]
25 | }
26 | );
27 | // Search for lectures
28 | jQuery("#lectures-tree-search-submit").click( function() {
29 | var search_string = jQuery("#lectures-tree-search-text").val();
30 | jQuery("#lectures-tree-container").jstree( "search", search_string );
31 | });
32 | // Expand All/Collapse All Toggle
33 | jQuery("#lectures-tree-toggle").click( function() {
34 | var action = jQuery("#lectures-tree-toggle").attr('rel');
35 | var cur_title = jQuery("#lectures-tree-toggle").text();
36 | var title = jQuery("#lectures-tree-toggle").attr('name');
37 | if( action === 'expand' ) {
38 | jQuery("#lectures-tree-container").jstree("open_all");
39 | jQuery("#lectures-tree-toggle").attr('rel', 'collapse');
40 | } else {
41 | jQuery("#lectures-tree-container").jstree("close_all");
42 | jQuery("#lectures-tree-toggle").attr('rel', 'expand');
43 | }
44 | jQuery("#lectures-tree-toggle").attr('name', cur_title );
45 | jQuery("#lectures-tree-toggle").text( title );
46 | });
--------------------------------------------------------------------------------
/static/js/list-assignments.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for list-assignments screens
3 | */
4 |
5 | // Didn't find another way to 'localize' this
6 | oLanguage.oPaginate = [];
7 | oLanguage.oPaginate.sFirst = '«';
8 | oLanguage.oPaginate.sPrevious = '‹';
9 | oLanguage.oPaginate.sNext = '›';
10 | oLanguage.oPaginate.sLast = '»';
11 |
12 | // Load DataTables
13 | jQuery("table.datatables").dataTable( {
14 | "aoColumns": [
15 | { "sWidth": "60%" },
16 | { "sWidth": "10%" },
17 | { "sWidth": "10%" },
18 | { "sWidth": "20%" }
19 | ],
20 | "oLanguage": oLanguage,
21 | "aaSorting": [[ 3, "desc" ]],
22 | "sPaginationType": "full_numbers"
23 | } );
--------------------------------------------------------------------------------
/static/js/list-schedules.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for schedule screens
3 | */
4 | // Parse language strings
5 | fcLanguage.firstDay = eval( fcLanguage.firstDay );
6 | fcLanguage.buttonTextKeys = fcLanguage.buttonTextKeys.split( ',' );
7 | fcLanguage.buttonTextVals = fcLanguage.buttonTextVals.split( ',' );
8 | fcLanguage.buttonText = new Object;
9 | jQuery.each( fcLanguage.buttonTextKeys, function( i, v ){
10 | fcLanguage.buttonText[v] = fcLanguage.buttonTextVals[i];
11 | } );
12 | fcLanguage.monthNames = fcLanguage.monthNames.split( ',' );
13 | fcLanguage.monthNamesShort = fcLanguage.monthNamesShort.split( ',' );
14 | fcLanguage.dayNames = fcLanguage.dayNames.split( ',' );
15 | fcLanguage.dayNamesShort = fcLanguage.dayNamesShort.split( ',' );
16 |
17 | // Load the FullCalendar
18 | jQuery('.courseware-fullcalendar').fullCalendar({
19 | editable: false,
20 | events: "?json",
21 | header: {
22 | left: 'prev,next today',
23 | center: 'title',
24 | right: 'month,agendaWeek,agendaDay'
25 | },
26 | timeFormat: fcLanguage.timeFormat,
27 | firstDay: fcLanguage.firstDay,
28 | buttonText: fcLanguage.buttonText,
29 | monthNames: fcLanguage.monthNames,
30 | monthNamesShort: fcLanguage.monthNamesShort,
31 | dayNames: fcLanguage.dayNames,
32 | dayNamesShort: fcLanguage.dayNamesShort,
33 | loading: function(bool) {
34 | if (bool) jQuery('#loading').show();
35 | else jQuery('#loading').hide();
36 | }
37 | });
38 |
39 | // Didn't find another way to 'localize' this
40 | oLanguage.oPaginate = [];
41 | oLanguage.oPaginate.sFirst = '«';
42 | oLanguage.oPaginate.sPrevious = '‹';
43 | oLanguage.oPaginate.sNext = '›';
44 | oLanguage.oPaginate.sLast = '»';
45 |
46 | // Load DataTables
47 | jQuery("table.datatables").dataTable( {
48 | "aoColumns": [
49 | { "sWidth": "65%" },
50 | { "sWidth": "15%" },
51 | { "sWidth": "15%" },
52 | { "sWidth": "5%" }
53 | ],
54 | "oLanguage": oLanguage,
55 | "aaSorting": [[ 1, "desc" ]],
56 | "sPaginationType": "full_numbers"
57 | } );
58 |
59 | // Append iCal icon to FullCalendar month name
60 | var iCal_link = ' | | ';
61 | jQuery( '.fc-header-left tr' ).append( iCal_link );
--------------------------------------------------------------------------------
/static/js/new-assignment.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for new assignment screens
3 | */
4 |
5 | jQuery('#courseware-assignment-builder').formbuilder({
6 | 'control_box_target': '#new-assignment-formbuilder-control-box',
7 | 'messages': fbLanguage
8 | });
9 |
10 | jQuery("#courseware-assignment-builder ul").sortable({ opacity: 0.6, cursor: 'move'});
11 | jQuery("#new-assignment-submit").bind( 'click', function() {
12 | var form_data = jQuery("#courseware-assignment-builder ul").serializeFormList({'prepend': 'assignment-frmb'});
13 | jQuery("#new-assignment-post-form").val(form_data);
14 | });
15 |
--------------------------------------------------------------------------------
/static/js/new-bibliograpy.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for new bibliography screen
3 | */
4 |
5 | jQuery('#bibliography-form-content label').hide();
6 | jQuery(".courseware-content-wrapper").hide();
7 | jQuery("ul.courseware-meta li.bib-types-list").hide();
8 | jQuery("#courseware-bibs-list").show();
9 | jQuery("ul.courseware-meta li.add").show();
10 | jQuery('.courseware-form-section input[type="text"]').inputHint();
11 | jQuery('.courseware-form-section textarea').inputHint();
12 |
13 | jQuery("ul.courseware-meta li.add-new-bib").on('click', function(){
14 | jQuery(".courseware-content-wrapper").slideToggle();
15 | jQuery("ul.courseware-meta li.bib-types-list").slideToggle();
16 | jQuery("#courseware-bibs-list").slideToggle();
17 | event.preventDefault();
18 | return false;
19 | })
20 |
21 | jQuery("ul.courseware-meta li.show-bibs a").on('click', function(){
22 | jQuery(".courseware-content-wrapper").hide();
23 | jQuery("ul.courseware-meta li.bib-types-list").hide();
24 | jQuery("ul.courseware-meta li.add").show();
25 | event.preventDefault();
26 | return false;
27 | });
--------------------------------------------------------------------------------
/static/js/schedules.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for schedule screens
3 | */
4 |
5 | // Localize DateTimePicker
6 | dtpLanguage['monthNames'] = dtpLanguage['monthNames'].split( ',' );
7 | dtpLanguage['dayNamesMin'] = dtpLanguage['dayNamesMin'].split( ',' );
8 | dtpLanguage['firstDay'] = eval( dtpLanguage['firstDay'] );
9 | dtpLanguage['isRTL'] = eval( dtpLanguage['isRTL'] );
10 | dtpLanguage['showMonthAfterYear'] = eval( dtpLanguage['showMonthAfterYear'] );
11 | jQuery.datepicker.setDefaults( dtpLanguage );
12 |
13 | // This will enable the calendar for start date field
14 | jQuery( "#schedule-startdate" ).datetimepicker({
15 | holdDatepickerOpen: true,
16 | showButtonPanel: true,
17 | timeFormat: 'hh:mm:ss',
18 | dateFormat: 'yy-mm-dd'
19 | });
20 |
21 | // Function will check the start date field and ensure the end date will not be older
22 | function courseware_toggle_datefields( reset ) {
23 | if( reset == true ) {
24 | var title = jQuery( "#schedule-enddate" ).attr('title');
25 | jQuery( "#schedule-enddate" ).val(title);
26 | }
27 |
28 | jQuery( "#schedule-enddate" ).datepicker('destroy');
29 | var start_date = jQuery( "#schedule-startdate" ).datepicker('getDate');
30 | if( start_date != null ) {
31 | jQuery( "#schedule-enddate" ).datetimepicker({
32 | holdDatepickerOpen: true,
33 | showButtonPanel: true,
34 | timeFormat: 'hh:mm:ss',
35 | dateFormat: 'yy-mm-dd',
36 | minDate: start_date
37 | });
38 | jQuery( "#schedule-end-date" ).show();
39 | }
40 | }
41 |
42 | // This will enable calendar for end date field on edit screen
43 | var cw_start_date = jQuery( "#schedule-startdate" ).val();
44 | if( cw_start_date != null )
45 | courseware_toggle_datefields( false );
46 |
47 | // This will enable the calendar for end date field
48 | // but only if start date field is populated
49 | jQuery( "#new-schedule-form #schedule-end-date" ).hide();
50 | jQuery( "#schedule-startdate" )
51 | .change( function() { courseware_toggle_datefields( true ) });
52 | jQuery( ".schedule-form" ).submit( function() { jQuery('#schedule-startdate').unbind('change'); } );
53 |
54 | /* Editor Screens */
55 | jQuery('.schedule-form input[type="text"]').inputHint();
56 | jQuery('.schedule-form textarea').inputHint();
57 |
58 | // Didn't find another way to 'localize' this
59 | oLanguage.oPaginate = [];
60 | oLanguage.oPaginate.sFirst = '«';
61 | oLanguage.oPaginate.sPrevious = '‹';
62 | oLanguage.oPaginate.sNext = '›';
63 | oLanguage.oPaginate.sLast = '»';
64 |
65 | // Load DataTables
66 | jQuery("table.datatables").dataTable( {
67 | "aoColumns": [
68 | { "sWidth": "65%" },
69 | { "sWidth": "15%" },
70 | { "sWidth": "15%" },
71 | { "sWidth": "5%" }
72 | ],
73 | "oLanguage": oLanguage,
74 | "aaSorting": [[ 1, "desc" ]],
75 | "sPaginationType": "full_numbers"
76 | } );
77 |
--------------------------------------------------------------------------------
/static/js/single-assignment.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Javascript calls for assignment screens
3 | */
4 | jQuery('#courseware-responses-list').hide();
5 |
6 | jQuery('#responses').on('click', function() {
7 | jQuery('#courseware-responses-list').slideToggle();
8 | event.preventDefault();
9 | return false;
10 | });
--------------------------------------------------------------------------------
/wordpress/templates/admin.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
19 |
20 |
21 |
22 |
23 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
44 |
45 |
46 |
47 |
48 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
69 |
70 |
71 |
72 |
73 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
95 |
96 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
121 |
122 |
150 |
151 |
152 |
153 |
154 |
155 |
156 | courseware.css file in your theme directory,
158 | and will load it automatically.', 'bpsp' )?>
159 |
160 |
161 |
162 |
163 |
176 |
177 |
178 |
179 |
--------------------------------------------------------------------------------
/wordpress/templates/contextual_help.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
17 | -
18 |
19 | —
20 |
21 | -
22 |
23 | —
24 |
25 | -
26 |
27 | —
28 |
29 | -
30 |
31 | —
32 |
33 | -
34 |
35 | —
36 |
37 | -
38 |
39 | —
40 |
41 | -
42 |
43 | —
44 |
45 | -
46 |
47 | —
48 |
49 | -
50 |
51 | —
52 |
53 | -
54 |
55 | —
56 |
57 | -
58 |
59 | —
60 |
61 |
62 |
--------------------------------------------------------------------------------