WPIntell

Source evidence

Suggestions

GradeBook · support · 2015-03-25T12:45:00+00:00

mixedsentiment
highseverity
0.95relevance
17replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 31 rows with source links

12.9% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

27 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
sergio345 resolved
Your plugin is great and really usefull to us. We have some suggestions to make it better: 1. Import all users with a role in the site. We have a custom WordPress role for students, and would be great if we can import all in one step. Also can be usefull to have a selection step to select the users of the site to add to a course. 2. Widget or frontend page. Thanks for this fantastic plugin and your hard work! Sorry for my bad English. https://wordpress.org/plugins/an-gradebook/ Hi sergio345, Thank you for your feedback. Item 1 is definitely something that needs to be integrated into this plugin. Item 2 has been suggested in the past, but I’ve been reluctant to add it because I couldn’t find a nice, easy, and reliable way to render the gradebook in the wordpress frontend (there are a ton of themes to choose from, how should I handle rendering the gradebook so it looks the same in all of them). I think now the plugin is in a much better place and better suited to add such a feature. Regards, Aori Nevo Hi sergio345, You can use the following code to insert the gradebook plugin into the frontend of your wordpress site. This code should go at the bottom of the GradeBook.php file just before the ?> symbol. It’s a hack, but it should work. Let me know how this works out for you. add_action('wp_head','an_gradebook_ajaxurl'); function an_gradebook_ajaxurl() { ?> <script type="text/javascript"> var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>'; </script> <?php } function an_gradebook_shortcode (){ init_an_gradebook(); $an_gradebook_develop = false; $app_base = plugins_url('js',__FILE__); wp_register_style( 'jquery_ui_css', $app_base.'/lib/jquery-ui/jquery-ui.css', array(), null, false ); wp_register_style( 'GradeBook_css', plugins_url('GradeBook.css',__File__), array('bootstrap_css','jquery_ui_css'), null, false ); wp_register_style( 'bootstrap_css', $app_base.'/lib/bootstrap/css/bootstrap2.css', array(), null, false); wp_register_script( 'requirejs', $app_base.'/require.js', array(), null, true); if( 1==1 ){ wp_enqueue_style('GradeBook_css'); wp_enqueue_script('requirejs'); if(gradebook_check_user_role('administrator')){ wp_localize_script( 'requirejs', 'require', array( 'baseUrl' => $app_base, 'deps' => array( $app_base . ($an_gradebook_develop ? '/app_instructor.js' : '/app-instructor-min.js') ) )); } else { wp_localize_script( 'requirejs', 'require', array( 'baseUrl' => $app_base, 'deps' => array( $app_base . ($an_gradebook_develop ? '/app_student.js' : '/app-student-min.js') ) )); } } else { return; }; return '<div id="wpbody-content"></div>'; } add_shortcode('an_gradebook', 'an_gradebook_shortcode'); Regards, Aori Nevo Thanks! I coudn’t try it before. Do you have plans to make the plugin work with multisite? Hi sergio345, Some users have successfully used the plugin on multisite installation of wordpress, but we do not support it. I’ll add this to the list of requested features and see what we can do. Regards, Aori Nevo Hi – regarding the shortcode hack – I tried it, but nothing happens – I emptied my cache, reloaded my page, and [an_gradebook] just does nothing – other shortcodes work ok on the page. The shortcode is recognized, because the [an_gradebook] is not echo’ed to the screen. Looks like it just comes back – I was logged in as Site Admin. Can you please take a look as having the ability for students to see their grades on their Portal Page on my site would be great! Thanks! This is the full content of my page: [xyz-ips snippet=”LearningPortalLoginMessage”] Gradebook should be here: [an_gradebook] Now the Student Profile: [ld_profile] Here is what appears: http://www.taqwaseminary.com/dev/images/GradeBook-Shortcode-Fail.png Hi asimjaved, That hack is old and probably will only work for much earlier versions of the plugin. Let me see what all needs to be changed to get it to work again. Regards, Aori Nevo Hi asimjaved, You’ll need to do two things. First, edit an-gradebook/GradeBook.php. Place the code below at the end of the file just before ?> . function an_gradebook_shortcode (){ init_an_gradebook(); $an_gradebook_develop = true; $app_base = plugins_url('js',__FILE__); wp_register_script( 'init_front_end_gradebookjs', $app_base.'/../init_front_end_gradebook.js', array('jquery'), null, true); wp_enqueue_script('init_front_end_gradebookjs'); if( 1==1){ wp_register_style( 'jquery_ui_css', $app_base.'/lib/jquery-ui/jquery-ui.css', array(), null, false ); wp_register_style( 'GradeBook_css', plugins_url('GradeBook.css',__File__), array('bootstrap_css','jquery_ui_css'), null, false ); wp_register_style( 'bootstrap_css', $app_base.'/lib/bootstrap/css/bootstrap.css', array(), null, false); wp_register_script( 'requirejs', $app_base.'/require.js', array(), null, true); wp_enqueue_style('GradeBook_css'); wp_enqueue_script('requirejs'); wp_localize_script( 'requirejs', 'require', array( 'baseUrl' => $app_base, 'deps' => array( $app_base . ($an_gradebook_develop ? '/an-gradebook-app.js' : '/an-gradebook-app-min.js') ))); } else { return; } return '<div id="wpbody-content"></div>'; } add_shortcode('an_gradebook', 'an_gradebook_shortcode'); Second, add a new file under the an-gradebook directory named init_front_end_gradebook.js and inside this file insert the code below. (function($){ var _x = window.location.href + "#courses"; window.location.href = _x; })(jQuery); Also, you will likely want to change the value of $an_gradebook_develop to false. This will shorten the load time of the page. Let me know how this turns out. Regards, Aori Nevo Thanks Aori – it’s trying to load now, but it hangs with the circle showing and continually moving … just fyi, I only have 2 students, 1 course and 1 assignment. Can you send me screeshots of the page with Google Chrome Developer Tools window open and the networks tab selected? http://www.taqwaseminary.com/dev/images/devtoolsscreenshot.png Select the XHR tab and click on the item named admin-ajax.php?action=course_list. Send me a screenshot of this. admin-ajax wasn’t there – only this: http://www.taqwaseminary.com/dev/images/devtoolsscreenshot2.png It looks like you are getting two errors. Click on the console tab and send me a screenshot. http://www.taqwaseminary.com/dev/images/errors.png Ok, we are missing a bit from the original code. Add this just before the function an_gradebook_shortcode. function an_gradebook_ajaxurl() { ?> <script type="text/javascript"> var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>'; </script> <?php } add_action('wp_head','an_gradebook_ajaxurl'); it worked 🙂 – Fantastic! Thanks so much for working with me to figure it out – you’re amazing!

