Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello conser,

    I’m not sure we are on the same page here – “All questions marked with “* Mandatory” require your input.” will show up when student will try submit his answer without answering all mandatory questions and form will not allow him to go further without answering.
    Under each mandatory question is info about that “* Mandatory”.

    Could you give me more information about your issue here?

    kind regards,
    Kasia

    Thread Starter conser

    (@conser)

    Hello Kasia.
    You said:

    Under each mandatory question is info about that “* Mandatory”.

    As you can see here – there is no info under each mandatory question.
    Regards,

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello conser,

    OK, there should be line there about that – is it possible I could check your live site? Maybe there are styles that are hiding this.
    What theme are you using? Is it default CoursePress theme?

    kind regards,
    Kasia

    Thread Starter conser

    (@conser)

    Default CoursePress theme looks so as well.
    With CoursePress Pro – the same case.

    If question marked: Mandatory Answer – there no info about * Mandatory
    If question marked: Mandatory Answer + Assessable – the info is visible

    Can’t be a “Mandatory” but not “Assessable” question asked?

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello conser,

    I’m not able to replicate – I can only set Mandatory and info is there.
    Are you using updated plugin version? In this file /coursepress/includes/classes/class.course.unit.module.php in line 1016 should be function that looks like that

    public static function mandatory_message( $data ) {
    			if ( 'yes' == $data->mandatory_answer ) {
    
    				$message = __( '* Mandatory', 'coursepress' );
    				if ( 'yes' == $data->gradable_answer ) {
    					$message = __( '* Mandatory', 'coursepress' );
    				}
    				?>
    				<div class="module_mandatory">
    					<?php echo $message; ?>
    				</div>
    				<?php
    			}
    		}

    Can you check if it looks the same in your plugin?

    kind regards,
    Kasia

    Thread Starter conser

    (@conser)

    If I set “Mandatory Answer” (only this field, without “Assessable”)
    – no info about *Mandatory is there
    When I set both fields – there is an info *Mandatory

    I use CoursePress Pro 1.3.4.1 and this function looks like yours, but
    insteat of:

    $message = __( ‘* Mandatory’, ‘coursepress’ );

    I have:

    $message = __( ‘* Mandatory’, ‘cp’ );

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello conser,

    Well, it looks like this issue occurs only in Pro version and I was checking all the time free version from wordpress.org repository.

    In the same file class.course.unit.module.php in line 1170 find

    if ( 'yes' == $data->gradable_answer ) {
    					if ( 'yes' == $data->mandatory_answer ) {
    						self::mandatory_message( $data );
    					}

    and change it to this:

    if ( 'yes' == $data->mandatory_answer  || 'yes' == $data->gradable_answer) {
    					self::mandatory_message( $data );

    it should fix the issue.

    kind regards,
    Kasia

    Thread Starter conser

    (@conser)

    Hello Kasia,
    it works! Thanks for your work.
    Kind regards

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello conser,

    Awesome :). Could you marked thread as resolved, please? 🙂

    kind regards,
    Kasia

    Thread Starter conser

    (@conser)

    Well done Kasia!

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

The topic ‘Mandatory question – information for student’ is closed to new replies.