Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Same problem.

    When on mobile, when the view-port size changes (when orientation changes), the sticky menu doesn’t resize.

    Also, sticky at bottom would be much appreciated.

    Thanks for the awesome plugin, by the way.

    Thread Starter Mitesh Patel

    (@mitesh-patel)

    You can use another plugin like role-scoper or such, that can modify capabilities/roles of individual users or roles. It’s really simple. I use a plugin called “members” that does the same thing.

    Thread Starter Mitesh Patel

    (@mitesh-patel)

    I got it working (bind a quiz to the users who created that quiz) with some tinkering, and reporting it here, so that others in need of such a solution can do so.

    The goal was,

    1. Only the user, who created the quiz can modify/delete the quiz.
    2. Admin can modify/delete any quiz.

    It must be noted that I contacted the plugin author Julius, and he graciously responded with suggestions. Thanks Julius.

    However, 1. I’m not really a programer 2. I had already made the following changes (make-shift, really) to get the job done, and was testing it.

    I am not sure the following is the best way to do it, but that seems to work. In short, the following that I am reporting is not based on his suggestions, so this may be buggy.

    I achieved it via the following changes, and I would like to submit them as patch.

    1. in the file WpProQuiz_Helper_DbUpgrade.php, I added a single line to the function “install ()” for inserting a column for user ID into table wp_pro_quiz_master as user varchar(200) NOT NULL (you will find similar lines in this function. Add this one before all, as first of such lines. Each of this lines create a column in the database table)

    2. in the file WpProQuiz_Model_QuizMapper.php I made three changes.

    a. added an item in the $set array (in the beginning) the function save () thus ‘user’ => wp_get_current_user()->ID, (again, you will find similar lines in this function. Add this one before all, as first of such lines)

    b. added added “%s” to the update and insert queries in the same save function
    (at the bottom of the function. here as well, you will find a line with many %s, %s, %d, %d, %d, … in this function. Add one before all)

    c. replaced a line of code with following code block to the “fetchAll ()” function to filter the quiz results.
    The line replaced is
    $results = $this->_wpdb->get_results(“SELECT * FROM {$this->_table}” , ARRAY_A);

    add this at second line of the function instead. See that the replaced line is still there in the if statement.

    $uid = wp_get_current_user()->ID;
    if ($uid == 1) {
    $results = $this->_wpdb->get_results(“SELECT * FROM {$this->_table}” , ARRAY_A);
    } else {
    $results = $this->_wpdb->get_results(“SELECT * FROM {$this->_table} WHERE user = $uid” , ARRAY_A);
    }

    Also, A minore bug I came across related to “question category” and statistics for imported questions.

    I created a quiz.
    I added questions, two of them were assigned a category.
    I exported the quiz (for backup).
    I imported the quiz on a fresh install.
    Now the fresh install didn’t have any categories. The statistics did not appear.
    I edited the questions, and assigned them “–no category–“. The results appear.

    I don’t need it fixed. I just thought you should know.

    Finally, marking the topic resolved.

    Thread Starter Mitesh Patel

    (@mitesh-patel)

    Marking Resolved.

    Thread Starter Mitesh Patel

    (@mitesh-patel)

    wisecapt, you are right. my bad.

    In the statistics, there indeed a feature I explained, which can be shown by the button “overview” when in stastics.

    wp-pro-quiz just became even more awesome for me.

    Thread Starter Mitesh Patel

    (@mitesh-patel)

    You are right about WP Pro Quiz statistics feature, but that’s not what I want.

    My question was different. I want mark-sheet/score-card of all those who took the exam, not individual ones.

    For example,

    user 1 5 points
    user 2 10 points
    ….
    user n 20 points

    The WP Pro Quiz statistics gives one user at a time.

    Or am I wrong?

Viewing 6 replies - 1 through 6 (of 6 total)