• Hi.

    First, i wand to say “Thanks” to plugin author.

    Recently i updated plugin and found that Taking Saving is not working.

    I saw code and found that snapshot will contain answers when output message have shortcode %%ANSWERS%% .

    But i want to save results without show them to users.

    For myself i fixed it. But i want to update plugin in future.

    Could you add one more option for saving takings without showing results to users?

    https://www.ads-software.com/plugins/watu/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter FanisTGT

    (@fanistgt)

    $final_output .= '<hr/>'.$result; # + line 146 of file cotrollers/show_exam.php
    $wpdb->query($wpdb->prepare("UPDATE ".WATU_TAKINGS." SET snapshot=%s WHERE ID=%d", $final_output, $taking_id));
    Plugin Author Bob

    (@prasunsen)

    Saving always works no matter if details are shown to the user or not. But in the admin page whatever is shown to the user is also shown to you. Do you mean you want users to not see the %%ANSWERS%% but you as admin to see it?

    Thread Starter FanisTGT

    (@fanistgt)

    Here

    if(empty($exam->dont_store_data)) {
    		$wpdb->query($wpdb->prepare("INSERT INTO ".WATU_TAKINGS." SET exam_id=%d, user_id=%d, ip=%s, date=CURDATE(),
    			points=%d, grade_id=%d, result=%s, snapshot=''", $exam_id, $uid, $_SERVER['REMOTE_ADDR'], $achieved, $g_id, $grade));
    		$taking_id = $wpdb->insert_id;
    	}

    Taking saves if $exam->dont_store_data == 0. But taking saves without details because snapshot=”

    Here

    $output = str_replace($replace_these, $with_these, wpautop(stripslashes($quiz_details->final_screen)));
    	if(strstr($output, '%%ANSWERS%%')) {
    		$output = str_replace('%%ANSWERS%%', $result, $output);
    	}
    	$final_output = apply_filters(WATU_CONTENT_FILTER, $output);

    $final_output will contain $result only if final_screen will contain %%ANSWERS%%.

    i am not right?

    I mean i want to see taking details as admin.

    Plugin Author Bob

    (@prasunsen)

    Snapshot is the same that user sees. So if this is what you mean you are right – if user does not see the answers, admin also doesn’t see them

    Thread Starter FanisTGT

    (@fanistgt)

    I need to hide answers from users that they can not talk correct answers to other users.
    But sometimes need to see taking details if users want to see their mistakes after exam.

    Plugin Author Bob

    (@prasunsen)

    OK, I understand. It will probably have to be like in the pro version where you can see the answers in a table even when they are not in the snapshot. I’ll consider it for a future release.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Taking Saving is not working’ is closed to new replies.