name)) { $form->name = ''; } if( !isset($form->intro) ) { $form->intro = 'Introduction?? where is this used? defined in mod.html'; } if( !isset($form->set_id) ) { $form->set_id = -1; } if( ! isset($form->gradingmethod) ) { $form->gradingmethod = 0; } //if( ! isset($form->course) ) { // $form->course = $course->id; //} // this is really hacky, but I need the contents of the lib.php for wwassignment: require_once("../mod/wwassignment/lib.php"); //require_once ("$CFG->dirroot/mod/wwassignmentlib.php"); define('WWMOODLE_SET_WEBWORK_URL', $CFG->wwassignment_webwork_url); require_login($course->id); add_to_log($course->id, "wwassignment", "view all", "index.php?id=$course->id", ""); $wwCourseName = wwmoodle_courseIdToShortName($course->id); /// Get all required strings $strwwassignments = get_string("modulenameplural", "wwassignment"); $strwwassignment = get_string("modulename", "wwassignment"); ?> course); error_log(print_r($oCourse, true)); $aMods = get_all_instances_in_course("wwmoodle", $oCourse); error_log("aMods"); error_log(count($aMods)); error_log(print_r($aMods, true)); ?>
"."Link to create WeBWorK course"."

"); } } else { print "This course is already prepared to connect to the webwork course $wwCourseName. "; if (isadmin()) { print("

"."Link to create WeBWorK course"."

"); } } ?>

course, $form->set_id); ?>
:

"; helpbutton("questions", get_string("helpquestions"), "moodle", true, true); echo "
"; if ($usehtmleditor) { helpbutton("richtext", get_string("helprichtext"), "moodle", true, true); } else { emoticonhelpbutton("form", "description"); } ?>
description); if ($usehtmleditor) { echo ''; } else { echo '
'; helpbutton("textformat", get_string("formattexttype")); print_string("formattexttype"); echo ': '; if (!$form->format) { $form->format = $defaultformat; } choose_from_menu(format_text_menu(), "format", $form->format, ""); echo '
'; } ?>

gradingmethod); ?>
" />
id) ) { print("

" .get_string("goToWeBWorK", "wwmoodle")."

"); } ?>