Comments

17 shown
Aori Nevo 2015-03-25T14:05:00+00:00

Hi sergio345, Thank you for your feedback. Item 1 is definitely something that needs to be integrated into this plugin. Item 2 has been suggested in the past, but I’ve been reluctant to add it because I couldn’t find a nice, easy, and reliable way to render the gradebook in the wordpress frontend (there are a ton of themes to choose from, how should I handle rendering the gradebook so it looks the same in all of them). I think now the plugin is in a much better place and better suited to add such a feature. Regards, Aori Nevo

Aori Nevo 2015-03-25T22:36:00+00:00

Hi sergio345, You can use the following code to insert the gradebook plugin into the frontend of your wordpress site. This code should go at the bottom of the GradeBook.php file just before the ?> symbol. It’s a hack, but it should work. Let me know how this works out for you. add_action('wp_head','an_gradebook_ajaxurl'); function an_gradebook_ajaxurl() { ?> <script type="text/javascript"> var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>'; </script> <?php } function an_gradebook_shortcode (){ init_an_gradebook(); $an_gradebook_develop = false; $app_base = plugins_url('js',__FILE__); wp_register_style( 'jquery_ui_css', $app_base.'/lib/jquery-ui/jquery-ui.css', array(), null, false ); wp_register_style( 'GradeBook_css', plugins_url('GradeBook.css',__File__), array('bootstrap_css','jquery_ui_css'), null, false ); wp_register_style( 'bootstrap_css', $app_base.'/lib/bootstrap/css/bootstrap2.css', array(), null, false); wp_register_script( 'requirejs', $app_base.'/require.js', array(), null, true); if( 1==1 ){ wp_enqueue_style('GradeBook_css'); wp_enqueue_script('requirejs'); if(gradebook_check_user_role('administrator')){ wp_localize_script( 'requirejs', 'require', array( 'baseUrl' => $app_base, 'deps' => array( $app_base . ($an_gradebook_develop ? '/app_instructor.js' : '/app-instructor-min.js') ) )); } else { wp_localize_script( 'requirejs', 'require', array( 'baseUrl' => $app_base, 'deps' => array( $app_base . ($an_gradebook_develop ? '/app_student.js' : '/app-student-min.js') ) )); } } else { return; }; return '<div id="wpbody-content"></div>'; } add_shortcode('an_gradebook', 'an_gradebook_shortcode'); Regards, Aori Nevo

sergio345 2015-04-01T13:07:00+00:00

Thanks! I coudn’t try it before. Do you have plans to make the plugin work with multisite?

Aori Nevo 2015-04-01T14:09:00+00:00

Hi sergio345, Some users have successfully used the plugin on multisite installation of wordpress, but we do not support it. I’ll add this to the list of requested features and see what we can do. Regards, Aori Nevo

asimjaved 2015-12-02T18:51:00+00:00

Hi – regarding the shortcode hack – I tried it, but nothing happens – I emptied my cache, reloaded my page, and [an_gradebook] just does nothing – other shortcodes work ok on the page. The shortcode is recognized, because the [an_gradebook] is not echo’ed to the screen. Looks like it just comes back – I was logged in as Site Admin. Can you please take a look as having the ability for students to see their grades on their Portal Page on my site would be great! Thanks! This is the full content of my page: [xyz-ips snippet=”LearningPortalLoginMessage”] Gradebook should be here: [an_gradebook] Now the Student Profile: [ld_profile] Here is what appears:

asimjaved 2015-12-02T18:52:00+00:00

http://www.taqwaseminary.com/dev/images/GradeBook-Shortcode-Fail.png

Aori Nevo 2015-12-02T19:05:00+00:00

Hi asimjaved, That hack is old and probably will only work for much earlier versions of the plugin. Let me see what all needs to be changed to get it to work again. Regards, Aori Nevo

Aori Nevo 2015-12-02T19:28:00+00:00

Hi asimjaved, You’ll need to do two things. First, edit an-gradebook/GradeBook.php. Place the code below at the end of the file just before ?> . function an_gradebook_shortcode (){ init_an_gradebook(); $an_gradebook_develop = true; $app_base = plugins_url('js',__FILE__); wp_register_script( 'init_front_end_gradebookjs', $app_base.'/../init_front_end_gradebook.js', array('jquery'), null, true); wp_enqueue_script('init_front_end_gradebookjs'); if( 1==1){ wp_register_style( 'jquery_ui_css', $app_base.'/lib/jquery-ui/jquery-ui.css', array(), null, false ); wp_register_style( 'GradeBook_css', plugins_url('GradeBook.css',__File__), array('bootstrap_css','jquery_ui_css'), null, false ); wp_register_style( 'bootstrap_css', $app_base.'/lib/bootstrap/css/bootstrap.css', array(), null, false); wp_register_script( 'requirejs', $app_base.'/require.js', array(), null, true); wp_enqueue_style('GradeBook_css'); wp_enqueue_script('requirejs'); wp_localize_script( 'requirejs', 'require', array( 'baseUrl' => $app_base, 'deps' => array( $app_base . ($an_gradebook_develop ? '/an-gradebook-app.js' : '/an-gradebook-app-min.js') ))); } else { return; } return '<div id="wpbody-content"></div>'; } add_shortcode('an_gradebook', 'an_gradebook_shortcode'); Second, add a new file under the an-gradebook directory named init_front_end_gradebook.js and inside this file insert the code below. (function($){ var _x = window.location.href + "#courses"; window.location.href = _x; })(jQuery); Also, you will likely want to change the value of $an_gradebook_develop to false. This will shorten the load time of the page. Let me know how this turns out. Regards, Aori Nevo

asimjaved 2015-12-02T21:40:00+00:00

Thanks Aori – it’s trying to load now, but it hangs with the circle showing and continually moving … just fyi, I only have 2 students, 1 course and 1 assignment.

Aori Nevo 2015-12-02T21:43:00+00:00

Can you send me screeshots of the page with Google Chrome Developer Tools window open and the networks tab selected?

asimjaved 2015-12-02T22:02:00+00:00

http://www.taqwaseminary.com/dev/images/devtoolsscreenshot.png

Aori Nevo 2015-12-02T22:06:00+00:00

Select the XHR tab and click on the item named admin-ajax.php?action=course_list. Send me a screenshot of this.

asimjaved 2015-12-02T22:15:00+00:00

admin-ajax wasn’t there – only this: http://www.taqwaseminary.com/dev/images/devtoolsscreenshot2.png

Aori Nevo 2015-12-02T22:24:00+00:00

It looks like you are getting two errors. Click on the console tab and send me a screenshot.

asimjaved 2015-12-02T22:29:00+00:00

http://www.taqwaseminary.com/dev/images/errors.png

Aori Nevo 2015-12-02T22:41:00+00:00

Ok, we are missing a bit from the original code. Add this just before the function an_gradebook_shortcode. function an_gradebook_ajaxurl() { ?> <script type="text/javascript"> var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>'; </script> <?php } add_action('wp_head','an_gradebook_ajaxurl');

asimjaved 2015-12-02T22:45:00+00:00

it worked 🙂 – Fantastic! Thanks so much for working with me to figure it out – you’re amazing!