Title: Suggestions
Last modified: August 22, 2016

---

# Suggestions

 *  Resolved [sergio345](https://wordpress.org/support/users/sergio345/)
 * (@sergio345)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/suggestions-66/)
 * 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/](https://wordpress.org/plugins/an-gradebook/)

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/suggestions-66/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/suggestions-66/page/2/?output_format=md)

 *  Plugin Author [Aori Nevo](https://wordpress.org/support/users/anevo/)
 * (@anevo)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/suggestions-66/#post-5939438)
 * 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
 *  Plugin Author [Aori Nevo](https://wordpress.org/support/users/anevo/)
 * (@anevo)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/suggestions-66/#post-5939530)
 * 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
 *  Thread Starter [sergio345](https://wordpress.org/support/users/sergio345/)
 * (@sergio345)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/suggestions-66/#post-5939676)
 * Thanks! I coudn’t try it before.
 * Do you have plans to make the plugin work with multisite?
 *  Plugin Author [Aori Nevo](https://wordpress.org/support/users/anevo/)
 * (@anevo)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/suggestions-66/#post-5939677)
 * 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](https://wordpress.org/support/users/asimjaved/)
 * (@asimjaved)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/suggestions-66/#post-5939740)
 * 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:
    [](https://wordpress.org/support/topic/suggestions-66/www.taqwaseminary.com/dev/images/GradeBook-Shortcode-Fail.png?output_format=md)
 *  [asimjaved](https://wordpress.org/support/users/asimjaved/)
 * (@asimjaved)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/suggestions-66/#post-5939741)
 * [http://www.taqwaseminary.com/dev/images/GradeBook-Shortcode-Fail.png](http://www.taqwaseminary.com/dev/images/GradeBook-Shortcode-Fail.png)
 *  Plugin Author [Aori Nevo](https://wordpress.org/support/users/anevo/)
 * (@anevo)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/suggestions-66/#post-5939742)
 * 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
 *  Plugin Author [Aori Nevo](https://wordpress.org/support/users/anevo/)
 * (@anevo)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/suggestions-66/#post-5939743)
 * 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](https://wordpress.org/support/users/asimjaved/)
 * (@asimjaved)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/suggestions-66/#post-5939744)
 * 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.
 *  Plugin Author [Aori Nevo](https://wordpress.org/support/users/anevo/)
 * (@anevo)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/suggestions-66/#post-5939745)
 * Can you send me screeshots of the page with Google Chrome Developer Tools window
   open and the networks tab selected?
 *  [asimjaved](https://wordpress.org/support/users/asimjaved/)
 * (@asimjaved)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/suggestions-66/#post-5939746)
 * [http://www.taqwaseminary.com/dev/images/devtoolsscreenshot.png](http://www.taqwaseminary.com/dev/images/devtoolsscreenshot.png)
 *  Plugin Author [Aori Nevo](https://wordpress.org/support/users/anevo/)
 * (@anevo)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/suggestions-66/#post-5939747)
 * Select the XHR tab and click on the item named admin-ajax.php?action=course_list.
   Send me a screenshot of this.
 *  [asimjaved](https://wordpress.org/support/users/asimjaved/)
 * (@asimjaved)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/suggestions-66/#post-5939748)
 * admin-ajax wasn’t there – only this:
    [http://www.taqwaseminary.com/dev/images/devtoolsscreenshot2.png](http://www.taqwaseminary.com/dev/images/devtoolsscreenshot2.png)
 *  Plugin Author [Aori Nevo](https://wordpress.org/support/users/anevo/)
 * (@anevo)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/suggestions-66/#post-5939749)
 * It looks like you are getting two errors. Click on the console tab and send me
   a screenshot.
 *  [asimjaved](https://wordpress.org/support/users/asimjaved/)
 * (@asimjaved)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/suggestions-66/#post-5939750)
 * [http://www.taqwaseminary.com/dev/images/errors.png](http://www.taqwaseminary.com/dev/images/errors.png)

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/suggestions-66/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/suggestions-66/page/2/?output_format=md)

The topic ‘Suggestions’ is closed to new replies.

 * ![](https://ps.w.org/an-gradebook/assets/icon.svg?rev=3467047)
 * [GradeBook](https://wordpress.org/plugins/an-gradebook/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/an-gradebook/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/an-gradebook/)
 * [Active Topics](https://wordpress.org/support/plugin/an-gradebook/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/an-gradebook/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/an-gradebook/reviews/)

 * 17 replies
 * 3 participants
 * Last reply from: [asimjaved](https://wordpress.org/support/users/asimjaved/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/suggestions-66/page/2/#post-5939752)
 * Status: resolved